gnucash master: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Fri May 8 09:20:54 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/32e19170 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6013cb6b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d74225f6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/49eee35a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c4e41384 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/881f89ad (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8500f36c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ccc1247e (commit)
	from  https://github.com/Gnucash/gnucash/commit/20d53cc7 (commit)



commit 32e1917017437cb717c64789fa7d5e115cdea9fb
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:08:41 2020 +0100

    Transaction matcher dialogue was not closing when changing book.

diff --git a/gnucash/gnome/dialog-trans-assoc.c b/gnucash/gnome/dialog-trans-assoc.c
index 41ade836c..2af97f516 100644
--- a/gnucash/gnome/dialog-trans-assoc.c
+++ b/gnucash/gnome/dialog-trans-assoc.c
@@ -29,6 +29,7 @@
 
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
+#include "gnc-session.h"
 #include "Query.h"
 #include "Transaction.h"
 
@@ -54,6 +55,8 @@ typedef struct
     GtkWidget    *view;
     const gchar  *path_head;
     gboolean      path_head_set;
+    gint          component_id;
+    QofSession   *session;
 }AssocDialog;
 
 /* This static indicates the debugging module that this .o belongs to.  */
@@ -67,7 +70,8 @@ gnc_assoc_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data)
     AssocDialog *assoc_dialog = user_data;
 
     ENTER(" ");
-    gnc_unregister_gui_component_by_data (DIALOG_ASSOC_CM_CLASS, assoc_dialog);
+    gnc_unregister_gui_component (assoc_dialog->component_id);
+
     if (assoc_dialog->window)
     {
         gtk_widget_destroy (assoc_dialog->window);
@@ -263,7 +267,7 @@ static void
 gnc_assoc_dialog_close_button_cb (GtkWidget * widget, gpointer user_data)
 {
     AssocDialog   *assoc_dialog = user_data;
-    gnc_close_gui_component_by_data (DIALOG_ASSOC_CM_CLASS, assoc_dialog);
+    gnc_close_gui_component (assoc_dialog->component_id);
 }
 
 static void
@@ -471,6 +475,8 @@ gnc_assoc_dialog_create (GtkWindow *parent, AssocDialog *assoc_dialog)
 
     window = GTK_WIDGET(gtk_builder_get_object (builder, "transaction_association_window"));
     assoc_dialog->window = window;
+    assoc_dialog->session = gnc_get_current_session();
+
 
     button = GTK_WIDGET(gtk_builder_get_object (builder, "sort_button"));
         g_signal_connect(button, "clicked", G_CALLBACK(gnc_assoc_dialog_sort_button_cb), assoc_dialog);
@@ -628,9 +634,12 @@ gnc_trans_assoc_dialog (GtkWindow *parent)
 
     gnc_assoc_dialog_create (parent, assoc_dialog);
 
-    gnc_register_gui_component (DIALOG_ASSOC_CM_CLASS,
-                   refresh_handler, close_handler,
-                   assoc_dialog);
+    assoc_dialog->component_id = gnc_register_gui_component (DIALOG_ASSOC_CM_CLASS,
+                                                             refresh_handler, close_handler,
+                                                             assoc_dialog);
+
+    gnc_gui_component_set_session (assoc_dialog->component_id,
+                                   assoc_dialog->session);
 
     LEAVE(" ");
 }

commit 6013cb6b14f8dc841e4aa612b8668439634808e6
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:08:03 2020 +0100

    Correct parent widget for import new account dialog.

diff --git a/gnucash/import-export/ofx/gnc-ofx-import.c b/gnucash/import-export/ofx/gnc-ofx-import.c
index 576441763..ef39d5d66 100644
--- a/gnucash/import-export/ofx/gnc-ofx-import.c
+++ b/gnucash/import-export/ofx/gnc-ofx-import.c
@@ -1002,7 +1002,8 @@ int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data)
                                   "%s \"%s\"",
                                   account_type_name,
                                   data.account_name);
-        account = gnc_import_select_account (gnc_gen_trans_list_widget(gnc_ofx_importer_gui),
+        /* use the info->parent as import-matcher is not displayed yet */
+        account = gnc_import_select_account (GTK_WIDGET(info->parent),
                                              data.account_id, 1,
                                              account_description, default_commodity,
                                              default_type, NULL, NULL);

commit d74225f6c07fffa41d3c9be14170b4306faf0da0
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:07:21 2020 +0100

    Change layout of source file dialog-billterms.c
    
    Remove tabs and spaces in source file.

diff --git a/gnucash/gnome/dialog-billterms.c b/gnucash/gnome/dialog-billterms.c
index f5456669b..14fa85dbb 100644
--- a/gnucash/gnome/dialog-billterms.c
+++ b/gnucash/gnome/dialog-billterms.c
@@ -56,47 +56,47 @@ void billterms_type_combobox_changed (GtkComboBox *cb, gpointer data);
 
 typedef struct _billterm_notebook
 {
-    GtkWidget *		notebook;
+    GtkWidget *notebook;
 
     /* "Days" widgets */
-    GtkWidget *		days_due_days;
-    GtkWidget *		days_disc_days;
-    GtkWidget *		days_disc;
+    GtkWidget *days_due_days;
+    GtkWidget *days_disc_days;
+    GtkWidget *days_disc;
 
     /* "Proximo" widgets */
-    GtkWidget *		prox_due_day;
-    GtkWidget *		prox_disc_day;
-    GtkWidget *		prox_disc;
-    GtkWidget *		prox_cutoff;
+    GtkWidget *prox_due_day;
+    GtkWidget *prox_disc_day;
+    GtkWidget *prox_disc;
+    GtkWidget *prox_cutoff;
 
     /* What kind of term is this? */
-    GncBillTermType	type;
+    GncBillTermType type;
 } BillTermNB;
 
 struct _billterms_window
 {
-    GtkWidget *	window;
-    GtkWidget *	terms_view;
-    GtkWidget *	desc_entry;
-    GtkWidget *	type_label;
-    GtkWidget *	term_vbox;
-    BillTermNB	notebook;
-
-    GncBillTerm *	current_term;
-    QofBook *	book;
-    gint		component_id;
-    QofSession *session;
+    GtkWidget *window;
+    GtkWidget *terms_view;
+    GtkWidget *desc_entry;
+    GtkWidget *type_label;
+    GtkWidget *term_vbox;
+    BillTermNB notebook;
+
+    GncBillTerm *current_term;
+    QofBook     *book;
+    gint         component_id;
+    QofSession  *session;
 };
 
 typedef struct _new_billterms
 {
-    GtkWidget *	dialog;
-    GtkWidget *	name_entry;
-    GtkWidget *	desc_entry;
-    BillTermNB	notebook;
+    GtkWidget *dialog;
+    GtkWidget *name_entry;
+    GtkWidget *desc_entry;
+    BillTermNB notebook;
 
-    BillTermsWindow *	btw;
-    GncBillTerm *	this_term;
+    BillTermsWindow *btw;
+    GncBillTerm     *this_term;
 } NewBillTerm;
 
 
@@ -107,8 +107,8 @@ read_widget (GtkBuilder *builder, char *name, gboolean read_only)
     if (read_only)
     {
         GtkAdjustment *adj;
-        gtk_editable_set_editable (GTK_EDITABLE (widget), FALSE);
-        adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
+        gtk_editable_set_editable (GTK_EDITABLE(widget), FALSE);
+        adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON(widget));
         gtk_adjustment_set_step_increment (adj, 0.0);
         gtk_adjustment_set_page_increment (adj, 0.0);
     }
@@ -125,7 +125,7 @@ init_notebook_widgets (BillTermNB *notebook, gboolean read_only,
     GtkWidget *parent;
 
     /* Load the notebook from Glade File */
-    builder = gtk_builder_new();
+    builder = gtk_builder_new ();
     gnc_builder_add_from_file (builder, "dialog-billterms.glade", "discount_adj");
     gnc_builder_add_from_file (builder, "dialog-billterms.glade", "discount_days_adj");
     gnc_builder_add_from_file (builder, "dialog-billterms.glade", "due_days_adj");
@@ -154,8 +154,8 @@ init_notebook_widgets (BillTermNB *notebook, gboolean read_only,
 
     /* Disconnect the notebook from the window */
     g_object_ref (notebook->notebook);
-    gtk_container_remove (GTK_CONTAINER (parent), notebook->notebook);
-    g_object_unref(G_OBJECT(builder));
+    gtk_container_remove (GTK_CONTAINER(parent), notebook->notebook);
+    g_object_unref (G_OBJECT(builder));
     gtk_widget_destroy (parent);
 
     /* NOTE: The caller needs to unref once they attach */
@@ -168,7 +168,7 @@ set_numeric (GtkWidget *widget, GncBillTerm *term,
     gnc_numeric val;
     gdouble fl = 0.0;
 
-    fl = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget));
+    fl = gtk_spin_button_get_value (GTK_SPIN_BUTTON(widget));
     val = double_to_gnc_numeric (fl, 100000, GNC_HOW_RND_ROUND_HALF_UP);
     func (term, val);
 }
@@ -182,7 +182,7 @@ get_numeric (GtkWidget *widget, GncBillTerm *term,
 
     val = func (term);
     fl = gnc_numeric_to_double (val);
-    gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), fl);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), fl);
 }
 
 static void
@@ -191,7 +191,7 @@ set_int (GtkWidget *widget, GncBillTerm *term,
 {
     gint val;
 
-    val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
+    val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(widget));
     func (term, val);
 }
 
@@ -202,7 +202,7 @@ get_int (GtkWidget *widget, GncBillTerm *term,
     gint val;
 
     val = func (term);
-    gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gfloat)val);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), (gfloat)val);
 }
 
 /* return TRUE if anything truly changed */
@@ -216,7 +216,7 @@ ui_to_billterm (NewBillTerm *nbt)
     term = nbt->this_term;
     notebook = &nbt->notebook;
 
-    text = gtk_entry_get_text (GTK_ENTRY (nbt->desc_entry));
+    text = gtk_entry_get_text (GTK_ENTRY(nbt->desc_entry));
     if (text)
         gncBillTermSetDescription (term, text);
 
@@ -244,7 +244,7 @@ ui_to_billterm (NewBillTerm *nbt)
 static void
 billterm_to_ui (GncBillTerm *term, GtkWidget *desc, BillTermNB *notebook)
 {
-    gtk_entry_set_text (GTK_ENTRY (desc), gncBillTermGetDescription (term));
+    gtk_entry_set_text (GTK_ENTRY(desc), gncBillTermGetDescription (term));
     notebook->type = gncBillTermGetType (term);
 
     switch (notebook->type)
@@ -274,28 +274,28 @@ verify_term_ok (NewBillTerm *nbt)
     gint prox_due_days, prox_disc_days;
 
     notebook = &nbt->notebook;
-    result=TRUE;
+    result = TRUE;
 
 
-    days_due_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->days_due_days));
-    days_disc_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->days_disc_days));
-    prox_due_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->prox_due_day));
-    prox_disc_days=gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (notebook->prox_disc_day));
+    days_due_days = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(notebook->days_due_days));
+    days_disc_days = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(notebook->days_disc_days));
+    prox_due_days = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(notebook->prox_due_day));
+    prox_disc_days = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(notebook->prox_disc_day));
 
     switch (nbt->notebook.type)
     {
     case GNC_TERM_TYPE_DAYS:
         if (days_due_days<days_disc_days)
         {
-              gnc_error_dialog (GTK_WINDOW (nbt->dialog), "%s", message);
-              result=FALSE;
+              gnc_error_dialog (GTK_WINDOW(nbt->dialog), "%s", message);
+              result = FALSE;
         }
         break;
     case GNC_TERM_TYPE_PROXIMO:
-	if (prox_due_days<prox_disc_days)
+    if (prox_due_days<prox_disc_days)
         {
-            gnc_error_dialog (GTK_WINDOW (nbt->dialog), "%s", message);
-            result=FALSE;
+            gnc_error_dialog (GTK_WINDOW(nbt->dialog), "%s", message);
+            result = FALSE;
         }
         break;
     }
@@ -318,19 +318,19 @@ new_billterm_ok_cb (NewBillTerm *nbt)
     /* verify the name, maybe */
     if (nbt->this_term == NULL)
     {
-        name = gtk_entry_get_text (GTK_ENTRY (nbt->name_entry));
+        name = gtk_entry_get_text (GTK_ENTRY(nbt->name_entry));
         if (name == NULL || *name == '\0')
         {
             message = _("You must provide a name for this Billing Term.");
-            gnc_error_dialog (GTK_WINDOW (nbt->dialog), "%s", message);
+            gnc_error_dialog (GTK_WINDOW(nbt->dialog), "%s", message);
             return FALSE;
         }
         if (gncBillTermLookupByName (btw->book, name))
         {
-            message = g_strdup_printf(_(
+            message = g_strdup_printf (_(
                                           "You must provide a unique name for this Billing Term. "
                                           "Your choice \"%s\" is already in use."), name);
-            gnc_error_dialog (GTK_WINDOW (nbt->dialog), "%s", message);
+            gnc_error_dialog (GTK_WINDOW(nbt->dialog), "%s", message);
             g_free (message);
             return FALSE;
         }
@@ -361,7 +361,7 @@ new_billterm_ok_cb (NewBillTerm *nbt)
     /* Mark the table as changed and commit it */
     gncBillTermCommitEdit (btw->current_term);
 
-    gnc_resume_gui_refresh();
+    gnc_resume_gui_refresh ();
     return TRUE;
 }
 
@@ -369,7 +369,7 @@ static void
 show_notebook (BillTermNB *notebook)
 {
     g_return_if_fail (notebook->type > 0);
-    gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook->notebook),
+    gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook->notebook),
                                    notebook->type - 1);
 }
 
@@ -391,7 +391,7 @@ billterms_type_combobox_changed (GtkComboBox *cb, gpointer data)
     NewBillTerm *nbt = data;
     gint value;
 
-    value = gtk_combo_box_get_active(cb);
+    value = gtk_combo_box_get_active (cb);
     maybe_set_type (nbt, value + 1);
 }
 
@@ -431,7 +431,7 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
         dialog_combo = "type_combo";
         dialog_nb = "notebook_hbox";
     }
-    builder = gtk_builder_new();
+    builder = gtk_builder_new ();
     gnc_builder_add_from_file (builder, "dialog-billterms.glade", "type_liststore");
     gnc_builder_add_from_file (builder, "dialog-billterms.glade", dialog_name);
     nbt->dialog = GTK_WIDGET(gtk_builder_get_object (builder, dialog_name));
@@ -443,14 +443,14 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
     gnc_widget_style_context_add_class (GTK_WIDGET(nbt->dialog), "gnc-class-bill-terms");
 
     if (name)
-        gtk_entry_set_text (GTK_ENTRY (nbt->name_entry), name);
+        gtk_entry_set_text (GTK_ENTRY(nbt->name_entry), name);
 
     /* Initialize the notebook widgets */
     init_notebook_widgets (&nbt->notebook, FALSE, nbt);
 
     /* Attach the notebook */
     box = GTK_WIDGET(gtk_builder_get_object (builder, dialog_nb));
-    gtk_box_pack_start (GTK_BOX (box), nbt->notebook.notebook, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX(box), nbt->notebook.notebook, TRUE, TRUE, 0);
     g_object_unref (nbt->notebook.notebook);
 
     /* Fill in the widgets appropriately */
@@ -461,7 +461,7 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
 
     /* Create the menu */
     combo_box = GTK_WIDGET(gtk_builder_get_object (builder, dialog_combo));
-    gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), nbt->notebook.type - 1);
+    gtk_combo_box_set_active (GTK_COMBO_BOX(combo_box), nbt->notebook.type - 1);
 
     /* Show the right notebook page */
     show_notebook (&nbt->notebook);
@@ -484,7 +484,7 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
     done = FALSE;
     while (!done)
     {
-        response = gtk_dialog_run (GTK_DIALOG (nbt->dialog));
+        response = gtk_dialog_run (GTK_DIALOG(nbt->dialog));
         switch (response)
         {
         case GTK_RESPONSE_OK:
@@ -500,10 +500,10 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
         }
     }
 
-    g_object_unref(G_OBJECT(builder));
+    g_object_unref (G_OBJECT(builder));
 
-    gtk_widget_destroy(nbt->dialog);
-    g_free(nbt);
+    gtk_widget_destroy (nbt->dialog);
+    g_free (nbt);
 
     return created_term;
 }
@@ -538,7 +538,7 @@ billterms_term_refresh (BillTermsWindow *btw)
         break;
     }
     show_notebook (&btw->notebook);
-    gtk_label_set_text (GTK_LABEL (btw->type_label), type_label);
+    gtk_label_set_text (GTK_LABEL(btw->type_label), type_label);
 }
 
 static void
@@ -554,9 +554,9 @@ billterms_window_refresh (BillTermsWindow *btw)
     GtkTreeRowReference *reference = NULL;
 
     g_return_if_fail (btw);
-    view = GTK_TREE_VIEW (btw->terms_view);
-    store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
-    selection = gtk_tree_view_get_selection(view);
+    view = GTK_TREE_VIEW(btw->terms_view);
+    store = GTK_LIST_STORE(gtk_tree_view_get_model (view));
+    selection = gtk_tree_view_get_selection (view);
 
     /* Clear the list */
     gtk_list_store_clear (store);
@@ -583,16 +583,16 @@ billterms_window_refresh (BillTermsWindow *btw)
                                         gncBillTermGetGUID (term),
                                         QOF_EVENT_MODIFY);
 
-        gtk_list_store_prepend(store, &iter);
-        gtk_list_store_set(store, &iter,
-                           BILL_TERM_COL_NAME, gncBillTermGetName(term),
-                           BILL_TERM_COL_TERM, term,
-                           -1);
+        gtk_list_store_prepend (store, &iter);
+        gtk_list_store_set (store, &iter,
+                            BILL_TERM_COL_NAME, gncBillTermGetName (term),
+                            BILL_TERM_COL_TERM, term,
+                            -1);
         if (term == btw->current_term)
         {
-            path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
-            reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), path);
-            gtk_tree_path_free(path);
+            path = gtk_tree_model_get_path (GTK_TREE_MODEL(store), &iter);
+            reference = gtk_tree_row_reference_new (GTK_TREE_MODEL(store), path);
+            gtk_tree_path_free (path);
         }
     }
 
@@ -604,13 +604,13 @@ billterms_window_refresh (BillTermsWindow *btw)
 
     if (reference)
     {
-        path = gtk_tree_row_reference_get_path(reference);
-        gtk_tree_row_reference_free(reference);
+        path = gtk_tree_row_reference_get_path (reference);
+        gtk_tree_row_reference_free (reference);
         if (path)
         {
-            gtk_tree_selection_select_path(selection, path);
-            gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
-            gtk_tree_path_free(path);
+            gtk_tree_selection_select_path (selection, path);
+            gtk_tree_view_scroll_to_cell (view, path, NULL, TRUE, 0.5, 0.0);
+            gtk_tree_path_free (path);
         }
     }
     else
@@ -631,8 +631,8 @@ billterm_selection_changed (GtkTreeSelection *selection,
 
     g_return_if_fail (btw);
 
-    if (gtk_tree_selection_get_selected(selection, &model, &iter))
-        gtk_tree_model_get(model, &iter, BILL_TERM_COL_TERM, &term, -1);
+    if (gtk_tree_selection_get_selected (selection, &model, &iter))
+        gtk_tree_model_get (model, &iter, BILL_TERM_COL_TERM, &term, -1);
 
     /* If we've changed, then reset the term list */
     if (GNC_IS_BILLTERM(term) && (term != btw->current_term))
@@ -668,13 +668,13 @@ billterms_delete_term_cb (GtkButton *button, BillTermsWindow *btw)
 
     if (gncBillTermGetRefcount (btw->current_term) > 0)
     {
-        gnc_error_dialog (GTK_WINDOW (btw->window),
+        gnc_error_dialog (GTK_WINDOW(btw->window),
                           _("Term \"%s\" is in use. You cannot delete it."),
                           gncBillTermGetName (btw->current_term));
         return;
     }
 
-    if (gnc_verify_dialog (GTK_WINDOW (btw->window), FALSE,
+    if (gnc_verify_dialog (GTK_WINDOW(btw->window), FALSE,
                            _("Are you sure you want to delete \"%s\"?"),
                            gncBillTermGetName (btw->current_term)))
     {
@@ -774,10 +774,10 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
     /* Didn't find one -- create a new window */
     btw = g_new0 (BillTermsWindow, 1);
     btw->book = book;
-    btw->session = gnc_get_current_session();
+    btw->session = gnc_get_current_session ();
 
     /* Open and read the Glade File */
-    builder = gtk_builder_new();
+    builder = gtk_builder_new ();
     gnc_builder_add_from_file (builder, "dialog-billterms.glade", "terms_window");
     btw->window = GTK_WIDGET(gtk_builder_get_object (builder, "terms_window"));
     btw->terms_view = GTK_WIDGET(gtk_builder_get_object (builder, "terms_view"));
@@ -792,27 +792,27 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
     /* Initialize the view */
     view = GTK_TREE_VIEW(btw->terms_view);
     store = gtk_list_store_new (NUM_BILL_TERM_COLS, G_TYPE_STRING, G_TYPE_POINTER);
-    gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
-    g_object_unref(store);
+    gtk_tree_view_set_model (view, GTK_TREE_MODEL(store));
+    g_object_unref (store);
 
-    renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("", renderer,
+    renderer = gtk_cell_renderer_text_new ();
+    column = gtk_tree_view_column_new_with_attributes ("", renderer,
              "text", BILL_TERM_COL_NAME,
              NULL);
-    gtk_tree_view_append_column(view, column);
+    gtk_tree_view_append_column (view, column);
 
-    g_signal_connect(view, "row-activated",
-                     G_CALLBACK(billterm_selection_activated), btw);
-    selection = gtk_tree_view_get_selection(view);
-    g_signal_connect(selection, "changed",
-                     G_CALLBACK(billterm_selection_changed), btw);
+    g_signal_connect (view, "row-activated",
+                      G_CALLBACK(billterm_selection_activated), btw);
+    selection = gtk_tree_view_get_selection (view);
+    g_signal_connect (selection, "changed",
+                      G_CALLBACK(billterm_selection_changed), btw);
 
     /* Initialize the notebook widgets */
     init_notebook_widgets (&btw->notebook, TRUE, btw);
 
     /* Attach the notebook */
     widget = GTK_WIDGET(gtk_builder_get_object (builder, "notebook_box"));
-    gtk_box_pack_start (GTK_BOX (widget), btw->notebook.notebook,
+    gtk_box_pack_start (GTK_BOX(widget), btw->notebook.notebook,
                         TRUE, TRUE, 0);
     g_object_unref (btw->notebook.notebook);
 
@@ -831,7 +831,7 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
     gtk_widget_show_all (btw->window);
     billterms_window_refresh (btw);
 
-    g_object_unref(G_OBJECT(builder));
+    g_object_unref (G_OBJECT(builder));
 
     return btw;
 }

commit 49eee35a89c0f247d156c9da3bd0edc27424d9ee
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:06:46 2020 +0100

    No Selection on load for Bill Terms
    
    Change the selection process so it selects the first entry if present
    on load and also selects a newly created entry when completed.

diff --git a/gnucash/gnome/dialog-billterms.c b/gnucash/gnome/dialog-billterms.c
index d9071c7a8..f5456669b 100644
--- a/gnucash/gnome/dialog-billterms.c
+++ b/gnucash/gnome/dialog-billterms.c
@@ -556,6 +556,7 @@ billterms_window_refresh (BillTermsWindow *btw)
     g_return_if_fail (btw);
     view = GTK_TREE_VIEW (btw->terms_view);
     store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
+    selection = gtk_tree_view_get_selection(view);
 
     /* Clear the list */
     gtk_list_store_clear (store);
@@ -607,12 +608,17 @@ billterms_window_refresh (BillTermsWindow *btw)
         gtk_tree_row_reference_free(reference);
         if (path)
         {
-            selection = gtk_tree_view_get_selection(view);
             gtk_tree_selection_select_path(selection, path);
             gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
             gtk_tree_path_free(path);
         }
     }
+    else
+    {
+        GtkTreeIter iter;
+        if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL(store), &iter))
+            gtk_tree_selection_select_iter (selection, &iter);
+    }
 }
 
 static void
@@ -629,7 +635,7 @@ billterm_selection_changed (GtkTreeSelection *selection,
         gtk_tree_model_get(model, &iter, BILL_TERM_COL_TERM, &term, -1);
 
     /* If we've changed, then reset the term list */
-    if (term != btw->current_term)
+    if (GNC_IS_BILLTERM(term) && (term != btw->current_term))
         btw->current_term = term;
 
     /* And force a refresh of the entries */

commit c4e41384f2688241ca99095db8fb355ef5b33233
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:05:38 2020 +0100

    Bug 797689 - Change the Bill Terms Table dialogue to be based on a
     GtkWindow
    
    When using Gnucash on Microsoft Windows and a dialog opens a further
    dialog when you switch away from the application and back the last
    dialog that has the focus is behind the parent and it appears like the
    application has froze. To fix this try to use only one level of dialogue
    so change the Bill Terms Table to use a Window with no transient parent.

diff --git a/gnucash/gnome/dialog-billterms.c b/gnucash/gnome/dialog-billterms.c
index 4f2b1b2a6..d9071c7a8 100644
--- a/gnucash/gnome/dialog-billterms.c
+++ b/gnucash/gnome/dialog-billterms.c
@@ -29,6 +29,7 @@
 
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
+#include "gnc-session.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
@@ -74,7 +75,7 @@ typedef struct _billterm_notebook
 
 struct _billterms_window
 {
-    GtkWidget *	dialog;
+    GtkWidget *	window;
     GtkWidget *	terms_view;
     GtkWidget *	desc_entry;
     GtkWidget *	type_label;
@@ -84,6 +85,7 @@ struct _billterms_window
     GncBillTerm *	current_term;
     QofBook *	book;
     gint		component_id;
+    QofSession *session;
 };
 
 typedef struct _new_billterms
@@ -117,7 +119,7 @@ read_widget (GtkBuilder *builder, char *name, gboolean read_only)
 /* NOTE: The caller needs to unref once they attach */
 static void
 init_notebook_widgets (BillTermNB *notebook, gboolean read_only,
-                       GtkDialog *dialog, gpointer user_data)
+                       gpointer user_data)
 {
     GtkBuilder *builder;
     GtkWidget *parent;
@@ -444,8 +446,7 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
         gtk_entry_set_text (GTK_ENTRY (nbt->name_entry), name);
 
     /* Initialize the notebook widgets */
-    init_notebook_widgets (&nbt->notebook, FALSE,
-                           GTK_DIALOG (nbt->dialog), nbt);
+    init_notebook_widgets (&nbt->notebook, FALSE, nbt);
 
     /* Attach the notebook */
     box = GTK_WIDGET(gtk_builder_get_object (builder, dialog_nb));
@@ -469,7 +470,7 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
     gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, nbt);
 
     gtk_window_set_transient_for (GTK_WINDOW(nbt->dialog),
-                                  GTK_WINDOW(btw->dialog));
+                                  GTK_WINDOW(btw->window));
 
     /* Show what we should */
     gtk_widget_show_all (nbt->dialog);
@@ -661,13 +662,13 @@ billterms_delete_term_cb (GtkButton *button, BillTermsWindow *btw)
 
     if (gncBillTermGetRefcount (btw->current_term) > 0)
     {
-        gnc_error_dialog (GTK_WINDOW (btw->dialog),
+        gnc_error_dialog (GTK_WINDOW (btw->window),
                           _("Term \"%s\" is in use. You cannot delete it."),
                           gncBillTermGetName (btw->current_term));
         return;
     }
 
-    if (gnc_verify_dialog (GTK_WINDOW (btw->dialog), FALSE,
+    if (gnc_verify_dialog (GTK_WINDOW (btw->window), FALSE,
                            _("Are you sure you want to delete \"%s\"?"),
                            gncBillTermGetName (btw->current_term)))
     {
@@ -704,7 +705,7 @@ billterms_window_close_handler (gpointer data)
     BillTermsWindow *btw = data;
     g_return_if_fail (btw);
 
-    gtk_widget_destroy (btw->dialog);
+    gtk_widget_destroy (btw->window);
 }
 
 void
@@ -760,28 +761,27 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
                                         find_handler, book);
     if (btw)
     {
-        gtk_window_present (GTK_WINDOW(btw->dialog));
+        gtk_window_present (GTK_WINDOW(btw->window));
         return btw;
     }
 
     /* Didn't find one -- create a new window */
     btw = g_new0 (BillTermsWindow, 1);
     btw->book = book;
+    btw->session = gnc_get_current_session();
 
     /* Open and read the Glade File */
     builder = gtk_builder_new();
-    gnc_builder_add_from_file (builder, "dialog-billterms.glade", "terms_dialog");
-    btw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "terms_dialog"));
+    gnc_builder_add_from_file (builder, "dialog-billterms.glade", "terms_window");
+    btw->window = GTK_WIDGET(gtk_builder_get_object (builder, "terms_window"));
     btw->terms_view = GTK_WIDGET(gtk_builder_get_object (builder, "terms_view"));
     btw->desc_entry = GTK_WIDGET(gtk_builder_get_object (builder, "desc_entry"));
     btw->type_label = GTK_WIDGET(gtk_builder_get_object (builder, "type_label"));
     btw->term_vbox = GTK_WIDGET(gtk_builder_get_object (builder, "term_vbox"));
 
     // Set the name for this dialog so it can be easily manipulated with css
-    gtk_widget_set_name (GTK_WIDGET(btw->dialog), "gnc-id-bill-terms");
-    gnc_widget_style_context_add_class (GTK_WIDGET(btw->dialog), "gnc-class-bill-terms");
-
-    gtk_window_set_transient_for (GTK_WINDOW (btw->dialog), parent);
+    gtk_widget_set_name (GTK_WIDGET(btw->window), "gnc-id-bill-terms");
+    gnc_widget_style_context_add_class (GTK_WIDGET(btw->window), "gnc-class-bill-terms");
 
     /* Initialize the view */
     view = GTK_TREE_VIEW(btw->terms_view);
@@ -802,8 +802,7 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
                      G_CALLBACK(billterm_selection_changed), btw);
 
     /* Initialize the notebook widgets */
-    init_notebook_widgets (&btw->notebook, TRUE,
-                           GTK_DIALOG (btw->dialog), btw);
+    init_notebook_widgets (&btw->notebook, TRUE, btw);
 
     /* Attach the notebook */
     widget = GTK_WIDGET(gtk_builder_get_object (builder, "notebook_box"));
@@ -821,7 +820,9 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
                                     billterms_window_close_handler,
                                     btw);
 
-    gtk_widget_show_all (btw->dialog);
+    gnc_gui_component_set_session (btw->component_id, btw->session);
+
+    gtk_widget_show_all (btw->window);
     billterms_window_refresh (btw);
 
     g_object_unref(G_OBJECT(builder));
diff --git a/gnucash/gtkbuilder/dialog-billterms.glade b/gnucash/gtkbuilder/dialog-billterms.glade
index ae810f802..ce17b5bec 100644
--- a/gnucash/gtkbuilder/dialog-billterms.glade
+++ b/gnucash/gtkbuilder/dialog-billterms.glade
@@ -404,52 +404,20 @@
       </object>
     </child>
   </object>
-  <object class="GtkDialog" id="terms_dialog">
+  <object class="GtkWindow" id="terms_window">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Terms</property>
-    <property name="type_hint">dialog</property>
     <signal name="destroy" handler="billterms_window_destroy_cb" swapped="no"/>
     <child>
       <placeholder/>
     </child>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox5">
+    <child>
+      <object class="GtkBox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="border_width">6</property>
         <property name="orientation">vertical</property>
-        <property name="spacing">8</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area5">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label" translatable="yes">_Close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="has_tooltip">True</property>
-                <property name="tooltip_markup">Close this window</property>
-                <property name="tooltip_text" translatable="yes">Close this window</property>
-                <property name="use_underline">True</property>
-                <signal name="clicked" handler="billterms_window_close" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
+        <property name="spacing">6</property>
         <child>
           <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
@@ -488,7 +456,7 @@
                         <property name="headers_visible">False</property>
                         <property name="rules_hint">True</property>
                         <child internal-child="selection">
-                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                          <object class="GtkTreeSelection"/>
                         </child>
                       </object>
                     </child>
@@ -670,8 +638,8 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="halign">start</property>
-                                <property name="margin_left">3</property>
-                                <property name="margin_right">3</property>
+                                <property name="margin_left">6</property>
+                                <property name="margin_right">6</property>
                                 <property name="margin_top">3</property>
                                 <property name="margin_bottom">3</property>
                                 <property name="label">(type)</property>
@@ -751,14 +719,43 @@
           <packing>
             <property name="expand">True</property>
             <property name="fill">True</property>
-            <property name="position">2</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="close_button">
+                <property name="label" translatable="yes">_Close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="has_tooltip">True</property>
+                <property name="tooltip_markup">Close this window</property>
+                <property name="tooltip_text" translatable="yes">Close this window</property>
+                <property name="use_underline">True</property>
+                <signal name="clicked" handler="billterms_window_close" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
-    <action-widgets>
-      <action-widget response="-6">close_button</action-widget>
-    </action-widgets>
   </object>
   <object class="GtkListStore" id="type_liststore">
     <columns>

commit 881f89addf36d4fb3913504a79cb48fc229c0cc1
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:05:02 2020 +0100

    Change layout of source file dialog-tax-tables.c
    
    Remove tabs and spaces in source file.

diff --git a/gnucash/gnome-utils/dialog-tax-table.c b/gnucash/gnome-utils/dialog-tax-table.c
index 5af0c81f7..081944a2a 100644
--- a/gnucash/gnome-utils/dialog-tax-table.c
+++ b/gnucash/gnome-utils/dialog-tax-table.c
@@ -71,29 +71,29 @@ void tax_table_window_destroy_cb (GtkWidget *widget, gpointer data);
 
 struct _taxtable_window
 {
-    GtkWidget *	dialog;
-    GtkWidget *	names_view;
-    GtkWidget *	entries_view;
-
-    GncTaxTable *	current_table;
-    GncTaxTableEntry *	current_entry;
-    QofBook *	book;
-    gint		component_id;
-    QofSession *session;
+    GtkWidget *dialog;
+    GtkWidget *names_view;
+    GtkWidget *entries_view;
+
+    GncTaxTable      *current_table;
+    GncTaxTableEntry *current_entry;
+    QofBook          *book;
+    gint              component_id;
+    QofSession       *session;
 };
 
 typedef struct _new_taxtable
 {
-    GtkWidget *	dialog;
-    GtkWidget *	name_entry;
-    GtkWidget *	amount_entry;
-    GtkWidget *	acct_tree;
-
-    GncTaxTable *		created_table;
-    TaxTableWindow *	ttw;
-    GncTaxTableEntry *	entry;
-    gint			type;
-    gboolean		new_table;
+    GtkWidget *dialog;
+    GtkWidget *name_entry;
+    GtkWidget *amount_entry;
+    GtkWidget *acct_tree;
+
+    GncTaxTable      *created_table;
+    TaxTableWindow   *ttw;
+    GncTaxTableEntry *entry;
+    gint              type;
+    gboolean          new_table;
 } NewTaxTable;
 
 static gboolean
@@ -113,32 +113,32 @@ new_tax_table_ok_cb (NewTaxTable *ntt)
     /* verify the name, maybe */
     if (ntt->new_table)
     {
-        name = gtk_entry_get_text (GTK_ENTRY (ntt->name_entry));
+        name = gtk_entry_get_text (GTK_ENTRY(ntt->name_entry));
         if (name == NULL || *name == '\0')
         {
             message = _("You must provide a name for this Tax Table.");
-            gnc_error_dialog (GTK_WINDOW (ntt->dialog), "%s", message);
+            gnc_error_dialog (GTK_WINDOW(ntt->dialog), "%s", message);
             return FALSE;
         }
         if (gncTaxTableLookupByName (ttw->book, name))
         {
-            message = g_strdup_printf(_(
+            message = g_strdup_printf (_(
                                           "You must provide a unique name for this Tax Table. "
                                           "Your choice \"%s\" is already in use."), name);
-            gnc_error_dialog (GTK_WINDOW (ntt->dialog), "%s", message);
+            gnc_error_dialog (GTK_WINDOW(ntt->dialog), "%s", message);
             g_free (message);
             return FALSE;
         }
     }
 
     /* verify the amount. Note that negative values are allowed (required for European tax rules) */
-    amount = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (ntt->amount_entry));
+    amount = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT(ntt->amount_entry));
     if (ntt->type == GNC_AMT_TYPE_PERCENT &&
             gnc_numeric_compare (gnc_numeric_abs (amount),
                                  gnc_numeric_create (100, 1)) > 0)
     {
         message = _("Percentage amount must be between -100 and 100.");
-        gnc_error_dialog (GTK_WINDOW (ntt->dialog), "%s", message);
+        gnc_error_dialog (GTK_WINDOW(ntt->dialog), "%s", message);
         return FALSE;
     }
 
@@ -147,7 +147,7 @@ new_tax_table_ok_cb (NewTaxTable *ntt)
     if (acc == NULL)
     {
         message = _("You must choose a Tax Account.");
-        gnc_error_dialog (GTK_WINDOW (ntt->dialog), "%s", message);
+        gnc_error_dialog (GTK_WINDOW(ntt->dialog), "%s", message);
         return FALSE;
     }
 
@@ -190,7 +190,7 @@ new_tax_table_ok_cb (NewTaxTable *ntt)
     gncTaxTableChanged (ttw->current_table);
     gncTaxTableCommitEdit (ttw->current_table);
 
-    gnc_resume_gui_refresh();
+    gnc_resume_gui_refresh ();
     return TRUE;
 }
 
@@ -199,10 +199,10 @@ combo_changed (GtkWidget *widget, NewTaxTable *ntt)
 {
     gint index;
 
-    g_return_if_fail(GTK_IS_COMBO_BOX(widget));
-    g_return_if_fail(ntt);
+    g_return_if_fail (GTK_IS_COMBO_BOX(widget));
+    g_return_if_fail (ntt);
 
-    index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+    index = gtk_combo_box_get_active (GTK_COMBO_BOX(widget));
     ntt->type = index + 1;
 }
 
@@ -231,7 +231,7 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
         ntt->type = GNC_AMT_TYPE_PERCENT;
 
     /* Open and read the Glade File */
-    builder = gtk_builder_new();
+    builder = gtk_builder_new ();
     gnc_builder_add_from_file (builder, "dialog-tax-table.glade", "type_liststore");
     gnc_builder_add_from_file (builder, "dialog-tax-table.glade", "new_tax_table_dialog");
 
@@ -243,43 +243,43 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
 
     ntt->name_entry = GTK_WIDGET(gtk_builder_get_object (builder, "name_entry"));
     if (name)
-        gtk_entry_set_text (GTK_ENTRY (ntt->name_entry), name);
+        gtk_entry_set_text (GTK_ENTRY(ntt->name_entry), name);
 
     /* Create the menu */
     combo = GTK_WIDGET(gtk_builder_get_object (builder, "type_combobox"));
     index = ntt->type ? ntt->type : GNC_AMT_TYPE_VALUE;
-    gtk_combo_box_set_active(GTK_COMBO_BOX(combo), index - 1);
-    g_signal_connect (combo, "changed", G_CALLBACK (combo_changed), ntt);
+    gtk_combo_box_set_active (GTK_COMBO_BOX(combo), index - 1);
+    g_signal_connect (combo, "changed", G_CALLBACK(combo_changed), ntt);
 
     /* Attach our own widgets */
     box = GTK_WIDGET(gtk_builder_get_object (builder, "amount_box"));
     ntt->amount_entry = widget = gnc_amount_edit_new ();
-    gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (widget), TRUE);
-    gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (widget), 100000);
-    gtk_box_pack_start (GTK_BOX (box), widget, TRUE, TRUE, 0);
+    gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT(widget), TRUE);
+    gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT(widget), 100000);
+    gtk_box_pack_start (GTK_BOX(box), widget, TRUE, TRUE, 0);
 
     box = GTK_WIDGET(gtk_builder_get_object (builder, "acct_window"));
     ntt->acct_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
-    gtk_container_add (GTK_CONTAINER (box), ntt->acct_tree);
+    gtk_container_add (GTK_CONTAINER(box), ntt->acct_tree);
     gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(ntt->acct_tree), FALSE);
 
     /* Make 'enter' do the right thing */
-    gtk_entry_set_activates_default(GTK_ENTRY (gnc_amount_edit_gtk_entry
-                                    (GNC_AMOUNT_EDIT (ntt->amount_entry))),
+    gtk_entry_set_activates_default (GTK_ENTRY(gnc_amount_edit_gtk_entry
+                                    (GNC_AMOUNT_EDIT(ntt->amount_entry))),
                                     TRUE);
 
     /* Fix mnemonics for generated target widgets */
     widget = GTK_WIDGET(gtk_builder_get_object (builder, "value_label"));
-    gtk_label_set_mnemonic_widget (GTK_LABEL (widget), ntt->amount_entry);
+    gtk_label_set_mnemonic_widget (GTK_LABEL(widget), ntt->amount_entry);
     widget = GTK_WIDGET(gtk_builder_get_object (builder, "account_label"));
-    gtk_label_set_mnemonic_widget (GTK_LABEL (widget), ntt->acct_tree);
+    gtk_label_set_mnemonic_widget (GTK_LABEL(widget), ntt->acct_tree);
 
     /* Fill in the widgets appropriately */
     if (entry)
     {
-        gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (ntt->amount_entry),
+        gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT(ntt->amount_entry),
                                     gncTaxTableEntryGetAmount (entry));
-        gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT (ntt->acct_tree),
+        gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT(ntt->acct_tree),
                 gncTaxTableEntryGetAccount (entry));
     }
 
@@ -300,7 +300,7 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
         /* Tables are great for layout, but a pain when you hide widgets */
         GTK_WIDGET(gtk_builder_get_object (builder, "ttd_table"));
         gtk_widget_grab_focus (gnc_amount_edit_gtk_entry
-                               (GNC_AMOUNT_EDIT (ntt->amount_entry)));
+                               (GNC_AMOUNT_EDIT(ntt->amount_entry)));
     }
     else
         gtk_widget_grab_focus (ntt->name_entry);
@@ -311,7 +311,7 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
     done = FALSE;
     while (!done)
     {
-        response = gtk_dialog_run (GTK_DIALOG (ntt->dialog));
+        response = gtk_dialog_run (GTK_DIALOG(ntt->dialog));
         switch (response)
         {
         case GTK_RESPONSE_OK:
@@ -327,10 +327,10 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
         }
     }
 
-    g_object_unref(G_OBJECT(builder));
+    g_object_unref (G_OBJECT(builder));
 
-    gtk_widget_destroy(ntt->dialog);
-    g_free(ntt);
+    gtk_widget_destroy (ntt->dialog);
+    g_free (ntt);
 
     return created_table;
 }
@@ -351,8 +351,8 @@ tax_table_entries_refresh (TaxTableWindow *ttw)
 
     g_return_if_fail (ttw);
 
-    view = GTK_TREE_VIEW (ttw->entries_view);
-    store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
+    view = GTK_TREE_VIEW(ttw->entries_view);
+    store = GTK_LIST_STORE(gtk_tree_view_get_model (view));
 
     /* Clear the list */
     selected_entry = ttw->current_entry;
@@ -392,17 +392,17 @@ tax_table_entries_refresh (TaxTableWindow *ttw)
              break;
         }
 
-        gtk_list_store_prepend(store, &iter);
-        gtk_list_store_set(store, &iter,
-                           TAX_ENTRY_COL_NAME, row_text[0],
-                           TAX_ENTRY_COL_POINTER, entry,
-                           TAX_ENTRY_COL_AMOUNT, row_text[1],
-                           -1);
+        gtk_list_store_prepend (store, &iter);
+        gtk_list_store_set (store, &iter,
+                            TAX_ENTRY_COL_NAME, row_text[0],
+                            TAX_ENTRY_COL_POINTER, entry,
+                            TAX_ENTRY_COL_AMOUNT, row_text[1],
+                            -1);
         if (entry == selected_entry)
         {
-            path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
-            reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), path);
-            gtk_tree_path_free(path);
+            path = gtk_tree_model_get_path (GTK_TREE_MODEL(store), &iter);
+            reference = gtk_tree_row_reference_new (GTK_TREE_MODEL(store), path);
+            gtk_tree_path_free (path);
         }
 
         g_free (row_text[0]);
@@ -411,14 +411,14 @@ tax_table_entries_refresh (TaxTableWindow *ttw)
 
     if (reference)
     {
-        path = gtk_tree_row_reference_get_path(reference);
-        gtk_tree_row_reference_free(reference);
+        path = gtk_tree_row_reference_get_path (reference);
+        gtk_tree_row_reference_free (reference);
         if (path)
         {
-            selection = gtk_tree_view_get_selection(view);
-            gtk_tree_selection_select_path(selection, path);
-            gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
-            gtk_tree_path_free(path);
+            selection = gtk_tree_view_get_selection (view);
+            gtk_tree_selection_select_path (selection, path);
+            gtk_tree_view_scroll_to_cell (view, path, NULL, TRUE, 0.5, 0.0);
+            gtk_tree_path_free (path);
         }
     }
 }
@@ -436,8 +436,8 @@ tax_table_window_refresh (TaxTableWindow *ttw)
     GncTaxTable *saved_current_table = ttw->current_table;
 
     g_return_if_fail (ttw);
-    view = GTK_TREE_VIEW (ttw->names_view);
-    store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
+    view = GTK_TREE_VIEW(ttw->names_view);
+    store = GTK_LIST_STORE(gtk_tree_view_get_model (view));
 
     /* Clear the list */
     gtk_list_store_clear(store);
@@ -457,17 +457,17 @@ tax_table_window_refresh (TaxTableWindow *ttw)
                                         gncTaxTableGetGUID (table),
                                         QOF_EVENT_MODIFY);
 
-        gtk_list_store_prepend(store, &iter);
-        gtk_list_store_set(store, &iter,
-                           TAX_TABLE_COL_NAME, gncTaxTableGetName (table),
-                           TAX_TABLE_COL_POINTER, table,
-                           -1);
+        gtk_list_store_prepend (store, &iter);
+        gtk_list_store_set (store, &iter,
+                            TAX_TABLE_COL_NAME, gncTaxTableGetName (table),
+                            TAX_TABLE_COL_POINTER, table,
+                            -1);
 
         if (table == saved_current_table)
         {
-            path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
-            reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), path);
-            gtk_tree_path_free(path);
+            path = gtk_tree_model_get_path (GTK_TREE_MODEL(store), &iter);
+            reference = gtk_tree_row_reference_new (GTK_TREE_MODEL(store), path);
+            gtk_tree_path_free (path);
         }
     }
 
@@ -480,14 +480,14 @@ tax_table_window_refresh (TaxTableWindow *ttw)
 
     if (reference)
     {
-        path = gtk_tree_row_reference_get_path(reference);
-        gtk_tree_row_reference_free(reference);
+        path = gtk_tree_row_reference_get_path (reference);
+        gtk_tree_row_reference_free (reference);
         if (path)
         {
-            selection = gtk_tree_view_get_selection(view);
-            gtk_tree_selection_select_path(selection, path);
-            gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
-            gtk_tree_path_free(path);
+            selection = gtk_tree_view_get_selection (view);
+            gtk_tree_selection_select_path (selection, path);
+            gtk_tree_view_scroll_to_cell (view, path, NULL, TRUE, 0.5, 0.0);
+            gtk_tree_path_free (path);
         }
     }
 
@@ -506,10 +506,10 @@ tax_table_selection_changed (GtkTreeSelection *selection,
 
     g_return_if_fail (ttw);
 
-    if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+    if (!gtk_tree_selection_get_selected (selection, &model, &iter))
         return;
 
-    gtk_tree_model_get(model, &iter, TAX_TABLE_COL_POINTER, &table, -1);
+    gtk_tree_model_get (model, &iter, TAX_TABLE_COL_POINTER, &table, -1);
     g_return_if_fail (table);
 
     /* If we've changed, then reset the entry list */
@@ -532,13 +532,13 @@ tax_table_entry_selection_changed (GtkTreeSelection *selection,
 
     g_return_if_fail (ttw);
 
-    if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+    if (!gtk_tree_selection_get_selected (selection, &model, &iter))
     {
         ttw->current_entry = NULL;
         return;
     }
 
-    gtk_tree_model_get(model, &iter, TAX_ENTRY_COL_POINTER, &ttw->current_entry, -1);
+    gtk_tree_model_get (model, &iter, TAX_ENTRY_COL_POINTER, &ttw->current_entry, -1);
 }
 
 static void
@@ -575,7 +575,7 @@ static const char
     GtkWidget *dvbox;
 
     main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
-    gtk_box_set_homogeneous (GTK_BOX (main_vbox), FALSE);
+    gtk_box_set_homogeneous (GTK_BOX(main_vbox), FALSE);
     gtk_container_set_border_width (GTK_CONTAINER(main_vbox), 6);
     gtk_widget_show (main_vbox);
 
@@ -585,7 +585,7 @@ static const char
     gtk_widget_show (label);
 
     vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
-    gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
+    gtk_box_set_homogeneous (GTK_BOX(vbox), TRUE);
     gtk_container_set_border_width (GTK_CONTAINER(vbox), 6);
     gtk_container_add (GTK_CONTAINER(main_vbox), vbox);
     gtk_widget_show (vbox);
@@ -611,7 +611,7 @@ static const char
         return NULL;
     }
 
-    text = g_strdup (gtk_entry_get_text (GTK_ENTRY (textbox)));
+    text = g_strdup (gtk_entry_get_text (GTK_ENTRY(textbox)));
     gtk_widget_destroy (dialog);
     return text;
 }
@@ -631,13 +631,13 @@ tax_table_rename_table_cb (GtkButton *button, TaxTableWindow *ttw)
                                        (_("Please enter new name")),
                                        (_("_Rename")), oldname);
 
-    if (newname && *newname != '\0' && (g_strcmp0(oldname, newname) != 0))
+    if (newname && *newname != '\0' && (g_strcmp0 (oldname, newname) != 0))
     {
         if (gncTaxTableLookupByName (ttw->book, newname))
         {
             char *message = g_strdup_printf (_("Tax table name \"%s\" already exists."),
                                              newname);
-            gnc_error_dialog (GTK_WINDOW (ttw->dialog), "%s", message);
+            gnc_error_dialog (GTK_WINDOW(ttw->dialog), "%s", message);
             g_free (message);
         }
         else
@@ -661,12 +661,12 @@ tax_table_delete_table_cb (GtkButton *button, TaxTableWindow *ttw)
         char *message =
             g_strdup_printf (_("Tax table \"%s\" is in use. You cannot delete it."),
                              gncTaxTableGetName (ttw->current_table));
-            gnc_error_dialog (GTK_WINDOW (ttw->dialog), "%s", message);
+            gnc_error_dialog (GTK_WINDOW(ttw->dialog), "%s", message);
         g_free (message);
         return;
     }
 
-    if (gnc_verify_dialog (GTK_WINDOW (ttw->dialog), FALSE,
+    if (gnc_verify_dialog (GTK_WINDOW(ttw->dialog), FALSE,
                            _("Are you sure you want to delete \"%s\"?"),
                            gncTaxTableGetName (ttw->current_table)))
     {
@@ -709,11 +709,11 @@ tax_table_delete_entry_cb (GtkButton *button, TaxTableWindow *ttw)
     {
         char *message = _("You cannot remove the last entry from the tax table. "
                           "Try deleting the tax table if you want to do that.");
-        gnc_error_dialog (GTK_WINDOW (ttw->dialog)  , "%s", message);
+        gnc_error_dialog (GTK_WINDOW(ttw->dialog)  , "%s", message);
         return;
     }
 
-    if (gnc_verify_dialog (GTK_WINDOW (ttw->dialog), FALSE, "%s",
+    if (gnc_verify_dialog (GTK_WINDOW(ttw->dialog), FALSE, "%s",
                            _("Are you sure you want to delete this entry?")))
     {
         /* Ok, let's remove it */
@@ -751,7 +751,7 @@ tax_table_window_close (GtkWidget *widget, gpointer data)
 {
     TaxTableWindow *ttw = data;
 
-    gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW (ttw->dialog));
+    gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(ttw->dialog));
     gnc_ui_tax_table_window_destroy (ttw);
 }
 
@@ -806,10 +806,10 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
     /* Didn't find one -- create a new window */
     ttw = g_new0 (TaxTableWindow, 1);
     ttw->book = book;
-    ttw->session = gnc_get_current_session();
+    ttw->session = gnc_get_current_session ();
 
     /* Open and read the Glade File */
-    builder = gtk_builder_new();
+    builder = gtk_builder_new ();
     gnc_builder_add_from_file (builder, "dialog-tax-table.glade", "tax_table_window");
     ttw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "tax_table_window"));
     ttw->names_view = GTK_WIDGET(gtk_builder_get_object (builder, "tax_tables_view"));
@@ -823,51 +823,51 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
     view = GTK_TREE_VIEW(ttw->names_view);
     store = gtk_list_store_new (NUM_TAX_TABLE_COLS, G_TYPE_STRING,
                                 G_TYPE_POINTER);
-    gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
-    g_object_unref(store);
+    gtk_tree_view_set_model (view, GTK_TREE_MODEL(store));
+    g_object_unref (store);
 
     /* default sort order */
     gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(store),
                                           TAX_TABLE_COL_NAME,
                                           GTK_SORT_ASCENDING);
 
-    renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("", renderer,
+    renderer = gtk_cell_renderer_text_new ();
+    column = gtk_tree_view_column_new_with_attributes ("", renderer,
              "text", TAX_TABLE_COL_NAME,
              NULL);
     g_object_set (G_OBJECT(column), "reorderable", TRUE, NULL);
-    gtk_tree_view_append_column(view, column);
+    gtk_tree_view_append_column (view, column);
     gtk_tree_view_column_set_sort_column_id (column, TAX_TABLE_COL_NAME);
 
-    selection = gtk_tree_view_get_selection(view);
-    g_signal_connect(selection, "changed",
-                     G_CALLBACK(tax_table_selection_changed), ttw);
+    selection = gtk_tree_view_get_selection (view);
+    g_signal_connect (selection, "changed",
+                      G_CALLBACK(tax_table_selection_changed), ttw);
 
     /* Create the tax table entries view */
     view = GTK_TREE_VIEW(ttw->entries_view);
     store = gtk_list_store_new (NUM_TAX_ENTRY_COLS, G_TYPE_STRING,
                                 G_TYPE_POINTER, G_TYPE_STRING);
-    gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
-    g_object_unref(store);
+    gtk_tree_view_set_model (view, GTK_TREE_MODEL(store));
+    g_object_unref (store);
 
     /* default sort order */
     gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(store),
                                           TAX_ENTRY_COL_NAME,
                                           GTK_SORT_ASCENDING);
 
-    renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("", renderer,
+    renderer = gtk_cell_renderer_text_new ();
+    column = gtk_tree_view_column_new_with_attributes ("", renderer,
              "text", TAX_ENTRY_COL_NAME,
              NULL);
     g_object_set (G_OBJECT(column), "reorderable", TRUE, NULL);
-    gtk_tree_view_append_column(view, column);
+    gtk_tree_view_append_column (view, column);
     gtk_tree_view_column_set_sort_column_id (column, TAX_ENTRY_COL_NAME);
 
-    selection = gtk_tree_view_get_selection(view);
-    g_signal_connect(selection, "changed",
-                     G_CALLBACK(tax_table_entry_selection_changed), ttw);
-    g_signal_connect(view, "row-activated",
-                     G_CALLBACK(tax_table_entry_row_activated), ttw);
+    selection = gtk_tree_view_get_selection (view);
+    g_signal_connect (selection, "changed",
+                      G_CALLBACK(tax_table_entry_selection_changed), ttw);
+    g_signal_connect (view, "row-activated",
+                      G_CALLBACK(tax_table_entry_row_activated), ttw);
 
     /* Setup signals */
     gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, ttw);
@@ -882,10 +882,10 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
     gnc_gui_component_set_session (ttw->component_id, ttw->session);
 
     tax_table_window_refresh (ttw);
-    gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW (ttw->dialog), parent);
+    gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(ttw->dialog), parent);
     gtk_widget_show_all (ttw->dialog);
 
-    g_object_unref(G_OBJECT(builder));
+    g_object_unref (G_OBJECT(builder));
 
     return ttw;
 }

commit 8500f36c441410309ed2ba90691b0ce67332e7fa
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:03:53 2020 +0100

    Change the Tax Table dialogue to be based on a GtkWindow
    
    When using Gnucash on Microsoft Windows and a dialog opens a further
    dialog when you switch away from the application and back the last
    dialog that has the focus is behind the parent and it appears like the
    application has froze. To fix this try to use only one level of dialogue
     so change the Tax Table to use a GtkWindow with no transient parent.

diff --git a/gnucash/gnome-utils/dialog-tax-table.c b/gnucash/gnome-utils/dialog-tax-table.c
index 352d82490..5af0c81f7 100644
--- a/gnucash/gnome-utils/dialog-tax-table.c
+++ b/gnucash/gnome-utils/dialog-tax-table.c
@@ -30,6 +30,7 @@
 
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
+#include "gnc-session.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
 #include "gnc-gtk-utils.h"
@@ -78,6 +79,7 @@ struct _taxtable_window
     GncTaxTableEntry *	current_entry;
     QofBook *	book;
     gint		component_id;
+    QofSession *session;
 };
 
 typedef struct _new_taxtable
@@ -804,16 +806,15 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
     /* Didn't find one -- create a new window */
     ttw = g_new0 (TaxTableWindow, 1);
     ttw->book = book;
+    ttw->session = gnc_get_current_session();
 
     /* Open and read the Glade File */
     builder = gtk_builder_new();
-    gnc_builder_add_from_file (builder, "dialog-tax-table.glade", "tax_table_window_dialog");
-    ttw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "tax_table_window_dialog"));
+    gnc_builder_add_from_file (builder, "dialog-tax-table.glade", "tax_table_window");
+    ttw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "tax_table_window"));
     ttw->names_view = GTK_WIDGET(gtk_builder_get_object (builder, "tax_tables_view"));
     ttw->entries_view = GTK_WIDGET(gtk_builder_get_object (builder, "tax_table_entries"));
 
-    gtk_window_set_transient_for (GTK_WINDOW (ttw->dialog), parent);
-
     // Set the name for this dialog so it can be easily manipulated with css
     gtk_widget_set_name (GTK_WIDGET(ttw->dialog), "gnc-id-new-tax-table");
     gnc_widget_style_context_add_class (GTK_WIDGET(ttw->dialog), "gnc-class-taxes");
@@ -878,6 +879,8 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
                                     tax_table_window_close_handler,
                                     ttw);
 
+    gnc_gui_component_set_session (ttw->component_id, ttw->session);
+
     tax_table_window_refresh (ttw);
     gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW (ttw->dialog), parent);
     gtk_widget_show_all (ttw->dialog);
diff --git a/gnucash/gtkbuilder/dialog-tax-table.glade b/gnucash/gtkbuilder/dialog-tax-table.glade
index f089dd746..af67efd2f 100644
--- a/gnucash/gtkbuilder/dialog-tax-table.glade
+++ b/gnucash/gtkbuilder/dialog-tax-table.glade
@@ -2,49 +2,18 @@
 <!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <object class="GtkDialog" id="tax_table_window_dialog">
+  <object class="GtkWindow" id="tax_table_window">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Tax Tables</property>
-    <property name="type_hint">normal</property>
     <signal name="destroy" handler="tax_table_window_destroy_cb" swapped="no"/>
     <child>
       <placeholder/>
     </child>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox4">
+    <child>
+      <object class="GtkBox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <property name="spacing">8</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area4">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label" translatable="yes">_Close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <signal name="clicked" handler="tax_table_window_close" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkBox" id="hbox4">
             <property name="visible">True</property>
@@ -84,7 +53,7 @@
                         <property name="headers_visible">False</property>
                         <property name="rules_hint">True</property>
                         <child internal-child="selection">
-                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                          <object class="GtkTreeSelection"/>
                         </child>
                       </object>
                     </child>
@@ -194,7 +163,7 @@
                         <property name="headers_visible">False</property>
                         <property name="rules_hint">True</property>
                         <child internal-child="selection">
-                          <object class="GtkTreeSelection" id="treeview-selection2"/>
+                          <object class="GtkTreeSelection"/>
                         </child>
                       </object>
                     </child>
@@ -274,14 +243,41 @@
           <packing>
             <property name="expand">True</property>
             <property name="fill">True</property>
-            <property name="position">2</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">6</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="close_button">
+                <property name="label" translatable="yes">_Close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+                <signal name="clicked" handler="tax_table_window_close" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
-    <action-widgets>
-      <action-widget response="-6">close_button</action-widget>
-    </action-widgets>
   </object>
   <object class="GtkListStore" id="type_liststore">
     <columns>

commit ccc1247e25a3759ac1f30dcaf9a63f5b536025d6
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 8 14:02:46 2020 +0100

    Align the import matcher help button
    
    Move the import matcher help button to the left in the CSV transaction
    importer.

diff --git a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
index 0acb790fc..522064704 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
@@ -2059,6 +2059,12 @@ CsvImpTransAssist::assist_match_page_prepare ()
     gtk_assistant_add_action_widget (csv_imp_asst, help_button);
     g_signal_connect (help_button, "clicked",
                      G_CALLBACK(on_matcher_help_clicked), gnc_csv_importer_gui);
+
+    // align the help button on the left side
+    auto action_box = gtk_widget_get_parent (help_button);
+    gtk_widget_set_halign (GTK_WIDGET(action_box), GTK_ALIGN_FILL);  
+    gtk_widget_set_hexpand (GTK_WIDGET(action_box), TRUE);
+    gtk_box_set_child_packing (GTK_BOX(action_box), help_button, FALSE, FALSE, 0, GTK_PACK_START);
     gtk_widget_show (GTK_WIDGET(help_button));
 
     /* Copy all of the transactions to the importer GUI. */



Summary of changes:
 gnucash/gnome-utils/dialog-tax-table.c             | 243 +++++++++++----------
 gnucash/gnome/dialog-billterms.c                   | 229 +++++++++----------
 gnucash/gnome/dialog-trans-assoc.c                 |  19 +-
 gnucash/gtkbuilder/dialog-billterms.glade          |  85 ++++---
 gnucash/gtkbuilder/dialog-tax-table.glade          |  76 +++----
 .../csv-imp/assistant-csv-trans-import.cpp         |   6 +
 gnucash/import-export/ofx/gnc-ofx-import.c         |   3 +-
 7 files changed, 340 insertions(+), 321 deletions(-)



More information about the gnucash-changes mailing list