Closed Bug 293682 Opened 19 years ago Closed 19 years ago

Hook up Virtual Folder Properties

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
seamonkey1.0alpha

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

Details

Attachments

(2 files, 1 obsolete file)

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.
Attached patch Patch v0.1 (obsolete) — Splinter Review
This patch:
* Adds the hook into MsgVirtualFolderProperties from MsgFolderProperties
Assignee: mail → bugzilla
Status: NEW → ASSIGNED
Attachment #183208 - Flags: review?(mnyromyr)
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...
Attachment #183208 - Flags: review?(mnyromyr) → review-
Sorry I attached the wrong patch v0.1 - the previous one was for another bug.
Attachment #183208 - Attachment is obsolete: true
Attachment #183279 - Flags: review?(mnyromyr)
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.
Attachment #183279 - Flags: review?(mnyromyr) → review+
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

Title issue spun off into bug 294407
Attachment #183279 - Flags: superreview?(bienvenu)
Attachment #183279 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

Requesting a= for suite-only, low risk patch.
Attachment #183279 - Flags: approval1.8b2?
Comment on attachment 183279 [details] [diff] [review]
Correct Patch v0.1 (Checked in)

a=asa for seamonkey only change.
Attachment #183279 - Flags: approval1.8b2? → approval1.8b2+
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
Attachment #183279 - Attachment description: Correct Patch v0.1 → Correct Patch v0.1 (Checked in)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
They get *their* own property dialog :-P
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:
}
}}
Target Milestone: --- → Seamonkey1.0alpha
Yeah, I just noticed that too.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This patch:
* Fixes spelling of "their"
* Removes strictness error
Attachment #184248 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #184248 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #184248 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #184248 - Flags: superreview+
Attachment #184248 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #184248 - Flags: review+
Comment on attachment 184248 [details] [diff] [review]
Strictness Patch v0.1a (Checked in)

Requesting a= for simple, very low risk suite-only patch.
Attachment #184248 - Flags: approval1.8b2?
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.
Attachment #184248 - Flags: approval1.8b3?
Attachment #184248 - Flags: approval1.8b2?
Attachment #184248 - Flags: approval1.8b2-
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!
Attachment #184248 - Flags: approval1.8b3? → approval1.8b3+
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
Attachment #184248 - Attachment description: Strictness Patch v0.1a → Strictness Patch v0.1a (Checked in)
You may want to R.Fixed this bug now,
depending on comment 4 + comment 5.
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Verified FIXED using build 2006-01-06-09 of trunk SeaMonkey under Windows XP.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: