2006-09-28 [colin] 2.5.2cvs19
authorColin Leroy <colin@colino.net>
Thu, 28 Sep 2006 19:10:14 +0000 (19:10 +0000)
committerColin Leroy <colin@colino.net>
Thu, 28 Sep 2006 19:10:14 +0000 (19:10 +0000)
* src/action.c
* src/compose.c
* src/folderview.c
* src/mainwindow.c
* src/messageview.c
* src/summary_search.c
* src/toolbar.c
Avoid using summaryview->ctree directly

ChangeLog
PATCHSETS
configure.ac
src/action.c
src/compose.c
src/folderview.c
src/mainwindow.c
src/messageview.c
src/summary_search.c
src/toolbar.c

index e472a9d1bf27a204b153df17b59d4f12f20c4966..e4eb2bf46d9331ea67818e6b5d6a03678888cb6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-09-28 [colin]     2.5.2cvs19
+
+       * src/action.c
+       * src/compose.c
+       * src/folderview.c
+       * src/mainwindow.c
+       * src/messageview.c
+       * src/summary_search.c
+       * src/toolbar.c
+               Avoid using summaryview->ctree directly
+
 2006-09-28 [colin]     2.5.2cvs18
 
        * src/summaryview.c
index 000625c7f78e45b9d19909f8982de82308181937..98cbc0857e02698baec04fac54f4f7c37d40a15a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.123 -r 1.207.2.124 src/folderview.c;  cvs diff -u -r 1.1.4.32 -r 1.1.4.33 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/gtk/gtksctree.h;  ) > 2.5.2cvs16.patchset
 ( cvs diff -u -r 1.115.2.105 -r 1.115.2.106 src/main.c;  ) > 2.5.2cvs17.patchset
 ( cvs diff -u -r 1.395.2.256 -r 1.395.2.257 src/summaryview.c;  cvs diff -u -r 1.68.2.27 -r 1.68.2.28 src/summaryview.h;  ) > 2.5.2cvs18.patchset
+( cvs diff -u -r 1.12.2.37 -r 1.12.2.38 src/action.c;  cvs diff -u -r 1.382.2.312 -r 1.382.2.313 src/compose.c;  cvs diff -u -r 1.207.2.124 -r 1.207.2.125 src/folderview.c;  cvs diff -u -r 1.274.2.151 -r 1.274.2.152 src/mainwindow.c;  cvs diff -u -r 1.94.2.107 -r 1.94.2.108 src/messageview.c;  cvs diff -u -r 1.15.2.33 -r 1.15.2.34 src/summary_search.c;  cvs diff -u -r 1.43.2.53 -r 1.43.2.54 src/toolbar.c;  ) > 2.5.2cvs19.patchset
index 584b3dca58fc22544222030ad86ca150d9a7dcd1..6189d5c89a5282df42bcb971dff7767161595863 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=18
+EXTRA_VERSION=19
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 636da4b2d6a612fc39844005815457dd3a8221c9..d47bcccb812a5111da4b04d403d7aa2e4e1062b8 100644 (file)
@@ -619,7 +619,7 @@ static gboolean execute_filtering_actions(gchar *action, GSList *msglist)
        if (summaryview) {
                summary_lock(summaryview);                              
                main_window_cursor_wait(mainwin);               
-               gtk_clist_freeze(GTK_CLIST(summaryview->ctree));        
+               summary_freeze(summaryview);    
                folder_item_update_freeze();                            
        }
 
@@ -627,7 +627,7 @@ static gboolean execute_filtering_actions(gchar *action, GSList *msglist)
 
        if (summaryview) {
                folder_item_update_thaw();                              
-               gtk_clist_thaw(GTK_CLIST(summaryview->ctree));          
+               summary_thaw(summaryview);              
                main_window_cursor_normal(mainwin);     
                summary_unlock(summaryview);                            
                summary_show(summaryview, summaryview->folder_item);
index 2aab7cad20edee7ae1d603052226203669cc0a50..b37aca5545168c129ea6fa838bec1ea0b5f997e0 100644 (file)
@@ -8556,7 +8556,7 @@ static void compose_attach_drag_received_cb (GtkWidget            *widget,
        if (gdk_atom_name(data->type) && 
            !strcmp(gdk_atom_name(data->type), "text/uri-list")
            && gtk_drag_get_source_widget(context) != 
-               mainwindow_get_mainwindow()->summaryview->ctree) {
+               summary_get_main_widget(mainwindow_get_mainwindow()->summaryview)) {
                list = uri_list_extract_filenames((const gchar *)data->data);
                for (tmp = list; tmp != NULL; tmp = tmp->next)
                        compose_attach_append
@@ -8566,7 +8566,7 @@ static void compose_attach_drag_received_cb (GtkWidget            *widget,
                list_free_strings(list);
                g_list_free(list);
        } else if (gtk_drag_get_source_widget(context) 
-                  == mainwindow_get_mainwindow()->summaryview->ctree) {
+                  == summary_get_main_widget(mainwindow_get_mainwindow()->summaryview)) {
                /* comes from our summaryview */
                SummaryView * summaryview = NULL;
                GSList * list = NULL, *cur = NULL;
index d4117d60f516043676e4b0a7f3489408dddc8ecb..6692e51742e006e1cce1de72030ff52b3a21d128 100644 (file)
@@ -782,10 +782,10 @@ static void mark_all_read_cb(FolderView *folderview, guint action,
        summary_lock(folderview->summaryview);
        folder_item_update_freeze();
        if (folderview->summaryview->folder_item == item)
-               gtk_clist_freeze(GTK_CLIST(folderview->summaryview->ctree));
+               summary_freeze(folderview->summaryview);
        folderutils_mark_all_read(item);
        if (folderview->summaryview->folder_item == item)
-               gtk_clist_thaw(GTK_CLIST(folderview->summaryview->ctree));
+               summary_thaw(folderview->summaryview);
        folder_item_update_thaw();
        summary_unlock(folderview->summaryview);
 }
@@ -805,7 +805,7 @@ static void folderview_select_node(FolderView *folderview, GtkCTreeNode *node)
        gtk_ctree_select(ctree, node);
        if (folderview->summaryview->folder_item &&
            folderview->summaryview->folder_item->total_msgs > 0)
-               gtk_widget_grab_focus(folderview->summaryview->ctree);
+               summary_grab_focus(folderview->summaryview);
        else
                gtk_widget_grab_focus(folderview->ctree);
 
@@ -2762,7 +2762,7 @@ static gboolean folderview_drag_motion_cb(GtkWidget      *widget,
                src_item = folderview->summaryview->folder_item;
 
                srcwidget = gtk_drag_get_source_widget(context);
-               if (srcwidget == folderview->summaryview->ctree) {
+               if (srcwidget == summary_get_main_widget(folderview->summaryview)) {
                        /* comes from summaryview */
                        /* we are copying messages, so only accept folder items that are not
                           the source item, are no root items and can copy messages */
index ff06708847bf98035d6fbf5464a257e0366cb7ad..8ca8964502ba1e9bed5b397a0bbbb778c2632841 100644 (file)
@@ -910,12 +910,13 @@ static void mainwindow_colorlabel_menu_item_activate_item_cb(GtkMenuItem *menu_i
        GtkMenuShell *menu;
        GtkCheckMenuItem **items;
        gint n;
-       GList *cur, *sel;
+       GList *cur;
+       GSList *sel;
 
        mainwin = (MainWindow *)data;
        g_return_if_fail(mainwin != NULL);
 
-       sel = GTK_CLIST(mainwin->summaryview->ctree)->selection;
+       sel = summary_get_selection(mainwin->summaryview);
        if (!sel) return;
 
        menu = GTK_MENU_SHELL(mainwin->colorlabel_menu);
@@ -945,9 +946,7 @@ static void mainwindow_colorlabel_menu_item_activate_item_cb(GtkMenuItem *menu_i
                        MsgInfo *msginfo;
                        gint clabel;
 
-                       msginfo = gtk_ctree_node_get_row_data
-                               (GTK_CTREE(mainwin->summaryview->ctree),
-                                GTK_CTREE_NODE(sel->data));
+                       msginfo = (MsgInfo *)sel->data;
                        if (msginfo) {
                                clabel = MSG_GET_COLORLABEL_VALUE(msginfo->flags);
                                if (!items[clabel]->active)
@@ -1966,7 +1965,7 @@ void main_window_toggle_message_view(MainWindow *mainwin)
 
        prefs_common.msgview_visible = mainwin->messageview->visible;
 
-       gtk_widget_grab_focus(summaryview->ctree);
+       summary_grab_focus(summaryview);
 }
 
 void main_window_get_size(MainWindow *mainwin)
index 53bc7561fbb4f7e2de6fa2181c6ff1b7a3b5f643..7f6dd62c368206207af0113a85bba0bdbf5ad23d 100644 (file)
@@ -1020,9 +1020,7 @@ static void messageview_update(MessageView *msgview)
        g_return_if_fail(summaryview != NULL);
        
        if (summaryview->selected) {
-               GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
-               MsgInfo *msginfo = gtk_ctree_node_get_row_data(ctree, 
-                                                     summaryview->selected);
+               MsgInfo *msginfo = summary_get_selected_msg(summaryview);
                if (msginfo == NULL)
                        return;
 
index 22b80e3810daf9d06cd4b08a5f8da2b8578e5028..902832ecfd1a112fd6b4dbd9ec1db2c26e3dd273 100644 (file)
@@ -489,8 +489,8 @@ static void summary_search_execute(gboolean backward, gboolean search_all)
        summary_show_stop_button();
 
        if (search_all) {
-               gtk_clist_freeze(GTK_CLIST(ctree));
-               gtk_clist_unselect_all(GTK_CLIST(ctree));
+               summary_freeze(summaryview);
+               summary_unselect_all(summaryview);
                node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
                backward = FALSE;
        } else if (!summaryview->selected) {
@@ -656,7 +656,7 @@ static void summary_search_execute(gboolean backward, gboolean search_all)
        summary_hide_stop_button();
        main_window_cursor_normal(summaryview->mainwin);
        if (search_all) {
-               gtk_clist_thaw(GTK_CLIST(ctree));
+               summary_thaw(summaryview);
        }
        summary_unlock(summaryview);
 }
index 15d750b318c562e81972fce21c9445bf189c38aa..292fd406aa6b6554cedc5cfbf7b92245112a871e 100644 (file)
@@ -1139,12 +1139,10 @@ static void toolbar_prev_unread_cb(GtkWidget *widget, gpointer data)
                
                /* Now we need to update the messageview window */
                if (msgview->mainwin->summaryview->selected) {
-                       GtkCTree *ctree = GTK_CTREE(msgview->mainwin->summaryview->ctree);
-                       
-                       MsgInfo * msginfo = gtk_ctree_node_get_row_data(ctree, 
-                                                                       msgview->mainwin->summaryview->selected);
+                       MsgInfo * msginfo = summary_get_selected_msg(msgview->mainwin->summaryview);
                       
-                       messageview_show(msgview, msginfo, 
+                       if (msginfo)
+                               messageview_show(msgview, msginfo, 
                                         msgview->all_headers);
                } else {
                        gtk_widget_destroy(msgview->window);
@@ -1186,12 +1184,10 @@ static void toolbar_next_unread_cb(GtkWidget *widget, gpointer data)
 
                /* Now we need to update the messageview window */
                if (msgview->mainwin->summaryview->selected) {
-                       GtkCTree *ctree = GTK_CTREE(msgview->mainwin->summaryview->ctree);
+                       MsgInfo * msginfo = summary_get_selected_msg(msgview->mainwin->summaryview);
                        
-                       MsgInfo * msginfo = gtk_ctree_node_get_row_data(ctree, 
-                                                                       msgview->mainwin->summaryview->selected);
-                      
-                       messageview_show(msgview, msginfo, 
+                       if (msginfo)
+                               messageview_show(msgview, msginfo, 
                                         msgview->all_headers);
                } else {
                        gtk_widget_destroy(msgview->window);