Applied patch for NB#57631
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Fri, 6 Jul 2007 13:38:43 +0000 (13:38 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Fri, 6 Jul 2007 13:38:43 +0000 (13:38 +0000)
pmo-trunk-r2610

src/widgets/modest-header-view.c

index 9e15957..097c2e6 100644 (file)
@@ -1041,6 +1041,7 @@ modest_header_view_set_folder (ModestHeaderView *self,
 
        if (folder) {
                ModestMailOperation *mail_op = NULL;
 
        if (folder) {
                ModestMailOperation *mail_op = NULL;
+                GtkTreeSelection *selection;
 
                /* Get main window to use it as source of mail operation */
                mgr = modest_runtime_get_window_mgr ();
 
                /* Get main window to use it as source of mail operation */
                mgr = modest_runtime_get_window_mgr ();
@@ -1060,6 +1061,10 @@ modest_header_view_set_folder (ModestHeaderView *self,
                info->cb = callback;
                info->user_data = user_data;
 
                info->cb = callback;
                info->user_data = user_data;
 
+               /* bug 57631: Clear the selection if exists */
+               selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
+               gtk_tree_selection_unselect_all(selection);
+
                /* Create the mail operation (source will be the parent widget) */
                mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_TYPE_RECEIVE, source);
                modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
                /* Create the mail operation (source will be the parent widget) */
                mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_TYPE_RECEIVE, source);
                modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),