mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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
This commit is contained in:
parent
003d7209a9
commit
c41b3b0d60
@ -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(_("<no file>"));
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user