2006-03-07 [paul] 2.0.0cvs119
authorPaul Mangan <paul@claws-mail.org>
Tue, 7 Mar 2006 09:55:13 +0000 (09:55 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 7 Mar 2006 09:55:13 +0000 (09:55 +0000)
* src/folder.c
* src/folder.h
* src/folderview.c
immediately do alphabetical resort when
changing a folder's name
Patch by Pawel Pekala

ChangeLog
PATCHSETS
configure.ac
src/folder.c
src/folder.h
src/folderview.c

index c00fda3..0dbcd07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-03-07 [paul]      2.0.0cvs119
+
+       * src/folder.c
+       * src/folder.h
+       * src/folderview.c
+               immediately do alphabetical resort when
+               changing a folder's name
+               Patch by Pawel Pekala
+
 2006-03-07 [paul]      2.0.0cvs118
 
        * src/news.c
index 2a1b40c..847d87c 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.179.2.98 -r 1.179.2.99 src/imap.c;  cvs diff -u -r 1.2.2.15 -r 1.2.2.16 src/gtk/inputdialog.c;  ) > 2.0.0cvs116.patchset
 ( cvs diff -u -r 1.96.2.99 -r 1.96.2.100 src/textview.c;  ) > 2.0.0cvs117.patchset
 ( cvs diff -u -r 1.101.2.22 -r 1.101.2.23 src/news.c;  cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/news_gtk.c;  ) > 2.0.0cvs118.patchset
+( cvs diff -u -r 1.213.2.84 -r 1.213.2.85 src/folder.c;  cvs diff -u -r 1.87.2.25 -r 1.87.2.26 src/folder.h;  cvs diff -u -r 1.207.2.89 -r 1.207.2.90 src/folderview.c;  ) > 2.0.0cvs119.patchset
index 488c83f..1841bcf 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=118
+EXTRA_VERSION=119
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 279f5c5..eb6905e 100644 (file)
@@ -841,11 +841,17 @@ gint folder_item_rename(FolderItem *item, gchar *newname)
 
        if (retval >= 0) {
                FolderItemUpdateData hookdata;
+               FolderUpdateData hookdata2;
 
                hookdata.item = item;
                hookdata.update_flags = F_ITEM_UPDATE_NAME;
                hookdata.msg = NULL;
                hooks_invoke(FOLDER_ITEM_UPDATE_HOOKLIST, &hookdata);
+
+               hookdata2.folder = item->folder;
+               hookdata2.item = item;
+               hookdata2.update_flags = FOLDER_RENAME_FOLDERITEM;
+               hooks_invoke(FOLDER_UPDATE_HOOKLIST, &hookdata2);
        }
 
        return retval;
index cceea7c..b383bee 100644 (file)
@@ -104,7 +104,8 @@ typedef enum
        FOLDER_REMOVE_FOLDER            = 1 << 1,
        FOLDER_TREE_CHANGED             = 1 << 2,
        FOLDER_ADD_FOLDERITEM           = 1 << 3,
-       FOLDER_REMOVE_FOLDERITEM        = 1 << 4
+       FOLDER_REMOVE_FOLDERITEM        = 1 << 4,
+       FOLDER_RENAME_FOLDERITEM        = 1 << 5
 } FolderUpdateFlags;
 
 typedef enum
index 026727c..4ba3e61 100644 (file)
@@ -2410,7 +2410,11 @@ gboolean folderview_update_folder(gpointer source, gpointer userdata)
 
        if (hookdata->update_flags & FOLDER_ADD_FOLDERITEM)
                folderview_create_folder_node(folderview, hookdata->item);
-       else if (hookdata->update_flags & FOLDER_REMOVE_FOLDERITEM) {
+       else if (hookdata->update_flags & FOLDER_RENAME_FOLDERITEM) {
+               GtkCTreeNode *node = gtk_ctree_find_by_row_data(GTK_CTREE(ctree),
+                               NULL, folder_item_parent(hookdata->item));
+               folderview_sort_folders(folderview, node, hookdata->folder);
+       } else if (hookdata->update_flags & FOLDER_REMOVE_FOLDERITEM) {
                GtkCTreeNode *node;
 
                node = gtk_ctree_find_by_row_data(GTK_CTREE(ctree), NULL, hookdata->item);