mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 554391 - Add Apply button to Tax Options dialog
This commit is contained in:
parent
95b502ea96
commit
227bbda16c
@ -109,6 +109,7 @@ typedef struct
|
||||
GtkWidget * account_treeview;
|
||||
GtkWidget * select_button;
|
||||
GtkWidget * num_acct_label;
|
||||
GtkWidget * apply_button;
|
||||
|
||||
GtkWidget * txf_info;
|
||||
GtkWidget * tax_related_button;
|
||||
@ -226,6 +227,7 @@ static void
|
||||
gnc_tax_info_set_changed (TaxInfoDialog *ti_dialog, gboolean changed)
|
||||
{
|
||||
ti_dialog->changed = changed;
|
||||
gtk_widget_set_sensitive (ti_dialog->apply_button, changed);
|
||||
}
|
||||
|
||||
static GList *
|
||||
@ -811,10 +813,11 @@ gnc_tax_info_dialog_response (GtkDialog *dialog, gint response, gpointer data)
|
||||
{
|
||||
TaxInfoDialog *ti_dialog = data;
|
||||
|
||||
if (response == GTK_RESPONSE_OK && ti_dialog->changed)
|
||||
if (ti_dialog->changed && (response == GTK_RESPONSE_APPLY || response == GTK_RESPONSE_OK))
|
||||
gui_to_accounts (ti_dialog);
|
||||
|
||||
gnc_close_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
|
||||
if (response != GTK_RESPONSE_APPLY)
|
||||
gnc_close_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1383,6 +1386,8 @@ gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog)
|
||||
label = GTK_WIDGET(gtk_builder_get_object (builder, "txf_category_label"));
|
||||
gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(tree_view));
|
||||
|
||||
ti_dialog->apply_button = GTK_WIDGET(gtk_builder_get_object (builder, "apply_button"));
|
||||
|
||||
button = GTK_WIDGET(gtk_builder_get_object (builder, "current_account_button"));
|
||||
ti_dialog->current_account_button = button;
|
||||
|
||||
|
@ -38,6 +38,21 @@
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="apply_button">
|
||||
<property name="label" translatable="yes">_Apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ok_button">
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
@ -50,7 +65,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@ -712,6 +727,7 @@
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-6">cancel_button</action-widget>
|
||||
<action-widget response="-10">apply_button</action-widget>
|
||||
<action-widget response="-5">ok_button</action-widget>
|
||||
</action-widgets>
|
||||
<child type="titlebar">
|
||||
|
Loading…
Reference in New Issue
Block a user