Last Comment Bug 293682 - Hook up Virtual Folder Properties
: Hook up Virtual Folder Properties
Status: VERIFIED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: All All
: -- normal (vote)
: seamonkey1.0alpha
Assigned To: Ian Neal
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-10 15:33 PDT by Ian Neal
Modified: 2006-01-06 12:16 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v0.1 (6.25 KB, patch)
2005-05-10 15:36 PDT, Ian Neal
mnyromyr: review-
Details | Diff | Review
Correct Patch v0.1 (Checked in) (1.27 KB, patch)
2005-05-11 05:57 PDT, Ian Neal
mnyromyr: review+
mozilla: superreview+
asa: approval1.8b2+
Details | Diff | Review
Strictness Patch v0.1a (Checked in) (1.08 KB, patch)
2005-05-22 09:26 PDT, Ian Neal
neil: review+
neil: superreview+
asa: approval1.8b2-
shaver: approval1.8b3+
Details | Diff | Review

Description Ian Neal 2005-05-10 15:33:25 PDT
At the moment you cannot edit existing saved searches (Virtual Folders) from the
context properties menu as you can in TB. Only part of bug 261199 was landed for
mailnews when compared to TB.
Comment 1 Ian Neal 2005-05-10 15:36:02 PDT
Created attachment 183208 [details] [diff] [review]
Patch v0.1

This patch:
* Adds the hook into MsgVirtualFolderProperties from MsgFolderProperties
Comment 2 Karsten Düsterloh 2005-05-11 03:01:40 PDT
Comment on attachment 183208 [details] [diff] [review]
Patch v0.1

>+  var isVirtualFolder = folder ? folder.flags & MSG_FOLDER_FLAG_VIRTUAL : false;

What's wrong with |var isVirtualFolder = folder && folder.flags &
MSG_FOLDER_FLAG_VIRTUAL;|?

>-  ShowMenuItem("folderPaneContext-markMailFolderAllRead", (numSelected <= 1) && isMailFolder);
>-  EnableMenuItem("folderPaneContext-markMailFolderAllRead", true);
>+  ShowMenuItem("folderPaneContext-markMailFolderAllRead", (numSelected <= 1) && isMailFolder && !isVirtualFolder);
>+  EnableMenuItem("folderPaneContext-markMailFolderAllRead", !isVirtualFolder);
> 
>-  ShowMenuItem("folderPaneContext-searchMessages", (numSelected<=1));
>+  ShowMenuItem("folderPaneContext-searchMessages", (numSelected<=1) && !isVirtualFolder);

While I agree that these do not work currently, I do find it hard to understand
why they shouldn't work in future. Maybe add a comment that these are just
disabled /for now/ until these shortcomings are fixed?

> function SetupCompactMenuItem(folderResource, numSelected)
> {
>   var folderTree = GetFolderTree();
>   var canCompact = GetFolderAttribute(folderTree, folderResource, "CanCompact") == "true";
>-  ShowMenuItem("folderPaneContext-compact", (numSelected <=1) && canCompact);
>   var folder = GetMsgFolderFromResource(folderResource);
>-  EnableMenuItem("folderPaneContext-compact", folder.isCommandEnabled("cmd_compactFolder"));
>+  var isVirtualFolder = folder ? folder.flags & MSG_FOLDER_FLAG_VIRTUAL : false;

See above.

> function IsCanSearchMessagesEnabled()
> {
>   var folderURI = GetSelectedFolderURI();
>   var server = GetServer(folderURI);
>-  return server.canSearchMessages;
>+  var folder = GetMsgFolderFromUri(folderURI, false);
>+  var isVirtualFolder = folder ? folder.flags & MSG_FOLDER_FLAG_VIRTUAL : false;

See above.


And, finally: My saved (newsgroup) search, stored in Local Folders, just has
two context menu entries: "Show in new Mail Window" and "Properties..." ---
with two separator lines in between...
Comment 3 Ian Neal 2005-05-11 05:57:51 PDT
Created attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

Sorry I attached the wrong patch v0.1 - the previous one was for another bug.
Comment 4 Karsten Düsterloh 2005-05-16 06:50:14 PDT
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

I still see issues with the saved folder properties dialog itself (like wrong
title, missing dropdown and JS errors), but these are beyond the scope of this
bug.
Comment 5 Ian Neal 2005-05-16 17:25:10 PDT
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

Title issue spun off into bug 294407
Comment 6 Ian Neal 2005-05-17 02:21:50 PDT
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

Requesting a= for suite-only, low risk patch.
Comment 7 Asa Dotzler [:asa] 2005-05-19 08:45:15 PDT
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

a=asa for seamonkey only change.
Comment 8 Ian Neal 2005-05-19 14:24:21 PDT
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

Checking in widgetglue.js;
new revision: 1.170; previous revision: 1.169
done
Comment 9 neil@parkwaycc.co.uk 2005-05-20 16:19:06 PDT
They get *their* own property dialog :-P
Comment 10 Serge Gautherie (:sgautherie) 2005-05-21 00:47:07 PDT
This checkin caused:
{{
Warning: function MsgFolderProperties does not always return a value
Source File: chrome://messenger/content/widgetglue.js
Line: 258, Column: 43
Source Code:
    return MsgVirtualFolderProperties(true);

Warning: function MsgFolderProperties does not always return a value
Source File: chrome://messenger/content/widgetglue.js
Line: 272
Source Code:
}
}}
Comment 11 neil@parkwaycc.co.uk 2005-05-21 16:44:40 PDT
Yeah, I just noticed that too.
Comment 12 Ian Neal 2005-05-22 09:26:23 PDT
Created attachment 184248 [details] [diff] [review]
Strictness Patch v0.1a (Checked in)

This patch:
* Fixes spelling of "their"
* Removes strictness error
Comment 13 Ian Neal 2005-05-22 12:42:56 PDT
Comment on attachment 184248 [details] [diff] [review]
Strictness Patch v0.1a (Checked in)

Requesting a= for simple, very low risk suite-only patch.
Comment 14 Asa Dotzler [:asa] 2005-05-23 13:35:28 PDT
Comment on attachment 184248 [details] [diff] [review]
Strictness Patch v0.1a (Checked in)

moving nomination to 1.8b3. We're very nearly wrapped up with b2.
Comment 15 Mike Shaver (:shaver -- probably not reading bugmail closely) 2005-06-01 11:37:19 PDT
Comment on attachment 184248 [details] [diff] [review]
Strictness Patch v0.1a (Checked in)

a=shaver, though I don't understand why the change is interesting!
Comment 16 Ian Neal 2005-06-01 18:43:29 PDT
Comment on attachment 184248 [details] [diff] [review]
Strictness Patch v0.1a (Checked in)

Checking in widgetglue.js;
new revision: 1.171; previous revision: 1.170
done
Comment 17 Serge Gautherie (:sgautherie) 2005-06-12 06:54:02 PDT
You may want to R.Fixed this bug now,
depending on comment 4 + comment 5.
Comment 18 Stephen Donner [:stephend] 2006-01-06 12:16:10 PST
Verified FIXED using build 2006-01-06-09 of trunk SeaMonkey under Windows XP.

Note You need to log in before you can comment on or make changes to this bug.