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

NEW
Unassigned

Status

MailNews Core
Backend
16 years ago
a year ago

People

(Reporter: Juxi Leitner, Unassigned)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patchlove])

Attachments

(3 attachments, 4 obsolete attachments)

(Reporter)

Description

16 years ago
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
(Reporter)

Updated

16 years ago
Severity: normal → enhancement

Comment 1

16 years ago
see also bug 189117

I'm not sure if we can show the number of mails for multiple accounts.
(Reporter)

Comment 2

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

Comment 3

15 years ago
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
(Reporter)

Comment 4

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

Comment 5

14 years ago
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). :)
(Reporter)

Comment 6

14 years ago
but still only inbox emails are shown, so emails directly filtered to a
subdirectory are not shown as unread emails!

Comment 7

14 years ago
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

Comment 8

14 years ago
*** Bug 266322 has been marked as a duplicate of this bug. ***

Updated

14 years ago
Blocks: 246143

Comment 9

14 years ago
Changing from enhancement since the dependent (Firefox) bug is "major".
Severity: enhancement → normal

Updated

10 years ago
Component: MailNews: Notification → MailNews: Message Display
QA Contact: stephend → search

Updated

10 years ago
Assignee: mscott → nobody
QA Contact: search → message-display

Comment 10

7 years ago
Created attachment 553568 [details] [diff] [review]
Patch adding support for multiple accounts
Attachment #553568 - Flags: review?(dbienvenu)

Comment 11

7 years ago
Created attachment 553569 [details] [diff] [review]
Same patch, whitespace removed

Updated

7 years ago
Assignee: nobody → denhomer
Status: NEW → ASSIGNED

Comment 12

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

Comment 13

7 years ago
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.

Comment 14

7 years ago
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 15

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

Comment 16

7 years ago
ping, Ben, are you interested in driving this forward?

Comment 17

7 years ago
Yeah, excuse me, I totally forgot about this. I'll see that I can make the required changes somewhere this week.

Comment 18

7 years ago
Created attachment 565726 [details]
Patch reworked with comments.
Attachment #553568 - Attachment is obsolete: true
Attachment #565726 - Flags: review?(dbienvenu)

Comment 19

7 years ago
Created attachment 565727 [details]
Same updated patch, whitespace removed
Attachment #565726 - Attachment is obsolete: true
Attachment #565726 - Flags: review?(dbienvenu)

Comment 20

7 years ago
Created attachment 565728 [details]
Testscript - Unread mail powershell script

Comment 21

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

Comment 22

7 years ago
Created attachment 565729 [details] [diff] [review]
Patch reworked with comments.

Sorry, I messed up something, this should attach the correct patch.
Attachment #553569 - Attachment is obsolete: true
Attachment #565729 - Flags: review?(dbienvenu)

Comment 23

7 years ago
Created attachment 569375 [details] [diff] [review]
de-bitrotted patch

patch that applies on trunk.
Attachment #565729 - Attachment is obsolete: true
Attachment #569375 - Flags: review?(dbienvenu)
Attachment #565729 - Flags: review?(dbienvenu)

Comment 24

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

Comment 25

5 years ago
Ben, does patch  stilll apply for you ?
Flags: needinfo?(bugzilla)

Comment 26

5 years ago
Not really, haven't used that counter for a while now, and I doubt there is a real need for it.
Flags: needinfo?(bugzilla)

Updated

4 years ago
Flags: needinfo?(mozilla)
Whiteboard: [patchlove]

Updated

4 years ago
Assignee: bugzilla → nobody

Updated

4 years ago
Status: ASSIGNED → NEW

Updated

4 years ago
Attachment #569375 - Flags: review?(mozilla)

Comment 27

a year ago
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.
You need to log in before you can comment on or make changes to this bug.