Open Bug 196657 Opened 22 years ago Updated 2 years ago

Windows XP logon screen shows just unread messages of one account's inbox

Categories

(MailNews Core :: Backend, defect)

x86
Windows XP
defect

Tracking

(Not tracked)

People

(Reporter: juxi.leitner, Unassigned)

References

Details

(Whiteboard: [patchlove])

Attachments

(3 files, 4 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212

Windows XP shows when you go to the logon screen the number of unread email
messages! Which is a nice thing, since you seen when new emails were coming in!

But it just shows the unread messages of one account (if you have multiple in
your Mozilla Mail the others are just skipped). And just the emails unread in
your inbox, since I use filtering for various lists I belong to, they are all in
subfolders of my inbox, and so not counted!!!
e.g. 
Inbox (100)
  List 1 (10)
  List 2 (20)

Here win XP just shows 100 unread messages though there are 130! =)


Reproducible: Always

Steps to Reproduce:
1. Select one email message from your inbox as unread
2. Check your winXP logon screen
3. Move unread emails from your inbox to the subfolder
4. Check your WinXP Logon screen

Actual Results:  
There were two different numbers though I just moved the email!

Expected Results:  
Keep the same number =) since the email is still unread
Severity: normal → enhancement
see also bug 189117

I'm not sure if we can show the number of mails for multiple accounts.
ok, I guess that's made with windows api, right?
And It looks like you are sending a number (int I guess) and a string.
Maybe just try to show the sum of all and the string would be "in 3 Accounts" or
even "Account1(count)/Account2(count)/Account3(count)"....

or if you send two strings you can split it into
"10/12/13" (for the counts) and
"acc1/acc2/acc3"

The thing is I don't know to much about how you must call the windows api
function ...
Confirming with build 2003122009.

Currently only the number of new messages of the Default Account is shown in the
Windows XP logon screen.

I think it would be better to show the sum of the new messages of all accounts
(perhaps minus the new messages inside the Junk and Trash folders).
Status: UNCONFIRMED → NEW
Ever confirmed: true
you can add multiple accounts to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UnreadMail
(for each mail account a single representation) then the emails are added up,
but what still would be cool is something that shows all emails not just inbox
emails (for ppl with lots of subdirectories and autmated filtering of incoming
mails)
No need to sum up the unread in all accounts, XP is more than happy to have
multiple accounts stored - it'll show the total normally, then a click reveals
the accounts + unread number for each (I'm told).

I've been hacking the mail code to do the unread mail count stuff on pre-XP
systems (so that Firefox's code can use it), so I *may* have a look at this (no
promises). :)
but still only inbox emails are shown, so emails directly filtered to a
subdirectory are not shown as unread emails!
True, my comment mid-aired with yours and I didn't edit it. :)

Counting non-inbox unread would take more work, and then there's the issue of
unread mails in Local Folders...
Product: Browser → Seamonkey
*** Bug 266322 has been marked as a duplicate of this bug. ***
Blocks: 246143
Changing from enhancement since the dependent (Firefox) bug is "major".
Severity: enhancement → normal
Component: MailNews: Notification → MailNews: Message Display
QA Contact: stephend → search
Assignee: mscott → nobody
QA Contact: search → message-display
Attachment #553568 - Flags: review?(dbienvenu)
Attached patch Same patch, whitespace removed (obsolete) — Splinter Review
Assignee: nobody → denhomer
Status: NEW → ASSIGNED
Moving to MailNews-Core since this is shared code with Thunderbird.
Component: MailNews: Message Display → Backend
Product: SeaMonkey → MailNews Core
QA Contact: message-display → backend
Does Windows 7 show you the same info, and if so, what do I have to set to get it to do so? I don't have access to XP here.
OnItemAdded/Removed get called every time a message is added/deleted, not just every time a folder is added/deleted. Was your intent to just to catch folders getting added/removed? If so, you should QI the item that was added/removed to see if it's an nsIMsgFolder or not before doing anything else.
Comment on attachment 553568 [details] [diff] [review]
Patch adding support for multiple accounts

thx for the patch.

minusing based on questions about OnItemAdded/Removed handling

some style nits:

+  if ( aItem ) 

no spaces before or after () - two instances of this

+    for(PRUint32 i=0; i < mInboxArray.Length(); i++) {

space after, for, and around '=' - several instances of this as well

+  struct nsInbox {
+	nsCString mFolderURI;
+    nsCString mInboxURI;

looks like a tab snuck in here (or bad spacing)

can you make this a class:

+  struct nsInbox {
+	nsCString mFolderURI;


and any info about how to test this with Windows 7 would be helpful.
Attachment #553568 - Flags: review?(dbienvenu) → review-
ping, Ben, are you interested in driving this forward?
Yeah, excuse me, I totally forgot about this. I'll see that I can make the required changes somewhere this week.
Attached file Patch reworked with comments. (obsolete) —
Attachment #553568 - Attachment is obsolete: true
Attachment #565726 - Flags: review?(dbienvenu)
Attachment #565726 - Attachment is obsolete: true
Attachment #565726 - Flags: review?(dbienvenu)
Comment on attachment 565728 [details]
Testscript - Unread mail powershell script

Windows 7 doesn't provide an option to show the number anywhere natively. Other programs do use the same API though for retrieving the amount of unread mails. (for example, logitech setpoint software to show the number of unread mails)
I attached a windows powershell script which invokes the counterpart api SHGetUnreadMailCount which returns the amount of unread mails for the current user.
Trick is, for scripts to execute you need to set your powershell execution policy, take a quick glance over the script, it doesn't contain fishy stuff.
Steps:
-Run powershell as administrator (needed to change executionpolicy)
-Check current execution policy with <get-executionpolicy>
-Change if needed to unrestricted: <set-executionpolicy unrestricted>
-Execute attached script and check output
-Change execution policy back to original value (in my case restricted): <set-executionpolicy restricted>
Attached patch Patch reworked with comments. (obsolete) — Splinter Review
Sorry, I messed up something, this should attach the correct patch.
Attachment #553569 - Attachment is obsolete: true
Attachment #565729 - Flags: review?(dbienvenu)
patch that applies on trunk.
Attachment #565729 - Attachment is obsolete: true
Attachment #569375 - Flags: review?(dbienvenu)
Attachment #565729 - Flags: review?(dbienvenu)
(In reply to David :Bienvenu from comment #23)
> Created attachment 569375 [details] [diff] [review]
> de-bitrotted patch
> 
> patch that applies on trunk.

bienvenu, did you really mean to set request review of self?
Flags: needinfo?(mozilla)
Ben, does patch  stilll apply for you ?
Flags: needinfo?(bugzilla)
Not really, haven't used that counter for a while now, and I doubt there is a real need for it.
Flags: needinfo?(bugzilla)
Flags: needinfo?(mozilla)
Whiteboard: [patchlove]
Assignee: bugzilla → nobody
Status: ASSIGNED → NEW
Attachment #569375 - Flags: review?(mozilla)
Is this applicable to Windows versions than XP and Vista ?
They also have this but never seen as I always use TB. I need to configure Outlook with Win 10 at work if this is possible and it works.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: