From 7f58809b3bef851bea93e39322ee6eeead8d3a55 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 29 Apr 2011 16:35:42 +0000 Subject: [PATCH] Revert "Bug #436479 - Gnucash doesn't display the data file name in the title" This commit will cause a segfault when selecting File->New. This reverts commit f27c9a8ca95391acafed58d3933f6e9661755d24. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20600 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/gnc-main-window.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index 2d0163b067..2fd17f85eb 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -646,7 +646,7 @@ gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *da } if (page_count == 0) { - /* Should never happen, but has during alpha testing. Having this + /* Shound never happen, but has during alpha testing. Having this * check doesn't hurt anything. */ goto cleanup; } @@ -2293,6 +2293,8 @@ gnc_main_window_destroy (GtkObject *object) 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) @@ -2325,7 +2327,6 @@ gnc_main_window_destroy (GtkObject *object) 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); } @@ -2729,11 +2730,7 @@ gnc_main_window_close_page (GncPluginPage *page) gnc_plugin_page_destroy_widget (page); g_object_unref(page); - /* 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. */ + /* If this isn't the last window, go ahead and destroy the window. */ priv = GNC_MAIN_WINDOW_GET_PRIVATE(window); if (priv->installed_pages == NULL) { @@ -2741,10 +2738,6 @@ gnc_main_window_close_page (GncPluginPage *page) { gtk_widget_destroy(GTK_WIDGET(window)); } - else - { - gnc_main_window_restore_default_state(); - } } }