From c41b3b0d601ed1b4738fb1ffb6815ae64ed6d793 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 18 Dec 2009 12:39:15 +0000 Subject: [PATCH] Bug #479581 gnucash --nofile hasn't application name in window title When no file is selected, the title now becomes "Unsaved Book - GnuCash". The first part is following Gnome HIG guidelines, the latter part is a preference of several GnuCash developers. Furthermore, the "- GnuCash" suffix will always be appended, not only when no file is open. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18526 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/gnc-main-window.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index 4af28f44d4..d5b7c180b2 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -1244,7 +1244,7 @@ gnc_main_window_generate_title (GncMainWindow *window) gchar *title, *ptr; GtkAction* action; - /* The save action is sensitive iff the book is dirty */ + /* The save action is sensitive if the book is dirty */ action = gnc_main_window_find_action (window, "FileSaveAction"); if (action != NULL) { gtk_action_set_sensitive(action, FALSE); @@ -1261,7 +1261,7 @@ gnc_main_window_generate_title (GncMainWindow *window) } if (!filename) - filename = g_strdup(_("")); + filename = g_strdup(_("Unsaved Book")); else { gint num_colons = 0; for (ptr = filename; *ptr; ptr = g_utf8_next_char(ptr)) { @@ -1307,11 +1307,12 @@ gnc_main_window_generate_title (GncMainWindow *window) priv = GNC_MAIN_WINDOW_GET_PRIVATE(window); page = priv->current_page; if (page) { - /* The Gnome HIG 2.0 recommends the application name not be used. (p16) */ - title = g_strdup_printf("%s%s - %s", dirty, filename, + /* The Gnome HIG 2.0 recommends the application name not be used. (p16) + * but several developers prefer to use it anyway. */ + title = g_strdup_printf("%s%s - %s - GnuCash", dirty, filename, gnc_plugin_page_get_page_name(page)); } else { - title = g_strdup_printf("%s%s", dirty, filename); + title = g_strdup_printf("%s%s - GnuCash", dirty, filename); } g_free(filename);