[Gnucash-changes] Propagate window changes to the register.
David Hampton
hampton at cvs.gnucash.org
Wed Jul 20 15:56:26 EDT 2005
Log Message:
-----------
Propagate window changes to the register. Fix the "transaction
report" to use the current window's status bar for updates.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash/src/gnome:
gnc-plugin-page-register.c
Revision Data
-------------
Index: gnc-plugin-page-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-plugin-page-register.c,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.32
diff -Lsrc/gnome/gnc-plugin-page-register.c -Lsrc/gnome/gnc-plugin-page-register.c -u -r1.1.2.31 -r1.1.2.32
--- src/gnome/gnc-plugin-page-register.c
+++ src/gnome/gnc-plugin-page-register.c
@@ -73,6 +73,7 @@
static GtkWidget *gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page);
static void gnc_plugin_page_register_destroy_widget (GncPluginPage *plugin_page);
+static void gnc_plugin_page_register_window_changed (GncPluginPage *plugin_page, GtkWidget *window);
static void gnc_plugin_page_register_merge_actions (GncPluginPage *plugin_page, GtkUIManager *ui_merge);
static void gnc_plugin_page_register_unmerge_actions (GncPluginPage *plugin_page, GtkUIManager *ui_merge);
@@ -443,6 +444,7 @@
gnc_plugin_class->plugin_name = GNC_PLUGIN_PAGE_REGISTER_NAME;
gnc_plugin_class->create_widget = gnc_plugin_page_register_create_widget;
gnc_plugin_class->destroy_widget = gnc_plugin_page_register_destroy_widget;
+ gnc_plugin_class->window_changed = gnc_plugin_page_register_window_changed;
gnc_plugin_class->merge_actions = gnc_plugin_page_register_merge_actions;
gnc_plugin_class->unmerge_actions = gnc_plugin_page_register_unmerge_actions;
}
@@ -654,6 +656,18 @@
}
static void
+gnc_plugin_page_register_window_changed (GncPluginPage *plugin_page,
+ GtkWidget *window)
+{
+ GncPluginPageRegister *page;
+
+ g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (plugin_page));
+
+ page = GNC_PLUGIN_PAGE_REGISTER(plugin_page);
+ page->priv->gsr->window = window;
+}
+
+static void
gnc_plugin_page_register_merge_actions (GncPluginPage *plugin_page,
GtkUIManager *ui_merge)
{
@@ -2165,6 +2179,7 @@
GncPluginPageRegister *plugin_page)
{
GncPluginPageRegisterPrivate *priv;
+ GncMainWindow *window;
SplitRegister *reg;
Split *split;
Query *query;
@@ -2189,9 +2204,10 @@
xaccQueryAddGUIDMatch (query, xaccSplitGetGUID (split),
GNC_ID_SPLIT, QUERY_AND);
+ window = GNC_MAIN_WINDOW(GNC_PLUGIN_PAGE(plugin_page)->window);
id = report_helper (priv->ledger, split, query);
if (id >= 0)
- reportWindow (id);
+ gnc_main_window_open_report(id, window);
LEAVE(" ");
}
More information about the gnucash-changes
mailing list