Force resetting header window sort criteria
authorJosé Dapena Paz <jdapena@igalia.com>
Fri, 5 Feb 2010 13:19:31 +0000 (14:19 +0100)
committerJosé Dapena Paz <jdapena@igalia.com>
Fri, 5 Feb 2010 15:27:33 +0000 (16:27 +0100)
This is a backport of master commit 168c2d5..

src/hildon2/modest-header-window.c
src/modest-init.c

index 1edb9ae..92ad0cb 100644 (file)
@@ -88,7 +88,6 @@ struct _ModestHeaderWindowPrivate {
        /* signals */
        GSList *sighandlers;
        gulong queue_change_handler;
        /* signals */
        GSList *sighandlers;
        gulong queue_change_handler;
-       gulong sort_column_handler;
        gulong notify_model;
 
        /* progress hint */
        gulong notify_model;
 
        /* progress hint */
@@ -263,7 +262,6 @@ modest_header_window_init (ModestHeaderWindow *obj)
        priv->autoscroll = TRUE;
        priv->progress_hint = FALSE;
        priv->queue_change_handler = 0;
        priv->autoscroll = TRUE;
        priv->progress_hint = FALSE;
        priv->queue_change_handler = 0;
-       priv->sort_column_handler = 0;
        priv->model_weak_ref = NULL;
        priv->current_store_account = NULL;
        priv->new_message_button = NULL;
        priv->model_weak_ref = NULL;
        priv->current_store_account = NULL;
        priv->new_message_button = NULL;
@@ -306,11 +304,6 @@ modest_header_window_finalize (GObject *obj)
                g_object_weak_unref ((GObject *) priv->model_weak_ref,
                                     on_header_view_model_destroyed,
                                     obj);
                g_object_weak_unref ((GObject *) priv->model_weak_ref,
                                     on_header_view_model_destroyed,
                                     obj);
-               if (g_signal_handler_is_connected (G_OBJECT (priv->model_weak_ref),
-                                                  priv->sort_column_handler)) {
-                       g_signal_handler_disconnect (G_OBJECT (priv->model_weak_ref),
-                                                    priv->sort_column_handler);
-               }
                on_header_view_model_destroyed (obj, (GObject *) priv->model_weak_ref);
        }
 
                on_header_view_model_destroyed (obj, (GObject *) priv->model_weak_ref);
        }
 
@@ -355,20 +348,6 @@ modest_header_window_disconnect_signals (ModestWindow *self)
                priv->queue_change_handler = 0;
        }
 
                priv->queue_change_handler = 0;
        }
 
-       if (priv->header_view) {
-               GtkTreeModel *sortable;
-
-               sortable = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->header_view));
-               if (sortable) {
-                       if (g_signal_handler_is_connected (G_OBJECT (sortable),
-                                                          priv->sort_column_handler)) {
-                               g_signal_handler_disconnect (G_OBJECT (sortable),
-                                                            priv->sort_column_handler);
-                               priv->sort_column_handler = 0;
-                       }
-               }
-       }
-
        modest_signal_mgr_disconnect_all_and_destroy (priv->sighandlers);
        priv->sighandlers = NULL;
 
        modest_signal_mgr_disconnect_all_and_destroy (priv->sighandlers);
        priv->sighandlers = NULL;
 
@@ -620,7 +599,6 @@ on_header_view_model_destroyed (gpointer user_data,
        priv = MODEST_HEADER_WINDOW_GET_PRIVATE (self);
        priv->model_weak_ref = NULL;
 
        priv = MODEST_HEADER_WINDOW_GET_PRIVATE (self);
        priv->model_weak_ref = NULL;
 
-       priv->sort_column_handler = 0;
 }
 
 static void
 }
 
 static void
@@ -636,11 +614,6 @@ on_header_view_model_changed (GObject *gobject,
                g_object_weak_unref ((GObject *) priv->model_weak_ref,
                                     on_header_view_model_destroyed,
                                     self);
                g_object_weak_unref ((GObject *) priv->model_weak_ref,
                                     on_header_view_model_destroyed,
                                     self);
-               if (g_signal_handler_is_connected (G_OBJECT (priv->model_weak_ref),
-                                                  priv->sort_column_handler)) {
-                       g_signal_handler_disconnect (G_OBJECT (priv->model_weak_ref),
-                                                    priv->sort_column_handler);
-               }
                on_header_view_model_destroyed (self, (GObject *) priv->model_weak_ref);
        }
 
                on_header_view_model_destroyed (self, (GObject *) priv->model_weak_ref);
        }
 
index 7880ee6..f911ea7 100644 (file)
@@ -249,7 +249,7 @@ modest_init (int argc, char *argv[])
        modest_address_book_init ();
 
        reset = modest_runtime_get_debug_flags () & MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS;
        modest_address_book_init ();
 
        reset = modest_runtime_get_debug_flags () & MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS;
-       if (!init_header_columns(modest_runtime_get_conf(), reset)) {
+       if (!init_header_columns(modest_runtime_get_conf(), TRUE)) {
                modest_init_uninit ();
                g_printerr ("modest: failed to init header columns\n");
                return FALSE;
                modest_init_uninit ();
                g_printerr ("modest: failed to init header columns\n");
                return FALSE;