2007-08-19 [paul] 2.10.0cvs132
authorPaul Mangan <paul@claws-mail.org>
Sun, 19 Aug 2007 10:15:21 +0000 (10:15 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 19 Aug 2007 10:15:21 +0000 (10:15 +0000)
* src/foldersel.c
* src/folderview.c
* src/summaryview.c
fix bug 1286, 'Can't move a folder into a "Folders
Only" folder'

ChangeLog
PATCHSETS
configure.ac
src/foldersel.c
src/folderview.c
src/summaryview.c

index 2afd811f0ba1a290cb5c2af3023aab8ae699617f..67cbfa759c533fd9c5154b8dd5ebc536f749e0dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-08-19 [paul]      2.10.0cvs132
+
+       * src/foldersel.c
+       * src/folderview.c
+       * src/summaryview.c
+               fix bug 1286, 'Can't move a folder into a "Folders
+               Only" folder'
+
 2007-08-18 [ticho]     2.10.0cvs131
 
        * src/editaddress_other_attributes_ldap.c
index cc4a060c2d0c2a3e9a86092db5350cf014950e8d..651b8862add34ca6afe5dcc8a8533a2d796f9cb1 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.319 -r 1.395.2.320 src/summaryview.c;  ) > 2.10.0cvs129.patchset
 ( cvs diff -u -r 1.382.2.402 -r 1.382.2.403 src/compose.c;  cvs diff -u -r 1.204.2.146 -r 1.204.2.147 src/prefs_common.c;  cvs diff -u -r 1.103.2.92 -r 1.103.2.93 src/prefs_common.h;  cvs diff -u -r 1.1.2.18 -r 1.1.2.19 src/prefs_send.c;  cvs diff -u -r 1.17.2.40 -r 1.17.2.41 src/send_message.c;  ) > 2.10.0cvs130.patchset
 ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/editaddress_other_attributes_ldap.c;  ) > 2.10.0cvs131.patchset
+( cvs diff -u -r 1.26.2.33 -r 1.26.2.34 src/foldersel.c;  cvs diff -u -r 1.207.2.174 -r 1.207.2.175 src/folderview.c;  cvs diff -u -r 1.395.2.320 -r 1.395.2.321 src/summaryview.c;  ) > 2.10.0cvs132.patchset
index 766b3ca9a55047990f14c290905615d74d806405..faa877f7997457fdd9c89662b6a6cebe10b49ab1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=131
+EXTRA_VERSION=132
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 3fee1fa07e8f05c2626c27145ff2c1d5930824a1..011202d438cd29c200fe1f94ba21de1e1d16c4cb 100644 (file)
@@ -198,7 +198,7 @@ FolderItem *foldersel_folder_sel(Folder *cur_folder, FolderSelectionType type,
        gtk_tree_store_clear(tree_store);
 
        if (!cancelled &&
-           selected_item && selected_item->path && !selected_item->no_select) {
+           selected_item && selected_item->path) {
                folder_item = selected_item;
                return folder_item;
        } else
@@ -494,7 +494,7 @@ static gboolean foldersel_selected(GtkTreeSelection *selection,
                           FOLDERSEL_FOLDERITEM, &item, -1);
 
        selected_item = item;
-       if (selected_item && selected_item->path && !selected_item->no_select) {
+       if (selected_item && selected_item->path) {
                gchar *id;
                id = folder_item_get_identifier(selected_item);
                gtk_entry_set_text(GTK_ENTRY(entry), id);
index 8b181701d94821d6097b21be70b790ad6e6a9ecb..6d6dd2b0c37c79c19952ce5773b7537f8e66cd23 100644 (file)
@@ -1925,13 +1925,14 @@ static void folderview_set_sens_and_popup_menu(FolderView *folderview, gint row,
 #define SET_SENS(name, sens) \
        menu_set_sensitive(fpopup_factory, name, sens)
 
+       SET_SENS("/Download messages", !item->no_select);
        SET_SENS("/Mark all read", item->unread_msgs >= 1);
        SET_SENS("/Search folder...", item->total_msgs >= 1 && 
                 folderview->selected == folderview->opened);
        SET_SENS("/Run processing rules", item->prefs->processing &&
                 item->total_msgs >= 1);
-       SET_SENS("/Properties...", TRUE);
-       SET_SENS("/Processing...", item->node->parent != NULL);
+       SET_SENS("/Properties...", !item->no_select);
+       SET_SENS("/Processing...", item->node->parent != NULL && !item->no_select);
        if (item == folder->trash || item == special_trash
            || folder_has_parent_of_type(item, F_TRASH)) {
                GSList *msglist = folder_item_get_msg_list(item);
@@ -2158,7 +2159,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
                return;
        }
        item = gtk_ctree_node_get_row_data(ctree, row);
-       if (!item || item->no_select) {
+       if (!item) {
                END_TIMING();
                folderview->open_folder = FALSE;
                return;
@@ -2203,7 +2204,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
        main_window_cursor_wait(folderview->mainwin);
 
        res = folder_item_open(item);
-       if (res == -1) {
+       if (res == -1 && item->no_select == FALSE) {
                main_window_cursor_normal(folderview->mainwin);
                STATUSBAR_POP(folderview->mainwin);
 
@@ -2213,7 +2214,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
                can_select = TRUE;
                END_TIMING();
                return;
-        } else if (res == -2) {
+        } else if (res == -2 && item->no_select == FALSE) {
                PostponedSelectData *data = g_new0(PostponedSelectData, 1);
                data->ctree = ctree;
                data->row = row;
@@ -2998,6 +2999,11 @@ static void folderview_drag_received_cb(GtkWidget        *widget,
                        item = gtk_ctree_node_get_row_data(GTK_CTREE(widget), node);
                        src_item = folderview->summaryview->folder_item;
 
+                       if (item->no_select) {
+                               alertpanel_error(_("The destination folder can only be used to "
+                                                  "store subfolders."));
+                               return;
+                       }
                        /* re-check (due to acceptable possibly set for folder moves */
                        if (!(item && item->folder && item->path && !item->no_select && 
                              src_item && src_item != item && FOLDER_CLASS(item->folder)->copy_msg != NULL)) {
@@ -3044,8 +3050,7 @@ static void folderview_drag_received_cb(GtkWidget        *widget,
                                !folder_has_parent_of_type(src_item, F_DRAFT) &&
                                !folder_has_parent_of_type(src_item, F_QUEUE) &&
                                !folder_has_parent_of_type(src_item, F_TRASH);
-                       if (!item || item->no_select || !src_item 
-                       ||  !folder_is_normal) {
+                       if (!item || !src_item || !folder_is_normal) {
                                gtk_drag_finish(drag_context, FALSE, FALSE, time);                      
                                return;
                        }
index 1d0c58277a7d021eed45c4e9a394f34a265289fc..53affb1cb56343a0deb78856d393959526bce7f8 100644 (file)
@@ -4177,6 +4177,12 @@ void summary_move_selected_to(SummaryView *summaryview, FolderItem *to_folder)
                return;
        }
 
+       if (to_folder->no_select) {
+               alertpanel_error(_("The destination folder can only be used to "
+                                  "store subfolders."));
+               return;
+       }
+
        START_LONG_OPERATION(summaryview, FALSE); 
 
        for (cur = GTK_CLIST(summaryview->ctree)->selection;
@@ -4268,6 +4274,12 @@ void summary_copy_selected_to(SummaryView *summaryview, FolderItem *to_folder)
                return;
        }
 
+       if (to_folder->no_select) {
+               alertpanel_error(_("The destination folder can only be used to "
+                                  "store subfolders."));
+               return;
+       }
+
        START_LONG_OPERATION(summaryview, FALSE);
 
        for (cur = GTK_CLIST(summaryview->ctree)->selection;