r20599 - gnucash/trunk/src/gnome-utils - Bug #436479 - Gnucash doesn't display the data file name in the title

Geert Janssens gjanssens at code.gnucash.org
Fri Apr 29 10:31:59 EDT 2011


Author: gjanssens
Date: 2011-04-29 10:31:59 -0400 (Fri, 29 Apr 2011)
New Revision: 20599
Trac: http://svn.gnucash.org/trac/changeset/20599

Modified:
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Bug #436479 - Gnucash doesn't display the data file name in the title
bar.

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2011-04-29 09:44:37 UTC (rev 20598)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2011-04-29 14:31:59 UTC (rev 20599)
@@ -646,7 +646,7 @@
     }
     if (page_count == 0)
     {
-        /* Shound never happen, but has during alpha testing. Having this
+        /* Should never happen, but has during alpha testing. Having this
          * check doesn't hurt anything. */
         goto cleanup;
     }
@@ -2293,8 +2293,6 @@
 
     window = GNC_MAIN_WINDOW (object);
 
-    active_windows = g_list_remove (active_windows, window);
-
     /* Do these things once */
     priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
     if (priv->merged_actions_table)
@@ -2327,6 +2325,7 @@
         g_list_foreach (plugins, gnc_main_window_remove_plugin, window);
         g_list_free (plugins);
     }
+    active_windows = g_list_remove (active_windows, window);
     GTK_OBJECT_CLASS (parent_class)->destroy (object);
 }
 
@@ -2730,7 +2729,11 @@
     gnc_plugin_page_destroy_widget (page);
     g_object_unref(page);
 
-    /* If this isn't the last window, go ahead and destroy the window. */
+    /* If this is the last page on this window and this isn't the last window,
+     * go ahead and destroy the window.
+     * If it is the last window and the user just closed the last page,
+     * automatically reopen an account page. Leaving an empty window
+     * is pretty confusing. */
     priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
     if (priv->installed_pages == NULL)
     {
@@ -2738,6 +2741,10 @@
         {
             gtk_widget_destroy(GTK_WIDGET(window));
         }
+        else
+        {
+            gnc_main_window_restore_default_state();
+        }
     }
 }
 



More information about the gnucash-changes mailing list