Fixes NB#112513, show the proper account title when opening folders window from notif...
authorSergio Villar Senín <svillar@igalia.com>
Tue, 19 May 2009 18:08:34 +0000 (20:08 +0200)
committerSergio Villar Senín <svillar@igalia.com>
Tue, 19 May 2009 18:08:51 +0000 (20:08 +0200)
src/dbus_api/modest-dbus-callbacks.c
src/hildon2/modest-folder-window.c
src/hildon2/modest-platform.c

index cdce41d..fe17cfa 100644 (file)
@@ -1194,7 +1194,6 @@ on_idle_open_account (gpointer user_data)
                                                                        store_protocol,
                                                                        MODEST_PROTOCOL_REGISTRY_MULTI_MAILBOX_PROVIDER_PROTOCOLS);
 
-#ifdef MODEST_TOOLKIT_HILDON2
                if (mailboxes_protocol) {
                        new_window = GTK_WIDGET (modest_mailboxes_window_new (acc_name));
                } else {
@@ -1202,11 +1201,6 @@ on_idle_open_account (gpointer user_data)
                        modest_folder_window_set_account (MODEST_FOLDER_WINDOW (new_window),
                                                          acc_name);
                }
-#else
-               new_window = GTK_WIDGET (modest_folder_window_new (NULL));
-               modest_folder_window_set_account (MODEST_FOLDER_WINDOW (new_window),
-                                                 acc_name);
-#endif
 
                if (modest_window_mgr_register_window (mgr, MODEST_WINDOW (new_window), NULL)) {
                        gtk_widget_show (new_window);
index 4fca617..84f12aa 100644 (file)
@@ -816,10 +816,10 @@ on_visible_account_changed (ModestFolderView *folder_view,
                                                               account_id);
 
        /* Update window title */
-       update_window_title (MODEST_FOLDER_WINDOW (user_data), account);
-
-       if (account)
+       if (account) {
+               update_window_title (MODEST_FOLDER_WINDOW (user_data), account);
                g_object_unref (account);
+       }
 }
 
 static void
index 1a338b3..2f3f84f 100644 (file)
@@ -1616,9 +1616,12 @@ modest_platform_on_new_headers_received (TnyList *header_list,
                        /* Set the account of the headers */
                        account = tny_folder_get_account (folder);
                        if (account) {
+                               const gchar *acc_name;
+                               acc_name =
+                                       modest_tny_account_get_parent_modest_account_name_for_server_account (account);
                                notify_notification_set_hint_string(NOTIFY_NOTIFICATION (notification),
                                                                    "email-account",
-                                                                   tny_account_get_id (account));
+                                                                   acc_name);
                                g_object_unref (account);
                        }
                }