[Gnucash-changes] r13853 - gnucash/trunk - Don't try to update the main window page name when invoked with an

David Hampton hampton at cvs.gnucash.org
Tue Apr 25 20:03:08 EDT 2006


Author: hampton
Date: 2006-04-25 20:03:08 -0400 (Tue, 25 Apr 2006)
New Revision: 13853
Trac: http://svn.gnucash.org/trac/changeset/13853

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome/gnc-plugin-page-register.c
Log:
Don't try to update the main window page name when invoked with an
embedded window.  Fixes #339763.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-04-25 20:56:28 UTC (rev 13852)
+++ gnucash/trunk/ChangeLog	2006-04-26 00:03:08 UTC (rev 13853)
@@ -1,3 +1,9 @@
+2006-04-25  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page-register.c: Don't try to update the
+	main window page name when invoked with an embedded window.  Fixes
+	#339763.
+
 2006-04-25  Christian Stimming  <stimming at tuhh.de>
 
 	* po/de.po: Updated German translation. 3666 out of 3666

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2006-04-25 20:56:28 UTC (rev 13852)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2006-04-26 00:03:08 UTC (rev 13853)
@@ -2876,6 +2876,7 @@
   QofBook *book;
   GncPluginPage *visible_page;
   GtkWidget *window;
+  gchar *label;
 
   g_return_if_fail(page);	/* Required */
   if (!GNC_IS_TRANS(entity) && !GNC_IS_ACCOUNT(entity))
@@ -2884,12 +2885,14 @@
   ENTER("entity %p of type %d, page %p, event data %p",
 	entity, event_type, page, ed);
 
+  window = gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page));
+
   if (GNC_IS_ACCOUNT(entity)) {
-    gchar *label;
-
-    label = gnc_plugin_page_register_get_tab_name(GNC_PLUGIN_PAGE(page));
-    main_window_update_page_name(GNC_PLUGIN_PAGE(page), label);
-    g_free(label);
+    if (GNC_IS_MAIN_WINDOW(window)) {
+      label = gnc_plugin_page_register_get_tab_name(GNC_PLUGIN_PAGE(page));
+      main_window_update_page_name(GNC_PLUGIN_PAGE(page), label);
+      g_free(label);
+    }
     LEAVE("tab name updated");
     return;
   }
@@ -2901,12 +2904,10 @@
   trans = GNC_TRANS(entity);
   book = qof_instance_get_book(QOF_INSTANCE(trans));
   if (!gnc_plugin_page_has_book(GNC_PLUGIN_PAGE(page), book)) {
-		
       LEAVE("not in this book");
       return;
   }
 
-  window = gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page));
   if (GNC_IS_MAIN_WINDOW(window)) {
     visible_page = gnc_main_window_get_current_page(GNC_MAIN_WINDOW(window));
     if (visible_page != GNC_PLUGIN_PAGE(page)) {



More information about the gnucash-changes mailing list