Remove last outside gtk_cmclist_freeze/thaw for summaryview&folderview ctrees.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 22 Jul 2016 18:46:54 +0000 (20:46 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 22 Jul 2016 18:50:25 +0000 (20:50 +0200)
More code maintenance to isolate summaryview and folderview
widgets' internals behind an API.

src/news_gtk.c
src/plugins/att_remover/att_remover.c

index b5d3fe1..e49c2b8 100644 (file)
@@ -149,7 +149,6 @@ static FolderItem *news_find_child_item(FolderItem *item, const gchar *path)
 static void subscribe_newsgroup_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
-       GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
        Folder *folder;
        FolderItem *item;
        FolderItem *rootitem;
@@ -196,7 +195,7 @@ static void subscribe_newsgroup_cb(GtkAction *action, gpointer data)
                gnode = next;
        }
 
-       gtk_cmclist_freeze(GTK_CMCLIST(ctree));
+       folderview_freeze(folderview);
 
        /* add subscribed newsgroups */
        for (cur = new_subscr; cur != NULL; cur = cur->next) {
@@ -216,7 +215,7 @@ static void subscribe_newsgroup_cb(GtkAction *action, gpointer data)
                hooks_invoke(FOLDER_UPDATE_HOOKLIST, &hookdata);
        }
 
-       gtk_cmclist_thaw(GTK_CMCLIST(ctree));
+       folderview_thaw(folderview);
 
        slist_free_strings_full(new_subscr);
 
index c1cec12..a76f2a8 100644 (file)
@@ -173,7 +173,7 @@ static void remove_attachments_cb(GtkWidget *widget, AttRemover *attremover)
        }
 
        main_window_cursor_wait(mainwin);
-       gtk_cmclist_freeze(GTK_CMCLIST(summaryview->ctree));
+       summary_freeze(summaryview);
        folder_item_update_freeze();
        inc_lock();
        
@@ -242,7 +242,7 @@ static void remove_attachments_cb(GtkWidget *widget, AttRemover *attremover)
                         
        inc_unlock();
        folder_item_update_thaw();
-       gtk_cmclist_thaw(GTK_CMCLIST(summaryview->ctree));
+       summary_thaw(summaryview);
        main_window_cursor_normal(mainwin);
 
        if (msgnum > 0)
@@ -423,7 +423,7 @@ static void remove_attachments(GSList *msglist)
                return;
 
        main_window_cursor_wait(summaryview->mainwin);
-       gtk_cmclist_freeze(GTK_CMCLIST(summaryview->ctree));
+       summary_freeze(summaryview);
        folder_item_update_freeze();
        inc_lock();
 
@@ -452,7 +452,7 @@ static void remove_attachments(GSList *msglist)
 
        inc_unlock();
        folder_item_update_thaw();
-       gtk_cmclist_thaw(GTK_CMCLIST(summaryview->ctree));
+       summary_thaw(summaryview);
        main_window_cursor_normal(summaryview->mainwin);
 
        if (msgnum > 0) {