MozillaZine

How to display Start and END of an event

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted August 25th, 2014, 6:35 am

Hi,
Is there a way to display both Start and End time of an event, in Month view?

At the moment, in month view, I can only see the start time:
Image

I'd like the same as in Outlook :
Image
Last edited by fredcom on November 28th, 2015, 4:21 am, edited 2 times in total.

Decathlon
 
Posts: 48
Joined: February 27th, 2009, 2:02 am

Post Posted August 27th, 2014, 2:38 pm

It's not possible without changing Lightning's code.

If you are able to apply a patch manually, the following should work:

Code: Select all
diff --git a/calendar/base/content/calendar-month-view.xml b/calendar/base/content/calendar-month-view.xml
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -103,9 +103,9 @@
               } else {
                 if (comp == 1) {
                   label.value = "⇤ " + df.formatTime(startTime);
                 } else {
-                  label.value = df.formatTime(startTime);
+                  label.value = df.formatTime(startTime) + " " + df.formatTime(endTime);
                 }
               }
               label.setAttribute("time", "true");
             }


the file to edit is calendar-month-view.xml
which you can find inside the folder (Win7):
C:\Users\_USER_NAME_\AppData\Roaming\Thunderbird\Profiles\_PROFILE_NAME_\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\chrome\calendar\content\calendar\

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted September 2nd, 2014, 8:44 am

Hi Decathlon,
thank you so much for your help. =D> =D>
It helps me a lot.
The result :
Image

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted November 28th, 2015, 4:21 am

Hi,
It seems that Lightning evolved with last update as there is no more way to find the file "calendar-month-view.xml"...
Do you have any idea wich file is possible to modify to regain this great option to display both Start and End time of an event?

Decathlon
 
Posts: 48
Joined: February 27th, 2009, 2:02 am

Post Posted November 28th, 2015, 8:31 am

Try to look into the folder where there is the exe file of Thunderbird (not the profile folder), something like this (Win7):

C:\Program Files (x86)\Thunderbird\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}

here you should have a file named "chrome.jar".

This file basically is a zip file. If you unpack it you can find inside the same files structure which you had before, in particular your file calendar-month-view.xml is inside the folder calendar\content\calendar\
Once you have edited your file, you have to re-pack the files (in the same file structure) in order to get a zip file named chrome.jar.

Be careful, jar is not a zip standard format so many zip tools don't handle it properly (many open it correctly but don't repack in the right way). I suggest you to take a look here where the subject is the file "omni.jar" about FF or TB, but it's the same as chrome.jar:

https://developer.mozilla.org/en-US/doc ... mni.jar%29

also search for "jar" or "omni.jar" in this forum.

Stay safe, make a copy of the file before starting to work on it.

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted November 28th, 2015, 11:33 am

Hi Decathlon,
I would like to thank you again for your light ;-)
It works but in a slightly different way that you explain.

I performed a search on "chrome.jar" and I found 2 files:
1/ C:\Program Files (x86)\Mozilla Thunderbird\distribution\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103} wich is the folder with thunderbird.exe in a parent directory
2/ C:\Users\f2_bureau\AppData\Roaming\Thunderbird\Profiles\8kq4tdrm.default\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}
It was only when I replaced the "chrome.jar" by the modified one in the 2/ folder that it works as expected (no change when file replaced in 1/ folder).

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted December 9th, 2015, 6:07 am

Hi ,
Arghh, I was probably on an older version.
So, after the upgrade to version thunderbird 38.4.0, it stopped working.

I tried first to modify the file chrome.jar in : C:\Program Files (x86)\Mozilla Thunderbird\distribution\extensions\{e2fda1a4‐762b‐4020‐b5ada41df1933103} but it doesn't change the display.
I also tried a test by deleting file "chrome.jar " , and Lightning still opened !!! (see photo)
So, maybe, file to change is not in chrome.jar

Image

ssitter

User avatar
 
Posts: 2495
Joined: October 19th, 2007, 12:24 am
Location: Germany

Post Posted December 10th, 2015, 12:35 pm

You always need to modify the Lightning files in your profile folder. The Lightning files in the program folder are the ones that are distributed with Thunderbird and they will be installed in the profile folder if you create a new profile.

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted December 12th, 2015, 1:02 pm

Hi ssitter,
I think my profile folder is : C:\Users\f2_bureau\AppData\Roaming\Thunderbird\Profiles\8kq4tdrm.default
but, wich file do I need to modify?

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted September 1st, 2017, 3:39 am

Before the last Thunderbird Update, I was modifying the calendar-month-view.xml accordind to

Code: Select all
_Edit “calendar-month-view.xml » with Notepad++ (folder calendar/content/calendar)
Then:
diff --git a/calendar/base/content/calendar-month-view.xml
b/calendar/base/content/calendar-month-view.xml
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -103,9 +103,9 @@
} else {
if (comp == 1) {
label.value = "⇤ " + df.formatTime(startTime);
} else {
- label.value = df.formatTime(startTime);
+ label.value = df.formatTime(startTime) + " " + df.formatTime(endTime);
}
}
label.setAttribute("time", "true");
}


The chrome.jar was in folder : C:\Users\MyBureau\AppData\Roaming\Thunderbird\Profiles\____drm.default\extensions\{e2fda1a4‐762b‐
4020‐b5ad‐a41df1933103}

But there is no more chrome.jar file in this folder!!!

Any idea how to have this "endTime" function back?

fredcom
 
Posts: 11
Joined: August 25th, 2014, 6:21 am

Post Posted September 1st, 2017, 4:09 am

Ok, so the new folder for "calendar-month-view.xml" is in C:\Users\MyBureau\AppData\Roaming\Thunderbird\Profiles\____drm.default\extensions\{e2fda1a4‐762b‐
4020‐b5ad‐a41df1933103}\chrome\calendar\content\calendar

change with Notepad++ :
#102
} else if (comp == 1) {
label.value = "⇤ " + formatter.formatTime(startTime);
} else {
--- label.value = formatter.formatTime(startTime);
+++ label.value = formatter.formatTime(startTime)+ "⇥ " + formatter.formatTime(endTime);
}
label.setAttribute("time", "true");

Image

Return to Calendar


Who is online

Users browsing this forum: No registered users and 1 guest

cron