[autoclear] show cleared splits is optional

This commit is contained in:
Christopher Lam
2020-11-04 11:18:36 +08:00
parent 54f614feed
commit d1d464738f
2 changed files with 25 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ struct _AutoClearWindow
GNCAmountEdit *end_value;/* The ending value */
GtkWidget *ok_button;
GtkWidget *cancel_button;
GtkWidget *show_cleared_splits_button;
GtkLabel *status_label;
};
@@ -151,7 +152,11 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
for (GList *node = toclear_list; node; node = node->next)
xaccSplitSetReconcile (node->data, CREC);
xaccAccountCommitEdit (data->account);
show_cleared_splits (toclear_list);
if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (data->show_cleared_splits_button)))
show_cleared_splits (toclear_list);
g_list_free (toclear_list);
/* Close window */
@@ -207,6 +212,9 @@ autoClearWindow (GtkWidget *parent, Account *account)
// Set the name for this dialog so it can be easily manipulated with css
gtk_widget_set_name (GTK_WIDGET(data->window), "gnc-id-auto-clear");
data->show_cleared_splits_button =
GTK_WIDGET (gtk_builder_get_object (builder, "show_cleared_splits_button"));
/* Add amount edit box */
data->end_value = GNC_AMOUNT_EDIT(gnc_amount_edit_new());
g_signal_connect(GTK_WIDGET(data->end_value), "activate",

View File

@@ -135,6 +135,22 @@ Use this dialog if you want GnuCash to automatically find which transactions are
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="show_cleared_splits_button">
<property name="label" translatable="yes">_Review cleared splits</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Select this option to open a register tab with newly cleared splits.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>