AUDIT: r16564 - gnucash/trunk/src/gnome-utils - #482177: Emit account_sel_changed on GncAccountSel when the combobox changed.

Andreas Köhler andi5 at cvs.gnucash.org
Mon Oct 15 15:49:16 EDT 2007


Author: andi5
Date: 2007-10-15 15:49:14 -0400 (Mon, 15 Oct 2007)
New Revision: 16564
Trac: http://svn.gnucash.org/trac/changeset/16564

Modified:
   gnucash/trunk/src/gnome-utils/dialog-options.c
   gnucash/trunk/src/gnome-utils/gnc-account-sel.c
Log:
#482177: Emit account_sel_changed on GncAccountSel when the combobox changed.

This makes it possible again to create customer reports for other than
only the first A/R account in the list.

BP


Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c	2007-10-13 15:23:10 UTC (rev 16563)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c	2007-10-15 19:49:14 UTC (rev 16564)
@@ -1825,7 +1825,7 @@
   value = gnc_account_sel_new();
   gnc_account_sel_set_acct_filters(GNC_ACCOUNT_SEL(value), acct_type_list);
 
-  g_signal_connect(value, "changed",
+  g_signal_connect(value, "account_sel_changed",
 		   G_CALLBACK(gnc_option_changed_widget_cb), option);
 
   gnc_option_set_widget (option, value);

Modified: gnucash/trunk/src/gnome-utils/gnc-account-sel.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-account-sel.c	2007-10-13 15:23:10 UTC (rev 16563)
+++ gnucash/trunk/src/gnome-utils/gnc-account-sel.c	2007-10-15 19:49:14 UTC (rev 16564)
@@ -132,6 +132,12 @@
 }
 
 static void
+combo_changed_cb(GNCAccountSel *gas, gpointer combo)
+{
+        g_signal_emit_by_name(gas, "account_sel_changed");
+}
+
+static void
 gnc_account_sel_init (GNCAccountSel *gas)
 {
 	GtkWidget *widget;
@@ -147,6 +153,8 @@
 	gtk_combo_box_set_model(GTK_COMBO_BOX(widget),
 				GTK_TREE_MODEL(gas->store));
 	g_object_unref(gas->store);
+        g_signal_connect_swapped(gas->combo, "changed",
+                                 G_CALLBACK(combo_changed_cb), gas);
         gtk_container_add( GTK_CONTAINER(gas), widget );
 
         /* Add completion. */



More information about the gnucash-changes mailing list