Re: New Events Should Include the Timezone Next to the Start/End Dates
STF <[email protected]> Mon, 08 Jun 2015 17:28:10 +0200
| Newsgroups | gmane.comp.mozilla.devel.calendar |
|---|---|
| Message-ID | <[email protected]> |
On 2015.06.05 18:02, kfr- wrote:
> That is great. would you happen to know what perf sets it?
No, I don't know, at least not at the beginning. But I think I finally
found it. However, it's not that simple. You could skip the following
part if you're not interested on how I found it.
<How I found where it's>
I've first searched through TB's integrated advanced option editor and
perf.js file to see if there's anything similar to "Show Timezone", but
it turned there's none.
I then made a search through all the files of Lightning package on
"timezone" as it's shown in the menu. This time, after some reading and
parsing through the matched files, I found that in the file called
calendar-event-dialog.js
there's this function:
function toggleTimezoneLinks() {
let cmdTimezone = document.getElementById('cmd_timezone');
let isChecked = cmdTimezone.getAttribute("checked") == "true";
cmdTimezone.setAttribute("checked", isChecked ? "false" : "true");
updateDateTime();
}
Here, it talked about a (sub) element attached to "document". Not being
a FF/TB add-on programmer, I have no idea what that refers to.
Then I did a search on the keyword "cmd_timezone" and this time I found
that it's defined inside this file:
<user_TB_profile>\Profiles\<random_name>\localstore.rdf
</How I found where it's>
So, that "config" is defined inside the localstore.rdf file like this:
<RDF:Description
RDF:about="chrome://calendar/content/calendar-event-dialog.xul#cmd_timezone"
checked="true" />
And of course, we could have checked="true" or checked="false" to turn
timezone display on or off respectively.
But what is localstore.rdf file?
Well, according to this article:
http://kb.mozillazine.org/Localstore.rdf
the file Localstore.rdf stores toolbar and window size/position settings!
In other words, there are two serious problems here:
1. That option is not really settable through some preference. It's
just saved through some toggle of window position and menu choice.
Furthermore, localstore.rdf can get corrupted, and when this happens,
it's recommended to delete the file and start TB over again. That means
if localstore.rdf is deleted (because people didn't think it's
important), timezone display is actually resetted!
2. "The localstore.rdf file has been deprecated and replaced with
xulstore.json in mozilla34" as stated at the very beginning of that article
> I would like to lockPref it in our client configs.
I don't think you can because as far as I can tell, localstore.rdf does
not define cmd_timezone toggle value when TB/Lightning just got started
for the first time. And of course, there's also this sentence:
"It's not advisable to edit this file manually because of its complexity."
I think I'm going to file a request to have a proper config value to
display timezone in event dialog.
STF