mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix from Andreas Köhler to deactivate the toolbar split button in an
auto-split register. Fixes 330621. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13354 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c0dc99a3a6
commit
66baad0f8e
@ -1,5 +1,9 @@
|
|||||||
2006-02-21 David Hampton <hampton@employees.org>
|
2006-02-21 David Hampton <hampton@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
|
* src/gnome-utils/gnc-tree-model-account.c: Two fixes from Andreas
|
||||||
Köhler. One fixes 331183, the problem where editing a top-level
|
Köhler. One fixes 331183, the problem where editing a top-level
|
||||||
account doesn't set the current parent.
|
account doesn't set the current parent.
|
||||||
|
@ -577,6 +577,22 @@ gnc_plugin_page_register_get_account (GncPluginPageRegister *page)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
static void
|
||||||
gnc_plugin_page_register_update_menus (GncPluginPageRegister *page)
|
gnc_plugin_page_register_update_menus (GncPluginPageRegister *page)
|
||||||
{
|
{
|
||||||
@ -616,6 +632,8 @@ gnc_plugin_page_register_update_menus (GncPluginPageRegister *page)
|
|||||||
g_signal_handlers_block_by_func(action, gnc_plugin_page_register_cmd_style_double_line, page);
|
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);
|
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);
|
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 @@ gnc_plugin_page_register_cmd_style_changed (GtkAction *action,
|
|||||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
||||||
value = gtk_radio_action_get_current_value(current);
|
value = gtk_radio_action_get_current_value(current);
|
||||||
gnc_split_reg_change_style(priv->gsr, value);
|
gnc_split_reg_change_style(priv->gsr, value);
|
||||||
|
gnc_plugin_page_register_update_toolbar (plugin_page, value);
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user