r20351 - gnucash/trunk/src - Update page name if invoice/bill is renamed.
Geert Janssens
gjanssens at code.gnucash.org
Mon Feb 28 06:28:14 EST 2011
Author: gjanssens
Date: 2011-02-28 06:28:13 -0500 (Mon, 28 Feb 2011)
New Revision: 20351
Trac: http://svn.gnucash.org/trac/changeset/20351
Modified:
gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Update page name if invoice/bill is renamed.
Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c 2011-02-28 11:28:02 UTC (rev 20350)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c 2011-02-28 11:28:13 UTC (rev 20351)
@@ -949,7 +949,7 @@
page = GNC_PLUGIN_PAGE_INVOICE(plugin_page);
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
title = gnc_invoice_get_title(priv->iw);
- gnc_plugin_page_set_page_name(plugin_page, title);
+ main_window_update_page_name(plugin_page, title);
g_free(title);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2011-02-28 11:28:02 UTC (rev 20350)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2011-02-28 11:28:13 UTC (rev 20351)
@@ -1909,11 +1909,13 @@
old_page_long_name = g_strdup( gnc_plugin_page_get_page_long_name(page));
/* Update the plugin */
- window = GNC_MAIN_WINDOW(page->window);
- priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
gnc_plugin_page_set_page_name(page, name);
/* Update the notebook tab */
+ window = GNC_MAIN_WINDOW(page->window);
+ if (!window)
+ return;
+ priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
main_window_find_tab_items(window, page, &label, &entry);
gtk_label_set_text(GTK_LABEL(label), name);
More information about the gnucash-changes
mailing list