[Gnucash-changes] r13354 - gnucash/trunk - Fix from Andreas Köhler to deactivate the toolbar split button in an
David Hampton
hampton at cvs.gnucash.org
Tue Feb 21 20:38:43 EST 2006
Author: hampton
Date: 2006-02-21 20:38:42 -0500 (Tue, 21 Feb 2006)
New Revision: 13354
Trac: http://svn.gnucash.org/trac/changeset/13354
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/gnome/gnc-plugin-page-register.c
Log:
Fix from Andreas Köhler to deactivate the toolbar split button in an
auto-split register. Fixes 330621.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-02-21 23:58:16 UTC (rev 13353)
+++ gnucash/trunk/ChangeLog 2006-02-22 01:38:42 UTC (rev 13354)
@@ -1,5 +1,9 @@
2006-02-21 David Hampton <hampton at employees.org>
+ * src/gnome/gnc-plugin-page-register.c: Fix from Andreas Köhler to
+ deactivate the toolbar split button in an auto-split register.
+ Fixes 330621.
+
* src/gnome-utils/gnc-tree-model-account.c: Two fixes from Andreas
Köhler. One fixes 331183, the problem where editing a top-level
account doesn't set the current parent.
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2006-02-21 23:58:16 UTC (rev 13353)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2006-02-22 01:38:42 UTC (rev 13354)
@@ -578,6 +578,22 @@
static void
+gnc_plugin_page_register_update_toolbar (GncPluginPageRegister *page, SplitRegisterStyle style)
+{
+ GtkActionGroup *action_group;
+ GtkAction *action;
+ GValue gvalue = { 0 };
+
+ action_group = gnc_plugin_page_get_action_group (GNC_PLUGIN_PAGE (page));
+
+ g_value_init (&gvalue, G_TYPE_BOOLEAN);
+ g_value_set_boolean (&gvalue, style == REG_STYLE_LEDGER);
+ action = gtk_action_group_get_action (action_group,
+ "SplitTransactionAction");
+ g_object_set_property (G_OBJECT (action), "sensitive", &gvalue);
+}
+
+static void
gnc_plugin_page_register_update_menus (GncPluginPageRegister *page)
{
GncPluginPageRegisterPrivate *priv ;
@@ -616,6 +632,8 @@
g_signal_handlers_block_by_func(action, gnc_plugin_page_register_cmd_style_double_line, page);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action), reg->use_double_line);
g_signal_handlers_unblock_by_func(action, gnc_plugin_page_register_cmd_style_double_line, page);
+
+ gnc_plugin_page_register_update_toolbar (page, reg->style);
}
@@ -2103,6 +2121,7 @@
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
value = gtk_radio_action_get_current_value(current);
gnc_split_reg_change_style(priv->gsr, value);
+ gnc_plugin_page_register_update_toolbar (plugin_page, value);
LEAVE(" ");
}
More information about the gnucash-changes
mailing list