Open
Bug 346747
Opened 18 years ago
Updated 2 years ago
Add Rename and Delete Support to Folder Views
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: mscott, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
5.88 KB,
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
2.02 KB,
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
Currently, if you rename or delete a folder while within a view like favorite folders, you have to change the folder view to something else, then cycle back in order to see the renamed folder.
Reporter | ||
Comment 1•18 years ago
|
||
my fix for this works best with the fix for Bug 346378
Status: NEW → ASSIGNED
Depends on: 346378
Reporter | ||
Comment 2•18 years ago
|
||
This change fixes rename and lays the foundation for folder deletion from within a view like favorites.
When adding and removing items after the datasource was built the template builder was never re-building with the new items. The main fix is explained here:
+nsresult nsMsgFlatFolderDataSource::OnItemAddedOrRemoved(nsIRDFResource *parentItem, nsISupports *item, PRBool added)
{
- const char *uri;
- nsCAutoString dsUri(m_dsName);
- dsUri.Append(":/");
+ // When a folder is added or removed, parentItem is the parent folder and item is the folder being
+ // added or removed. In a flat data source, there is no arc in the graph between the parent folder
+ // and the folder being added or removed. Our flat data source root (i.e. mailnewsunreadfolders:/) has
+ // an arc with the child property to every folder in the data source. We must change parentItem
+ // to be our data source root before calling nsMsgFolderDataSource::OnItemAddedOrRemoved. This ensures
+ // that datasource listeners such as the template builder properly handle add and remove
+ // notifications on the flat datasource.
+ return nsMsgFolderDataSource::OnItemAddedOrRemoved(m_rootResource, item, added);
+}
With this patch you can now rename folders in a folder view without having to cycle away and back in order to actually see the renamed item.
Attachment #231517 -
Flags: superreview?(bienvenu)
Reporter | ||
Comment 3•18 years ago
|
||
Comment on attachment 231517 [details] [diff] [review]
fix for renaming
Rename just failed for me after renaming a folder 4 or 5 times. This patch still isn't interacting right with the change to Bug 346747.
Attachment #231517 -
Flags: superreview?(bienvenu) → superreview-
Updated•18 years ago
|
Attachment #231517 -
Flags: superreview- → superreview+
Reporter | ||
Comment 4•18 years ago
|
||
this tweaks how we set the flags on the newfolder during the rename operation. I was getting into scenarios where the data source was getting told of the addition in OnItemAdded, but the favorites flag hadn't been set on newfolder in nsLocalMailFolder::Rename yet.
Note: rename for most recent folders doesn't work yet, but rename works in the rest of the views now.
Attachment #231517 -
Attachment is obsolete: true
Attachment #231521 -
Flags: superreview?(bienvenu)
Comment 5•18 years ago
|
||
Comment on attachment 231521 [details] [diff] [review]
[fixed branch and trunk] updated fix
that worked for me.
Attachment #231521 -
Flags: superreview?(bienvenu) → superreview+
Reporter | ||
Comment 6•18 years ago
|
||
Comment on attachment 231521 [details] [diff] [review]
[fixed branch and trunk] updated fix
leaving open for some of the remaining issues with delete and with rename from the recent folders view.
Attachment #231521 -
Attachment description: updated fix → [fixed branch and trunk] updated fix
Reporter | ||
Comment 7•18 years ago
|
||
This seemed like the best spot to do this, let me know if you disagree. When deleting a local folder to the Trash folder, we want to clear the favorite folder flag otherwise the folder stays in the favorites view because th folder still exists (under Trash) and it still has the favorites property set on it.
Oddly enough, the favorites flag is already getting cleared when deleting an imap folder to the imap trash folder. I need to understand why that is.
Attachment #231528 -
Flags: superreview?(bienvenu)
Comment 8•18 years ago
|
||
Comment on attachment 231528 [details] [diff] [review]
[fixed branch and trunk] fix for deleting local folders from the favorites view
yes, that looks good.
IMAP case is async, which might be why the favorite flag is getting cleared.
Attachment #231528 -
Flags: superreview?(bienvenu) → superreview+
Reporter | ||
Updated•18 years ago
|
Attachment #231528 -
Attachment description: fix for deleting local folders from the favorites view → [fixed branch and trunk] fix for deleting local folders from the favorites view
Comment 9•18 years ago
|
||
rename and delete seem to be working for me on the trunk in folder views - should we close this, or are there still outstanding issues?
Comment 10•18 years ago
|
||
Unflagging a favorite folder when we're in this view doesn't work too. We have to cycle to refresh the view.
Comment 11•17 years ago
|
||
David, close this one out? STM other bugs cover issues like comment 10.
Updated•16 years ago
|
Assignee: mscott → nobody
Status: ASSIGNED → NEW
Updated•15 years ago
|
Target Milestone: Thunderbird2.0 → ---
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•