Closed
Bug 38327
Opened 24 years ago
Closed 23 years ago
disable / enable "Send Unsent Messages" when appropriate
Categories
(SeaMonkey :: MailNews: Message Display, defect, P3)
SeaMonkey
MailNews: Message Display
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.3
People
(Reporter: nbaca, Assigned: doronr)
References
Details
(Keywords: polish)
Attachments
(7 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Build 2000-04-28-09M10: NT4, Linux 6.0, Mac 9.0
Overview: With only the Inbox or Trash folder selected the File menu should:
1. Disable
a. Open Message
b. Open/Save Attachment
c. Save As
- File
- Template
d. Send Unsent Messages (If no messages are in the Unsent Messages folder)
e. Rename Folder
f. Page Setup
g. Print Preview
h. Print
2. Enable:
a. Send Unsent Messages (If messages are in the Unsent Messages folder)
Note: The spec does not have this level of detail. Please state your opinion if
it differs.
Reporter | ||
Updated•24 years ago
|
QA Contact: lchiang → nbaca
Looks good. Actually, this applied to Inbox, Trash and Draft, Templates and
Sent (if they are set as the defaults to receive Drafts, Sent, Templates) as
well.
This also applied to any user created folder as well. Except, "Rename
Folder..." would need to be available.
Updated•24 years ago
|
Target Milestone: --- → M18
per mail triage: remove nsbeta3 nomination and move to future milestone. For
the short term, we will combine items here into three bugs (in 3pane) to address
for nsbetat3: 1. delete, change text, move menuitems; 2. enable/disable and
text changes on context (dynamic); 3. accelerator keys to work.
When this bug gets revisited after the first release, we'll need to see what
items remaining that need to be addressed.
Keywords: nsbeta3
Target Milestone: M18 → Future
I'm stealing this bug. But I have one question, I think i have a patch that
hides the attachment menu [it also makes the menu work...] is that ok or do you
really want me to disable it?
Assignee: putterman → timeless
OS: Windows 95 → All
Target Milestone: Future → ---
Comment 5•24 years ago
|
||
I think disabling would be good. It should also only be disabled if there's no
message displayed that has attachments. That's great if you have a fix to
implement the menu.
Assignee | ||
Comment 7•23 years ago
|
||
Assignee | ||
Comment 8•23 years ago
|
||
-> me
attached patch that fixes this bug (parts of it were already fixed, change
rename folder to show for user created ones and made sure send notsent was
hidden for non-notsent folders and greyed out if notsent was selected but empty).
Also made sure that "send notsent" context menu behaves correctly. cc:
hwaara/sspitzer, any comments or even r=/sr=?
thanks
Keywords: patch
Target Milestone: --- → mozilla0.9.1
r=timeless, please add //XXX intl warning to all relevant places
Comment 10•23 years ago
|
||
- var popupNode = document.getElementById('folderPaneContext');
+ var popupNode = document.getElementById('folderPaneContext');
Next time, attach a -uw if you intend to make whitespace changes.
+ var folderResource = RDF.GetResource(selectedItems[0].getAttribute('id'));
+ var msgFolder = folderResource.QueryInterface
(Components.interfaces.nsIMsgFolder);
I may be wrong, but isn't this where you usually use GetFirstSelectedMsgFolder
()?
+ ShowMenuItem("menu_sendunsentmsgs", specialFolder == 'Unsent Messages');
I don't think it's healthy to mix single quotes and double quotes like that.
Please use one of them and be consistent (as long as it doesn't affect the
code).
+ var unreadCount = msgFolder.getTotalMessages(false);
+ EnableMenuItem("menu_sendunsentmsgs", (unreadCount > 0));
unreadCount is misleading. What unreadCount is storing is the total amount of
messages - unread or read doesn't matter - that are in that folder. Please
change the name of that variable to reflect its contents.
Keywords: approval
Comment 11•23 years ago
|
||
I'm requesting timeless to revoke his r=, since doron asked me for review, and
since the patch is not error-free (yet).
Assignee | ||
Comment 12•23 years ago
|
||
Assignee | ||
Comment 13•23 years ago
|
||
new patch, i did a diff -u cause the spacing changes are too few to warrant 2
patches.
Comment 14•23 years ago
|
||
+ var msgFolder = [...]
Can you rename msgFolder in all places there and in the other file to
be "unsentFolder" (which really reflects what folder it is)?
+ ShowMenuItem("folderPaneContext-sendUnsentMessages", (unsentCount > 0));
+ EnableMenuItem("folderPaneContext-sendUnsentMessages", true);
You don't want to Enable the menuitem if it's not visible. So do something like
this:
if (unsentCount > 0)
{
ShowMenuItem(..., true);
EnableMenuItem(..., true);
}
after those changes. r=hwaara
Assignee | ||
Comment 15•23 years ago
|
||
Assignee | ||
Comment 16•23 years ago
|
||
new patch that reflects hwaara's comments. any sr=?
Status: NEW → ASSIGNED
Assignee | ||
Comment 17•23 years ago
|
||
0.9.2, unless someone sr='s this before the 0.9.1 deadline
Keywords: review
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Comment 18•23 years ago
|
||
r=hwaara
I doubt this is a good time to ask for sr= for non-0.9.1 blockers, so I would
re-ask after the freeze if I were you.
Assignee | ||
Comment 19•23 years ago
|
||
can i get an sr= on this? sspitzer perhaps?
Assignee | ||
Comment 20•23 years ago
|
||
-> 0.9.3, need sr
Whiteboard: needs sr=
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Comment 21•23 years ago
|
||
doron, thanks for being patient. I'll review this later today.
Comment 22•23 years ago
|
||
sorry again, I did not get a chance to get to it.
on my plate for tomorrow.
Comment 23•23 years ago
|
||
comments:
1) rename is already properly enabled / disabled. see IsRenameFolderEnabled()
it uses the CanRename property of nsIMsgFolder (indirectly, going through the
folder datasource.) more than just the "special folders" can't be renamed.
2) "Send Unsent Messages" should always appear in the menu, but should be
disabled if there are no unsent messages. (your patch hides it unless the user
selected the unsent msgs folder, which is incorrect.)
we need to use cmd_sendUnsentMsgs and implement IsSendUnsentMsgsEnabled(),
which is non-trivial.
I've got the start of this fix, based on your initial. I'll attach it and you
can run with it.
Comment 24•23 years ago
|
||
updating summary to reflect the issue.
Summary: 3pane, Inbox/Trash selected: File menu → disable / enable (or hide, for folder content menu) "Send Unsent Messages" when appropriate
Comment 25•23 years ago
|
||
Comment 26•23 years ago
|
||
whoops, minor revision coming to that patch.
Comment 27•23 years ago
|
||
the patch I'm about to submit is blocked by some interface changes that are
part of mohan's fix to #79865
Depends on: 79865
Comment 28•23 years ago
|
||
Assignee | ||
Comment 29•23 years ago
|
||
Seems someone fixed the rename issue, it was not working for me before.
as for IsSendUnsentMsgsEnabled(), is the way I did it before wrong?
+ var folderResource = RDF.GetResource(selectedItems[0].getAttribute('id'));
+ var msgFolder =
folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
+ var unsentCount = msgFolder.getTotalMessages(false);
Comment 30•23 years ago
|
||
+ var folderResource = RDF.GetResource(selectedItems[0].getAttribute('id'));
+ var msgFolder =
folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
+ var unsentCount = msgFolder.getTotalMessages(false);
that works if your selected folder is the unsent messages folder. what if it
isn't? "send unsent messages" should be enabled if there are unsent messages,
no matter what folder is selected.
but we should use your code in my new IsSendUnsentMsgsEnabled(folderNode), when
we've got a folderNode.
we only get a folderNode when we're coming from the context menu for
the "Unsent Messages" folder.
I'll update the patch.
Comment 31•23 years ago
|
||
Comment 32•23 years ago
|
||
working on this bug, I've found some related problems. (these problems aren't
cause by this fix, they've been there all along.)
1) can't send unsent if no folder selected
2) if fail in the middle of send unsent, still thinks there is no unsent
3) sending unsent needs to loop over all identities
4) migrating a pop account leaves you with two "unsent messages" folders: one
on "Local Folders", on on the pop account. we set the sendlater uri pref to
the pop folder, but if we were to delete the pop account, sending later would
break.
I'll log additional bugs on these issues.
Comment 33•23 years ago
|
||
reviewed and tested. looks good. r=bhuvan.
caveat : once mohan lands his fix for bug 79865 (before this one), there will
be conflicts. watch out.
Comment 34•23 years ago
|
||
I plan on letting mohan land first, and then I'll fix the conflicts.
Comment 35•23 years ago
|
||
if mohan's landing requires a change to this patch, I'll go for another round
of reviews.
Comment 36•23 years ago
|
||
sr=mscott
Comment 37•23 years ago
|
||
"If its items that are only temporarily unavailable, because the is no trash to
empty or no unsent messages to send, I would think disabling is appropriate"
I need to update the patch to disable (instead of hide) the "Send Unsent
Messages" item in the context menu.
also, mohan has landed, so I'll attach a new patch that is current to the trunk.
Summary: disable / enable (or hide, for folder content menu) "Send Unsent Messages" when appropriate → disable / enable "Send Unsent Messages" when appropriate
Comment 38•23 years ago
|
||
fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 39•23 years ago
|
||
Reporter | ||
Comment 40•23 years ago
|
||
Build 2001-08-10-03: WinMe
Build 2001-08-10-04: Mac 9.04
Build 2001-08-10-06: Linux RH 6.2
Verified Fixed.
Unsent Messages menu item is enabled when a message is in the Unsent Messages
folder and disabled if no messages are in the Unsent Messages folder (POP, IMAP,
News).
Also noticed that the Open Message appeared disabled when appropriate.
Also the Rename Folder menu item appeared disabled for "Special Folders" and
enabled for all others.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•