From b74ca2735b597c3821f74d89d4dda8004b11be92 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 18 Dec 2007 15:05:13 +0000 Subject: [PATCH] * only change the window title if the new title is different from the old one; updating is apparently an expensive op, and the window mgr, gtk, etc. don't do this check themselves pmo-trunk-r3937 --- src/modest-ui-actions.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index e5f7ff6..aae822b 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -3775,11 +3775,19 @@ modest_ui_actions_msg_edit_on_select_font (GtkAction *action, modest_msg_edit_window_select_font (window); } + void modest_ui_actions_on_folder_display_name_changed (ModestFolderView *folder_view, const gchar *display_name, GtkWindow *window) { + /* don't update the display name if it was already set; + * updating the display name apparently is expensive */ + const gchar* old_name = gtk_window_get_title (window); + + if (old_name && display_name && strcmp (old_name, display_name) == 0) + return; /* don't do anything */ + /* This is usually used to change the title of the main window, which * is the one that holds the folder view. Note that this change can * happen even when the widget doesn't have the focus. */ @@ -3787,6 +3795,7 @@ modest_ui_actions_on_folder_display_name_changed (ModestFolderView *folder_view, gtk_window_set_title (window, display_name); else gtk_window_set_title (window, " "); + } void -- 1.7.9.5