Closed Bug 177887 Opened 22 years ago Closed 18 years ago

Biff state doesn't update in recycled compose window

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

(Blocks 1 open bug)

Details

(Keywords: fixed-seamonkey1.1a)

Attachments

(1 file, 2 obsolete files)

Using Build ID: 2002103104
Steps to reproduce problem:
1. Open the compose window
2. Wait (!) for biff to fire (green arrow on mail taskbutton)
3. Close the compose window
4. Read your mail, so that the biff state is removed
5. Open the compose window

Expected results: biff state is removed from the compose window

Actual results: biff state remains in the compose window

Additional information:

Going offline/online works fine. Perhaps biff should use the observer service?
this sounds more like a cached compose window problem -> jf for now.
Assignee: mscott → ducarroz
Attached patch Proposed patch (obsolete) — Splinter Review
not message compose either. The patch is all about biff! I am not familar with
that code. mscott would be the right person but he is currently on sabbatical.
Maybe sspitzer can review it...
Assignee: ducarroz → mscott
*** Bug 140090 has been marked as a duplicate of this bug. ***
Copying from the dup bug 140090.
OS: Windows 95 → All
Hardware: PC → All
Blocks: biff
Product: Browser → Seamonkey
Attached patch Better patch (obsolete) — Splinter Review
Assignee: mscott → neil
Attachment #107717 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #214136 - Flags: superreview?(bienvenu)
Attachment #214136 - Flags: review?(mnyromyr)
Comment on attachment 214136 [details] [diff] [review]
Better patch

+ * Portions created by the Initial Developer are Copyright (C) 1998

2006?
Attachment #214136 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 214136 [details] [diff] [review]
Better patch

>Index: public/nsIStatusBarBiffManager.idl
>===================================================================

This won't create nsIStatusBarBiffManager.h because it's not included in Makefile.in.

>+#include "nsIFolderListener.idl"
>+
>+[scriptable, uuid(a767c5d1-5142-41a2-8873-71df09b4ce89)]
>+interface nsIStatusBarBiffManager : nsIFolderListener {
>+  // see  nsIMsgFolder for definition and constants
>+  readonly attribute nsMsgBiffState biffState;

This won't build because nsMsgBiffState isn't declared in nsIFolderListener.idl, but in nsIMsgFolder.idl (which in turn includes nsIFolderListener.idl, though).

>Index: src/nsStatusBarBiffManager.cpp
>===================================================================
>+      // if we fail to play the biff sound, keep going.
>+      (void)PlayBiffSound();

That (void) is superfluous.

>Index: src/nsStatusBarBiffManager.h
>===================================================================
>-  PRUint32 mCurrentBiffState;
>+  PRInt32  mCurrentBiffState;

Why this change?

>Index: resources/content/mailTasksOverlay.xul
>===================================================================
>+    const biffObserver =
>+      {

OMG, this file has a truly sucky indentation. :-(

>+              var biffManager = Components.classes["@mozilla.org/messenger/statusBarBiffManager;1"].getService(Components.interfaces.nsIStatusBarBiffManager);
>+              document.getElementById("mini-mail").setAttribute("BiffState", ["NewMail", "NoMail", "UnknownMail"][biffManager.biffState]);

Could use some line wrapping here...

>+    function mailTasksOnUnload(aEvent)
>+      {
>+        var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);

And here.


>+        var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);

And here.


Mainly minussing for the idl .problems; with these fixed manually I could build and the patch did indeed work then.
Attachment #214136 - Flags: review?(mnyromyr) → review-
(In reply to comment #8)
>(From update of attachment 214136 [details] [diff] [review])
>>Index: public/nsIStatusBarBiffManager.idl
>This won't create nsIStatusBarBiffManager.h because it's not included in
>Makefile.in.
Oops :-[

>>+#include "nsIFolderListener.idl"
>>+
>>+[scriptable, uuid(a767c5d1-5142-41a2-8873-71df09b4ce89)]
>>+interface nsIStatusBarBiffManager : nsIFolderListener {
>>+  // see  nsIMsgFolder for definition and constants
>>+  readonly attribute nsMsgBiffState biffState;
>This won't build because nsMsgBiffState isn't declared in
>nsIFolderListener.idl, but in nsIMsgFolder.idl (which in turn includes
>nsIFolderListener.idl, though).
Yes, I deleted that line by mistake after testing :-/
I'll leave the include for nsIFolderListener.idl in for readability.

>>Index: src/nsStatusBarBiffManager.cpp
>>===================================================================
>>+      // if we fail to play the biff sound, keep going.
>>+      (void)PlayBiffSound();
>That (void) is superfluous.
Don't blame me, I didn't write it. dmose even likes (void)s.

>>Index: src/nsStatusBarBiffManager.h
>>===================================================================
>>-  PRUint32 mCurrentBiffState;
>>+  PRInt32  mCurrentBiffState;
>Why this change?
To get rid of signed/unsigned mismatch warnings.

>>Index: resources/content/mailTasksOverlay.xul
>>===================================================================
>>+    const biffObserver =
>>+      {
>OMG, this file has a truly sucky indentation. :-(
Yeah, it also makes it really difficult to wrap long lines, so I gave up.
Of course, I'm open to suggestions...
Attachment #214136 - Attachment is obsolete: true
Attachment #215525 - Flags: review?(mnyromyr)
Attachment #215525 - Flags: review?(mnyromyr) → review+
Fix checked in to the trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment on attachment 215525 [details] [diff] [review]
Restored missing file and line

This code moves the setting of Suite's component bar icon from the shared code to the suite-only mailTasksOverlay.xul
Attachment #215525 - Flags: approval-branch-1.8.1?(mscott)
Attachment #215525 - Flags: approval-branch-1.8.1?(mscott) → approval-branch-1.8.1+
Fix checked in to the branch.
Component: MailNews: Notification → MailNews: Message Display
QA Contact: stephend → search
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: