Skip to content

Commit

Permalink
[autoclear] show cleared splits is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Nov 4, 2020
1 parent 54f614f commit d1d4647
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gnucash/gnome/window-autoclear.c
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 16 additions & 0 deletions gnucash/gtkbuilder/window-autoclear.glade
Expand Up @@ -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>
Expand Down

0 comments on commit d1d4647

Please sign in to comment.