From f3633a154644e8224b2c22dc1cca20c8026f280f Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Mon, 2 Jul 2007 10:09:26 +0000 Subject: [PATCH] * src/maemo/modest-main-window.c: * Now the window title is updated in more cases when you go from split view to single view (fix NB#61490). pmo-trunk-r2522 --- src/maemo/modest-main-window.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index bfab9c1..136ec53 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include #include "modest-hildon-includes.h" #include "modest-defs.h" @@ -969,6 +971,21 @@ modest_main_window_set_style (ModestMainWindow *self, gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); g_signal_handlers_unblock_by_func (action, modest_ui_actions_toggle_folders_view, self); + if (modest_header_view_has_selected_headers (MODEST_HEADER_VIEW (priv->header_view))) { + TnyList *selection = modest_header_view_get_selected_headers (MODEST_HEADER_VIEW (priv->header_view)); + TnyIterator *iterator = tny_list_create_iterator (selection); + TnyHeader *header; + tny_iterator_first (iterator); + header = TNY_HEADER (tny_iterator_get_current (iterator)); + if (tny_header_get_subject (header)) + gtk_window_set_title (GTK_WINDOW(self), tny_header_get_subject (header)); + else + gtk_window_set_title (GTK_WINDOW (self), _("mail_va_no_subject")); + g_object_unref (header); + g_object_unref (iterator); + g_object_unref (selection); + } + break; case MODEST_MAIN_WINDOW_STYLE_SPLIT: /* Remove header view */ -- 1.7.9.5