Closed Bug 506004 Opened 15 years ago Closed 15 years ago

Impossible to rename a mail folder by clicking OK on the pop up rename window

Categories

(SeaMonkey :: MailNews: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0b2

People

(Reporter: my_spam_basket, Assigned: neil)

References

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1pre) Gecko/20090717 SeaMonkey/2.0b1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1pre) Gecko/20090717 SeaMonkey/2.0b1

OK button in popup windows for renaming email folders in SM mail is not functional.

Reproducible: Always

Steps to Reproduce:
1. create a new email folder in your account;
2. right click on it and choose "rename folder..." 
3. change folder name and try to close the pop up window that has been displayed with the OK button.
Actual Results:  
The OK button is not functional and the pop up windows never goes away.

Expected Results:  
The pop up window should close itself and the email folder name should be changed.

However, if I press the "enter" key, the pop up window correctly closes and the folder is renamed. Same thing from "File->Rename folder..." menu command.

This is, IMO, a very dysfunctional behavior for the average "point 'n click" user who may even not know that the "enter" key on his keyboard has the same effect of the OK button.

Since this bug affects a very basic function in SM mail, it should worth attention.
Confirmed, Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090723 SeaMonkey/2.0b2pre cannot rename a folder. Even worse, if
renaming an existing folder containing messages, the message/thread list
blanks and it appears that all messages are lost until you revisit that
account. Folder and .msf files seem unaffected.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-seamonkey2?
Version: unspecified → Trunk
JS Console says this:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFService.GetResource]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://messenger/content/msgMail3PaneWindow.js :: SelectFolder :: line 1427"  data: no]

For testing I created a new folder below Local Folders and tried to rename it.
Error ``selectedFolder.rename is not a function'' [x-] in file ``chrome://messenger/content/widgetglue.js'', line 115, character 0.
says Venkman
It looks like the code at http://hg.mozilla.org/comm-central/annotate/e9e09e92f7e0/suite/mailnews/widgetglue.js#329 (GetResourceFromUri) does not return a useful value to the RenameFolder function in line 105.
Interestingly GetMsgFolderFromUri(uri,false) works for me in Venkman. GetMsgFolderFromUri() delegates to MailUtils.getFolderForURI() which contains:

let rdfService = Cc['@mozilla.org/rdf/rdf-service;1']
                   .getService(Ci.nsIRDFService);
folder = rdfService.GetResource(aFolderURI);

while GetResourceFromUri() contains:

var RDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService();
RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
var resource = RDF.GetResource(uri);

I thought these two styles were equivalent?
This is a regression from bug 421443 - the old method used an nsIRDFResource but the new one needs an nsIMsgFolder.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #390443 - Flags: review?(mnyromyr)
Blocks: 421443
OS: Windows Vista → All
Hardware: x86 → All
I tried to add
"Depends on: 439364 460953"
but I get
"The following bug(s) would appear on both the "depends on" and "blocks" parts of the dependency tree if these changes are committed: 420506  460953  421443."

Then I suggest to R.Duplicate to bug 460953 (patch Bv1).
Attachment #390443 - Flags: review?(mnyromyr) → review+
Pushed changeset 57de5003c150 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 460953
Depends on: 439364
Flags: blocking-seamonkey2?
Target Milestone: --- → seamonkey2.0b2
Attachment #390443 - Attachment description: Proposed patch → Proposed patch [Checkin: Comment 9]
Blocks: 657607
No longer blocks: 657607
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: