Closed Bug 386636 Opened 13 years ago Closed 13 years ago

mail-mode should be visible after clicking the tray-icon of an incoming mail


(Calendar :: Calendar Views, defect)

Not set


(Not tracked)



(Reporter: steff, Assigned: michael.buettner)



(Whiteboard: [patch in hand])


(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070515 Firefox/
Build Identifier: Lightning Version: 0.7pre (build 2007070202)

I often minimize Thunderbird in calendar-mode. When Thunderbird receives a mail and I open it by clicking on the tray-icon. Then the mail-mode should be visible automatically.

Reproducible: Always

Steps to Reproduce:
1. minimize with calendar-mode
2. incoming mail
3. click on the mail-tray-icon
Actual Results:  
calendar-mode is visible

Expected Results:  
mail-mode should be visible
The same when I click on the popup of an incoming mail. 
When I click on an incoming mail of a popup in previous versions (like 0.5) the mail is automatically marked and the third pane show a preview. 
Now when I minimize Thunderbird with calendar-mode and I would open an mail over the popup, only Thunderbird opens in calendar-mode.

Should I open a new Bug?

It's the same problem, I think! 
Another one for me...
Assignee: nobody → michael.buettner
Ever confirmed: true
Flags: blocking-calendar0.7+
Duplicate of this bug: 387384
Attached patch patch v1Splinter Review
This patch takes care of switching back to mail mode in case Thunderbird internally selects a mail or mail folder (as it is the case when the user clicks the mail notification window). The problem was that I forgot to hook myself into the 'select' event of the display deck in order to keep the mode stuff consistent.
Attachment #277687 - Flags: review?(philipp)
Severity: trivial → normal
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [patch in hand]
I have the feeling my builds are snafu today...

Error: gDBView has no properties
Source File: chrome://messenger/content/msgMail3PaneWindow.js
Line: 1698

When clicking on the new mail slider when in calendar mode.
(In reply to comment #5)
> I have the feeling my builds are snafu today...
> Error: gDBView has no properties
> Source File: chrome://messenger/content/msgMail3PaneWindow.js
> Line: 1698
Interestingly enough, I can't reproduce this as well as the issue this bug is all about. Clicking on the slider brings me to the mail, even if I'm currently in calendar mode, with or without the attached patch. Philipp, could you please shed some light in here? But for what it's worth the attached patch is still valid, I'd like to get it in even if this particular problem no longer happens.
Forget my previous comment with what I said that I couldn't reproduce the problem.  Of course, I can reproduce the initial problem, but I don't see the exception that gets thrown. The attached patch works indeed like a charm, so I'm still asking for review...
Hmm yes I'm still having the problem, even after a complete rebuild of lightning. Simple to reproduce, at least on my side. Just switch to calendar mode, wait for the slider, click on it, nothing happens, the given error console message shows up. I'll contact you when you are on IRC.
Philipp, which Thunderbird version do you use? Furthermore, could you please check whether or not the exception also gets thrown *without* this patch? I suspect that if there's a problem it can't have to do much with this patch, since all it does is to switch the view if the select event gets triggered (which happens during the path of execution if Thunderbird selects items in the folder pane or message list).
Comment on attachment 277687 [details] [diff] [review]
patch v1

Just in order to summarize the current state of affairs with this patch, I still can't reproduce this exception Philipp is talking about. But we found out that it also happens *without* this patch being applied at all. So I suspect that this is a bug with the notification slider, not with the feature this patch is all about.

This patch just hooks into the event which gets fired when Thunderbird finally updates the mail view selection in order to make sure we're showing the correct mode. If it happens that an exception gets thrown anytime before, we don't get to this, but in that case Thunderbird also doesn't select any different view and we're still in business.

I'm going to move the review request to Daniel as discussed on IRC.
Attachment #277687 - Flags: review?(philipp) → review?(daniel.boelzle)
Attachment #277687 - Flags: review?(daniel.boelzle) → review+
patch checked in on trunk and MOZILLA_1_8_BRANCH

Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.7
I try to verify this bug, but it doesn't work. I get the old (buggy) result: the calendar mode is visible.

Here is the console output

Error: gDBView has no properties
Source File: chrome://messenger/content/msgMail3PaneWindow.js
Line: 1698

This comes up when I click on the incoming mail popup.
I reopen this bug, because the issue isn't fixed. (nightly build 20070905 and  sun-internal build 20070906).
Resolution: FIXED → ---
This is just the error I was getting. Mickey suggested, that this is a different issue, since he didn't touch that code. It would be nice to find out how to fix this before we release 0.7
Attached patch add-on patch v1Splinter Review
Got it! I can't tell why, but this only happens after having send at least one mail. After that the initial problem can easily be reproduced. If I start Thunderbird, send a mail to myself, switch to calendar mode, wait for the mail to arrive and click on the slider everything is fine. I need to do this twice at least, after the second time it happens regularly.

In any case, the real problem is that Thunderbird releases the database view when switching to the calendar mode and doesn't create one while staying in calendar mode. When clicking on the slider Thunderbird tries to access the database view, but this doesn't work while still being in calendar mode. My previous fix switches back, but does so too late. This fix injects itself into the appropriate function and switches back much earlier.
Attachment #280746 - Flags: review?(daniel.boelzle)
Comment on attachment 280746 [details] [diff] [review]
add-on patch v1

Attachment #280746 - Flags: review?(daniel.boelzle) → review+
add-on patch checked in on trunk and MOZILLA_1_8_BRANCH

Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Checked in Lightning build 2007091703 -> VERIFIED
You need to log in before you can comment on or make changes to this bug.