2009-07-10 [colin] 3.7.2cvs6
authorColin Leroy <colin@colino.net>
Fri, 10 Jul 2009 07:40:27 +0000 (07:40 +0000)
committerColin Leroy <colin@colino.net>
Fri, 10 Jul 2009 07:40:27 +0000 (07:40 +0000)
* src/prefs_display_header.c
Fix bug 1951, 'C-Mail dumps core when editing
displayed headers'. Patch by Alexey Rusakov

ChangeLog
PATCHSETS
configure.ac
src/prefs_display_header.c

index 5235bbf..fcdc594 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-10 [colin]     3.7.2cvs6
+
+       * src/prefs_display_header.c
+               Fix bug 1951, 'C-Mail dumps core when editing 
+               displayed headers'. Patch by Alexey Rusakov
+
 2009-07-10 [colin]     3.7.2cvs5
 
        * src/folderview.c
index cadea6f..0cb8b25 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.654.2.3896 -r 1.654.2.3897 configure.ac;  ) > 3.7.2cvs3.patchset
 ( cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/spell_entry.c;  ) > 3.7.2cvs4.patchset
 ( cvs diff -u -r 1.207.2.213 -r 1.207.2.214 src/folderview.c;  ) > 3.7.2cvs5.patchset
+( cvs diff -u -r 1.16.2.36 -r 1.16.2.37 src/prefs_display_header.c;  ) > 3.7.2cvs6.patchset
index 8087d92..17f8dfa 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 4602733..19e3227 100644 (file)
@@ -93,20 +93,12 @@ static void prefs_display_header_insert_header              (GtkListStore *store,
 static GtkWidget *prefs_display_header_list_view_create        (const gchar *name);
 static void prefs_filtering_create_list_view_columns   (GtkWidget *list_view, 
                                                         const gchar *name);
-static void headers_list_model_row_changed             (GtkTreeModel *model, 
-                                                        GtkTreePath *path, 
-                                                        GtkTreeIter *iter, 
-                                                        GtkTreeView *list_view);
 static void headers_list_model_rows_reordered          (GtkTreeModel *model,
                                                         GtkTreePath  *path, 
                                                         GtkTreeIter  *iter,
                                                         gpointer      arg,
                                                         GtkTreeView  *list_view);
                                                         
-static void drag_begin (GtkTreeView *list_view,
-                        GdkDragContext *context,
-                        gpointer data);
-
 static void drag_end   (GtkTreeView *list_view,
                         GdkDragContext *context,
                         gpointer data);
@@ -318,10 +310,6 @@ static void prefs_display_header_create(void)
        gtk_container_add(GTK_CONTAINER(list_view_scrolledwin), headers_list_view);
        gtk_tree_view_set_reorderable(GTK_TREE_VIEW(headers_list_view), TRUE);
 
-       g_signal_connect(G_OBJECT(headers_list_view), "drag_begin",                      
-                        G_CALLBACK(drag_begin),
-                        headers_list_view);
-                        
        g_signal_connect(G_OBJECT(headers_list_view), "drag_end",                        
                         G_CALLBACK(drag_end),
                         headers_list_view);
@@ -798,17 +786,6 @@ static void prefs_filtering_create_list_view_columns(GtkWidget *list_view,
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);          
 }
 
-/*!
- *\brief       Called as a result of a drag & drop
- */
-static void headers_list_model_row_changed(GtkTreeModel *model, 
-                                          GtkTreePath *path, 
-                                          GtkTreeIter *iter, 
-                                          GtkTreeView *list_view)
-{
-       prefs_display_header_set_list();
-}
-
 /*!
  *\brief       Called as a result of a gtk_list_store_swap()
  */
@@ -821,28 +798,13 @@ static void headers_list_model_rows_reordered(GtkTreeModel *model,
        prefs_display_header_set_list();
 }
 
-static void drag_begin(GtkTreeView *list_view,
-                     GdkDragContext *context,
-                     gpointer data)
-{
-       /* XXX unfortunately a completed drag & drop does not emit 
-        * a "rows_reordered" signal, but a "row_changed" signal.
-        * So during drag and drop, listen to "row_changed", and
-        * update the account list accordingly */
-
-       GtkTreeModel *model = gtk_tree_view_get_model(list_view);
-       g_signal_connect(G_OBJECT(model), "row_changed",
-                        G_CALLBACK(headers_list_model_row_changed),
-                        list_view);
-}
-
+/*!
+ *\brief       Called as a result of a drag & drop
+ */
 static void drag_end(GtkTreeView *list_view,
                    GdkDragContext *context,
                    gpointer data)
 {
-       GtkTreeModel *model = gtk_tree_view_get_model(list_view);
-       g_signal_handlers_disconnect_by_func(G_OBJECT(model),
-                                            G_CALLBACK(headers_list_model_row_changed),
-                                            list_view);
+       prefs_display_header_set_list();
 }