r18526 - gnucash/trunk/src/gnome-utils - Bug #479581 gnucash --nofile hasn't application name in window title
Geert Janssens
gjanssens at code.gnucash.org
Fri Dec 18 07:39:20 EST 2009
Author: gjanssens
Date: 2009-12-18 07:39:15 -0500 (Fri, 18 Dec 2009)
New Revision: 18526
Trac: http://svn.gnucash.org/trac/changeset/18526
Modified:
gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
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.
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2009-12-18 09:44:06 UTC (rev 18525)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2009-12-18 12:39:15 UTC (rev 18526)
@@ -1244,7 +1244,7 @@
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 @@
}
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 @@
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);
More information about the gnucash-changes
mailing list