[Gnucash-changes] When deleting a window make sure to update the
progress bar code.
David Hampton
hampton at cvs.gnucash.org
Sun Jul 17 18:15:49 EDT 2005
Log Message:
-----------
When deleting a window make sure to update the progress bar code.
Fixes a crash when you delete the last window and then try to save.
>From Phil Longstaff <plongstaff at newearth.org>.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash/src/gnome-utils:
gnc-main-window.c
gnc-window.c
gnc-window.h
Revision Data
-------------
Index: gnc-window.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-window.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Lsrc/gnome-utils/gnc-window.h -Lsrc/gnome-utils/gnc-window.h -u -r1.1.2.1 -r1.1.2.2
--- src/gnome-utils/gnc-window.h
+++ src/gnome-utils/gnc-window.h
@@ -56,6 +56,7 @@
void gnc_window_set_status (GncWindow *window, GncPluginPage *page, const gchar *message);
void gnc_window_set_progressbar_window (GncWindow *window);
+GncWindow *gnc_window_get_progressbar_window (void);
void gnc_window_show_progress (const char *message, double percentage);
G_END_DECLS
Index: gnc-main-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-main-window.c,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -Lsrc/gnome-utils/gnc-main-window.c -Lsrc/gnome-utils/gnc-main-window.c -u -r1.1.2.8 -r1.1.2.9
--- src/gnome-utils/gnc-main-window.c
+++ src/gnome-utils/gnc-main-window.c
@@ -345,7 +345,7 @@
gnc_file_save();
#endif
- return ((response != GTK_RESPONSE_OK) &&
+ return ((response != GTK_RESPONSE_ACCEPT) &&
(response != GTK_RESPONSE_OK));
}
@@ -841,6 +841,9 @@
while (window->priv->current_page)
gnc_main_window_close_page(window->priv->current_page);
+ if (gnc_window_get_progressbar_window() == GNC_WINDOW(window))
+ gnc_window_set_progressbar_window(NULL);
+
/* Update the "Windows" menu in all other windows */
gnc_main_window_update_all_menu_items();
Index: gnc-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-window.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome-utils/gnc-window.c -Lsrc/gnome-utils/gnc-window.c -u -r1.1.2.2 -r1.1.2.3
--- src/gnome-utils/gnc-window.c
+++ src/gnome-utils/gnc-window.c
@@ -141,6 +141,14 @@
progress_bar_hack_window = window;
}
+
+GncWindow *
+gnc_window_get_progressbar_window (void)
+{
+ return progress_bar_hack_window;
+}
+
+
void
gnc_window_show_progress (const char *message, double percentage)
{
More information about the gnucash-changes
mailing list