* Fixes progress hint handling in header window
authorSergio Villar Senin <svillar@igalia.com>
Fri, 13 Feb 2009 17:48:27 +0000 (17:48 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 13 Feb 2009 17:48:27 +0000 (17:48 +0000)
pmo-trunk-r7490

src/hildon2/modest-header-window.c

index 80a41c8..2bfd813 100644 (file)
@@ -342,11 +342,6 @@ connect_signals (ModestHeaderWindow *self)
                                           self);
 
        /* Mail Operation Queue */
-       priv->queue_change_handler =
-               g_signal_connect (G_OBJECT (modest_runtime_get_mail_operation_queue ()),
-                                 "queue-changed",
-                                 G_CALLBACK (on_queue_changed),
-                                 self);
        priv->sighandlers = modest_signal_mgr_connect (priv->sighandlers,
                                                       G_OBJECT (modest_runtime_get_window_mgr ()),
                                                       "progress-list-changed",
@@ -415,6 +410,15 @@ modest_header_window_new (TnyFolder *folder, const gchar *account_name)
 
        priv->contents_view = hildon_pannable_area_new ();
 
+       /* We need to do this here to properly listen for mail
+          operations because create_header_view launches a mail
+          operation */
+       priv->queue_change_handler =
+               g_signal_connect (G_OBJECT (modest_runtime_get_mail_operation_queue ()),
+                                 "queue-changed",
+                                 G_CALLBACK (on_queue_changed),
+                                 self);
+
        priv->header_view  = create_header_view (MODEST_WINDOW (self), folder);
        priv->empty_view = create_empty_view ();
        g_signal_connect (G_OBJECT (self), "edit-mode-changed",
@@ -811,8 +815,6 @@ update_progress_hint (ModestHeaderWindow *self)
                priv->progress_hint = TRUE;
        }
 
-       return;
-
        if (!priv->progress_hint && priv->current_store_account) {
                priv->progress_hint = 
                        modest_window_mgr_has_progress_operation_on_account (modest_runtime_get_window_mgr (),