Closed
Bug 462423
Opened 16 years ago
Closed 16 years ago
allow changing and choosing mail start page even when it is not set to show at the start
Categories
(Thunderbird :: Preferences, enhancement)
Thunderbird
Preferences
Tracking
(Not tracked)
VERIFIED
FIXED
Thunderbird 3.0b1
People
(Reporter: maxxmozilla, Assigned: maxxmozilla)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Why ?
Because this way it is way more useful and it could be used in a similar way to the Firefox homepage / bookmark.
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #345559 -
Flags: review?(mkmelin+mozilla)
Updated•16 years ago
|
Attachment #345559 -
Flags: review?(mkmelin+mozilla) → review-
Comment 2•16 years ago
|
||
Comment on attachment 345559 [details] [diff] [review]
Patch v1
>+
Spurious whitespace ^^^
>+ var startpageenabled = pref.getBoolPref("mailnews.start_page.enabled");
>+ if (gDisplayStartupPage && startpageenabled)
> {
> loadStartPage();
> gDisplayStartupPage = false;
>- UpdateMailToolbar("gDisplayStartupPage");
>- }
>+ }
Spurious whitespace ^^^
... but more importantly, there is no "pref" defined in the above code context.
The exception is happily swallowed somewhere though... :/
And there is no need to call UpdateMailToolbar in case the start page isn't getting loaded.
Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> ... but more importantly, there is no "pref" defined in the above code context.
>+ var startpageenabled = pref.getBoolPref("mailnews.start_page.enabled");
?
> The exception is happily swallowed somewhere though... :/
you want exception for the above pref ? , loadstartpage() function is catching exception for loading the page
> And there is no need to call UpdateMailToolbar in case the start page isn't
> getting loaded.
I had too move it out because with option to check for mail on startup and with disabled startpage, getmail button was disabled (until I clicked somewhere)
now I've noticed that it happens only with Lightning extension enabled, it's not a big problem in this case but my patch did it and I would like to fix it but unfortunately I don't know why it happens :|
Assignee | ||
Comment 4•16 years ago
|
||
> > And there is no need to call UpdateMailToolbar in case the start page isn't
> > getting loaded.
> I had too move it out because with option to check for mail on startup and with
> disabled startpage, getmail button was disabled (until I clicked somewhere)
> now I've noticed that it happens only with Lightning extension enabled, it's
> not a big problem in this case but my patch did it and I would like to fix it
> but unfortunately I don't know why it happens :|
previously loadStartPage() was executed at every startup which calls at the end ClearMessageSelection(), with my patch loadStartPage() called only when there is a need to
so should I leave UpdateMailToolbar where it is, use ClearMessageSelection() instead or you have other idea to solve disabled getmail for Lightning ?
Comment 5•16 years ago
|
||
(In reply to comment #3)
What I meant was, all pref.getBoolPref will ever do there is cause an exception, since pref isn't defined.
And since you'll always get the exception, the i can't see how the UpdateMailToolbar call would ever get reached in the first place...
Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5)
> What I meant was, all pref.getBoolPref will ever do there is cause an
> exception, since pref isn't defined.
hmm I think we have some misunderstanding here, I'm not using new pref because there is no need to, I'm using existing pref to check if user wants to show start page on startup or not
as you see from the patch pref.getboolpref was moved from mailWindow.js/loadStartPage() to commandglue.js/FolderPaneSelectionChange()
sorry, maybe I should have commented more but I hope all is clear now ?
I've tested the patch in a various ways and all works well in the practice
> And since you'll always get the exception, the i can't see how the
> UpdateMailToolbar call would ever get reached in the first place...
Comment 7•16 years ago
|
||
Yes, I know you used the existing pref name, what i'm saying is the "pref" in pref.getBoolPref isn't defined inside the function you are now using it in.
Assignee | ||
Comment 8•16 years ago
|
||
OK, sorry...
so adding
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch2);
before var startpageenabled should be enough ?
I would notice it if this would not work but it did :|
Regarding UpdateMailToolbar - should I leave it where it was originally and file bug for Lightning or fix it now as proposed in the current patch ?
Comment 9•16 years ago
|
||
Looks like gPrefBranch is defined, so use that.
Re UpdateMailToolbar I doubt it's a problem when the code is actually working ;)
But if it is, no we shouldn't say startpage was loaded if it wasn't. If it's needed just UpdateMailToolbar("FolderPaneSelectionChange"); or something
Assignee | ||
Comment 10•16 years ago
|
||
Updated to comments, I hope ;)
Attachment #345559 -
Attachment is obsolete: true
Attachment #345957 -
Flags: review?(mkmelin+mozilla)
Comment 11•16 years ago
|
||
Comment on attachment 345957 [details] [diff] [review]
Patch v2
Since we're always going to do UpdateMailToolbar("FolderPaneSelectionChange"); at the end, you can remove the two previous UpdateMailToolbar calls... Updating it once should be enough.
Also, please wrap the GetMessagePaneFrame().location.href line at ~80 chars.
BTW, I see now pref was indeed defined (through mailWindow.js i suppose), though using gPrefBranch is still the way to go in this file.
Assignee | ||
Comment 12•16 years ago
|
||
> Since we're always going to do UpdateMailToolbar("FolderPaneSelectionChange");
> at the end, you can remove the two previous UpdateMailToolbar calls... Updating
> it once should be enough.
yeah, should be enough
> Also, please wrap the GetMessagePaneFrame().location.href line at ~80 chars.
OK, if it would be not the best wrap feel free to fix it during checkin
> BTW, I see now pref was indeed defined (through mailWindow.js i suppose),
> though using gPrefBranch is still the way to go in this file.
so if I understand you properly there is no need to redefine if it's working (as in the last patch)
patch coming
Assignee | ||
Comment 13•16 years ago
|
||
Updated to comments
Attachment #345957 -
Attachment is obsolete: true
Attachment #346089 -
Flags: review?(mkmelin+mozilla)
Attachment #345957 -
Flags: review?(mkmelin+mozilla)
Comment 14•16 years ago
|
||
Comment on attachment 346089 [details] [diff] [review]
Patch v3
Looks good, though the wrapping of the line is a bit odd. I can fix that before checking in.
Attachment #346089 -
Flags: review?(mkmelin+mozilla) → review+
Assignee | ||
Comment 15•16 years ago
|
||
Thanks, it's odd because my editor fooled me -> it got ditched :)
Comment 16•16 years ago
|
||
As a side effect of the UpdateMailToolbar call, this also fixes bug 449679.
changeset: 1006:90b2b7edbdcd
http://hg.mozilla.org/comm-central/rev/90b2b7edbdcd
->FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b1
Assignee | ||
Comment 17•16 years ago
|
||
-> VERIFIED
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b2pre) Gecko/20081105 Lightning/1.0pre Shredder/3.0b1pre
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•