Biff state doesn't update in recycled compose window

RESOLVED FIXED

Status

--
minor
RESOLVED FIXED
16 years ago
10 years ago

People

(Reporter: neil, Assigned: neil)

Tracking

(Blocks: 1 bug, {fixed-seamonkey1.1a})

Trunk
fixed-seamonkey1.1a

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

16 years ago
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?

Comment 1

16 years ago
this sounds more like a cached compose window problem -> jf for now.
Assignee: mscott → ducarroz
(Assignee)

Comment 2

16 years ago
Created attachment 107717 [details] [diff] [review]
Proposed patch
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

Comment 4

15 years ago
*** Bug 140090 has been marked as a duplicate of this bug. ***

Comment 5

15 years ago
Copying from the dup bug 140090.
OS: Windows 95 → All
Hardware: PC → All

Updated

15 years ago
Blocks: 36011
Product: Browser → Seamonkey
(Assignee)

Comment 6

13 years ago
Created attachment 214136 [details] [diff] [review]
Better patch
Assignee: mscott → neil
Attachment #107717 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #214136 - Flags: superreview?(bienvenu)
Attachment #214136 - Flags: review?(mnyromyr)

Comment 7

13 years ago
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 8

13 years ago
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-
(Assignee)

Comment 9

13 years ago
(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...
(Assignee)

Comment 10

13 years ago
Created attachment 215525 [details] [diff] [review]
Restored missing file and line
Attachment #214136 - Attachment is obsolete: true
Attachment #215525 - Flags: review?(mnyromyr)

Updated

13 years ago
Attachment #215525 - Flags: review?(mnyromyr) → review+
(Assignee)

Comment 11

13 years ago
Fix checked in to the trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
(Assignee)

Comment 12

13 years ago
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)

Updated

13 years ago
Attachment #215525 - Flags: approval-branch-1.8.1?(mscott) → approval-branch-1.8.1+
(Assignee)

Comment 13

13 years ago
Fix checked in to the branch.
Keywords: fixed-seamonkey1.1a

Updated

11 years ago
Component: MailNews: Notification → MailNews: Message Display
QA Contact: stephend → search
(Assignee)

Updated

10 years ago
Duplicate of this bug: 47029
You need to log in before you can comment on or make changes to this bug.