gnucash unstable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Dec 30 17:13:34 EST 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/0c6e2ebf (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5823f1b2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/477e71b7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/108f7fbd (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7c52f9ec (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7ec281f6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7dc3995a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/01ab8899 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/bde39c52 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/19e0f587 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b8a85ab8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/dc1ec686 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9f3a357a (commit)
	from  https://github.com/Gnucash/gnucash/commit/7feb9c65 (commit)



commit 0c6e2ebf8090ea693b02ee6b34c80f0ad088f695
Merge: 5823f1b 477e71b
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 30 13:58:04 2017 -0800

    Merge Bob Fewell's 'gtk3-update12' into unstable.


commit 5823f1b2bb6a927d9758958070bc65c46cd334da
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 30 12:06:52 2017 -0800

    Prevent "Save before closing" dialog from appearing at startup.
    
    Caused by simply loading the transaction report, which called
    gnc-get-current-book and that it in turn creates a session if one
    doesn't already exist.

diff --git a/gnucash/report/standard-reports/transaction.scm b/gnucash/report/standard-reports/transaction.scm
index 930fd71..0ee0df3 100644
--- a/gnucash/report/standard-reports/transaction.scm
+++ b/gnucash/report/standard-reports/transaction.scm
@@ -210,7 +210,8 @@ options specified in the Options panels."))
                                    (cons 'tip (_ "Sort by description."))
                                    (cons 'renderer-fn #f)))
 
-        (if (qof-book-use-split-action-for-num-field (gnc-get-current-book))
+        (if (and (gnc-current-session-exist)
+                 (qof-book-use-split-action-for-num-field (gnc-get-current-book)))
             (cons 'number    (list (cons 'sortkey (list SPLIT-ACTION))
                                    (cons 'split-sortvalue #f)
                                    (cons 'text (_ "Number/Action"))
diff --git a/libgnucash/engine/engine.i b/libgnucash/engine/engine.i
index ad1e5f3..4604f25 100644
--- a/libgnucash/engine/engine.i
+++ b/libgnucash/engine/engine.i
@@ -31,6 +31,7 @@
 #include "gnc-filepath-utils.h"
 #include "gnc-pricedb.h"
 #include "gnc-lot.h"
+#include "gnc-session.h"
 #include "gnc-hooks-scm.h"
 #include "engine-helpers.h"
 #include "engine-helpers-guile.h"
@@ -187,6 +188,7 @@ SplitList * qof_query_run_subquery (QofQuery *q, const QofQuery *q);
 
 %typemap(in) QofQueryParamList * "$1 = gnc_query_scm2path($input);"
 
+%include <gnc-session.h>
 %include <Query.h>
 %ignore qof_query_run;
 %ignore qof_query_last_run;

commit 477e71b7a8b23d8045236aedee7da84910b5f5ef
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:21:37 2017 +0000

    Fix register move to another window
    
    When the a register is moved to another window, the header ciaro surface
     is not created so test for one and create if null.

diff --git a/gnucash/register/register-gnome/gnucash-header.c b/gnucash/register/register-gnome/gnucash-header.c
index 156ae68..017a496 100644
--- a/gnucash/register/register-gnome/gnucash-header.c
+++ b/gnucash/register/register-gnome/gnucash-header.c
@@ -49,22 +49,6 @@ enum
     PROP_CURSOR_NAME, /* the name of the current cursor */
 };
 
-static gboolean
-gnc_header_draw (GtkWidget *header, cairo_t *cr)
-{
-    GnucashSheet *sheet = GNC_HEADER(header)->sheet;
-    GdkWindow *sheet_layout_win = gtk_layout_get_bin_window (GTK_LAYOUT(sheet));
-    gint x, y;
-
-    // use this to get the scroll x value to align the header
-    gdk_window_get_position (sheet_layout_win, &x, &y);
-
-    cairo_set_source_surface (cr, GNC_HEADER(header)->surface, x, 0);
-    cairo_paint (cr);
-
-    return TRUE;
-}
-
 static void
 gnc_header_draw_offscreen (GncHeader *header)
 {
@@ -202,6 +186,28 @@ gnc_header_draw_offscreen (GncHeader *header)
 }
 
 
+static gboolean
+gnc_header_draw (GtkWidget *header, cairo_t *cr)
+{
+    GnucashSheet *sheet = GNC_HEADER(header)->sheet;
+    GdkWindow *sheet_layout_win = gtk_layout_get_bin_window (GTK_LAYOUT(sheet));
+    gint x, y;
+
+    // use this to get the scroll x value to align the header
+    gdk_window_get_position (sheet_layout_win, &x, &y);
+
+    // if the register page is moved to another window, the surface is
+    // not created so test for a surface and create one if null
+    if (GNC_HEADER(header)->surface == NULL)
+        gnc_header_draw_offscreen (GNC_HEADER(header));
+
+    cairo_set_source_surface (cr, GNC_HEADER(header)->surface, x, 0);
+    cairo_paint (cr);
+
+    return TRUE;
+}
+
+
 void
 gnc_header_request_redraw (GncHeader *header)
 {

commit 108f7fbd117b32f7722fef89ffb8143a4031c07b
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:20:58 2017 +0000

    Fix some transient parent warnings

diff --git a/gnucash/gnome-utils/dialog-preferences.c b/gnucash/gnome-utils/dialog-preferences.c
index b3ba114..815587e 100644
--- a/gnucash/gnome-utils/dialog-preferences.c
+++ b/gnucash/gnome-utils/dialog-preferences.c
@@ -1197,7 +1197,7 @@ gnc_prefs_connect_one (const gchar *name,
  *  @return A pointer to the newly created dialog.
  */
 static GtkWidget *
-gnc_preferences_dialog_create(void)
+gnc_preferences_dialog_create(GtkWindow *parent)
 {
     GtkBuilder *builder;
     GtkWidget *dialog, *notebook, *label, *image;
@@ -1236,6 +1236,9 @@ gnc_preferences_dialog_create(void)
     // Set the style context for this dialog so it can be easily manipulated with css
     gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncPreferenceDialog");
 
+    /* parent */
+    gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent));
+
 #ifndef REGISTER2_ENABLED
     /* Hide preferences that are related to register2 */
     box = GTK_WIDGET (gtk_builder_get_object (builder, "label14"));
@@ -1273,8 +1276,8 @@ gnc_preferences_dialog_create(void)
     book = gnc_get_current_book();
     g_date_clear (&fy_end, 1);
     qof_instance_get (QOF_INSTANCE (book),
-		      "fy-end", &fy_end,
-		      NULL);
+              "fy-end", &fy_end,
+              NULL);
     box = GTK_WIDGET(gtk_builder_get_object (builder,
                      "pref/" GNC_PREFS_GROUP_ACCT_SUMMARY "/" GNC_PREF_START_PERIOD));
     period = gnc_period_select_new(TRUE);
@@ -1425,7 +1428,7 @@ close_handler (gpointer user_data)
  *  preferences dialog already exists it will be raised to the top of
  *  the window stack instead of creating a new dialog. */
 void
-gnc_preferences_dialog (void)
+gnc_preferences_dialog (GtkWindow *parent)
 {
     GtkWidget *dialog;
 
@@ -1437,7 +1440,7 @@ gnc_preferences_dialog (void)
         return;
     }
 
-    dialog = gnc_preferences_dialog_create();
+    dialog = gnc_preferences_dialog_create(parent);
 
     gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
     gtk_widget_show(dialog);
diff --git a/gnucash/gnome-utils/dialog-preferences.h b/gnucash/gnome-utils/dialog-preferences.h
index 50ec8fa..f3154ea 100644
--- a/gnucash/gnome-utils/dialog-preferences.h
+++ b/gnucash/gnome-utils/dialog-preferences.h
@@ -60,6 +60,8 @@
 #ifndef GNC_DIALOG_PREFERENCES_H
 #define GNC_DIALOG_PREFERENCES_H
 
+#include <gtk/gtk.h>
+
 /** This function adds a full page of preferences to the preferences
  *  dialog.  When the dialog is created, the specified widget will be
  *  pulled from the specified glade file and added to the preferences
@@ -100,7 +102,7 @@ void gnc_preferences_add_to_page (const gchar *filename,
  *  the user.  The preferences dialog is a singleton, so if a
  *  preferences dialog already exists it will be raised to the top of
  *  the window stack instead of creating a new dialog. */
-void gnc_preferences_dialog (void);
+void gnc_preferences_dialog (GtkWindow *parent);
 
 #endif
 /** @} */
diff --git a/gnucash/gnome-utils/gnc-main-window.c b/gnucash/gnome-utils/gnc-main-window.c
index a65f51e..38f1073 100644
--- a/gnucash/gnome-utils/gnc-main-window.c
+++ b/gnucash/gnome-utils/gnc-main-window.c
@@ -4199,7 +4199,7 @@ gnc_main_window_cmd_edit_paste (GtkAction *action, GncMainWindow *window)
 static void
 gnc_main_window_cmd_edit_preferences (GtkAction *action, GncMainWindow *window)
 {
-    gnc_preferences_dialog ();
+    gnc_preferences_dialog (GTK_WINDOW(window));
 }
 
 static void
diff --git a/gnucash/gnome/dialog-fincalc.c b/gnucash/gnome/dialog-fincalc.c
index 25152cf..d710183 100644
--- a/gnucash/gnome/dialog-fincalc.c
+++ b/gnucash/gnome/dialog-fincalc.c
@@ -549,7 +549,7 @@ fincalc_init_commodity_gae (GNCAmountEdit *edit)
 }
 
 void
-gnc_ui_fincalc_dialog_create(void)
+gnc_ui_fincalc_dialog_create(GtkWindow *parent)
 {
     FinCalcDialog *fcd;
     GtkWidget *button;
@@ -575,6 +575,10 @@ gnc_ui_fincalc_dialog_create(void)
     // Set the style context for this dialog so it can be easily manipulated with css
     gnc_widget_set_style_context (GTK_WIDGET(fcd->dialog), "GncFinCalcDialog");
 
+    /* parent */
+    if (parent != NULL)
+        gtk_window_set_transient_for (GTK_WINDOW(fcd->dialog), GTK_WINDOW(parent));
+
     gnc_register_gui_component (DIALOG_FINCALC_CM_CLASS,
                                 NULL, close_handler, fcd);
 
diff --git a/gnucash/gnome/dialog-fincalc.h b/gnucash/gnome/dialog-fincalc.h
index 8a91af1..bca4b33 100644
--- a/gnucash/gnome/dialog-fincalc.h
+++ b/gnucash/gnome/dialog-fincalc.h
@@ -25,7 +25,7 @@
 
 typedef struct _FinCalcDialog FinCalcDialog;
 
-void gnc_ui_fincalc_dialog_create(void);
+void gnc_ui_fincalc_dialog_create(GtkWindow *parent);
 void gnc_ui_fincalc_dialog_destroy(FinCalcDialog *fcd);
 
 #endif
diff --git a/gnucash/gnome/dialog-trans-assoc.c b/gnucash/gnome/dialog-trans-assoc.c
index f5d8658..5f83eeb 100644
--- a/gnucash/gnome/dialog-trans-assoc.c
+++ b/gnucash/gnome/dialog-trans-assoc.c
@@ -375,7 +375,7 @@ get_trans_info (AssocDialog *assoc_dialog)
 }
 
 static void
-gnc_assoc_dialog_create (AssocDialog *assoc_dialog)
+gnc_assoc_dialog_create (GtkWindow *parent, AssocDialog *assoc_dialog)
 {
     GtkWidget         *dialog;
     GtkBuilder        *builder;
@@ -396,6 +396,10 @@ gnc_assoc_dialog_create (AssocDialog *assoc_dialog)
     // Set the style context for this dialog so it can be easily manipulated with css
     gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncTransAssocDialog");
 
+    /* parent */
+    if (parent != NULL)
+        gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent));
+
     assoc_dialog->view = GTK_WIDGET(gtk_builder_get_object (builder, "treeview"));
     path_head = GTK_WIDGET(gtk_builder_get_object (builder, "path-head"));
 
@@ -500,7 +504,7 @@ show_handler (const char *klass, gint component_id,
  * Return: nothing                                                  *
 \********************************************************************/
 void
-gnc_trans_assoc_dialog ()
+gnc_trans_assoc_dialog (GtkWindow *parent)
 {
     AssocDialog *assoc_dialog;
 
@@ -512,7 +516,7 @@ gnc_trans_assoc_dialog ()
     }
     assoc_dialog = g_new0 (AssocDialog, 1);
 
-    gnc_assoc_dialog_create (assoc_dialog);
+    gnc_assoc_dialog_create (parent, assoc_dialog);
 
     gnc_register_gui_component (DIALOG_ASSOC_CM_CLASS,
                    refresh_handler, close_handler,
diff --git a/gnucash/gnome/dialog-trans-assoc.h b/gnucash/gnome/dialog-trans-assoc.h
index fa82fcb..c95c5b7 100644
--- a/gnucash/gnome/dialog-trans-assoc.h
+++ b/gnucash/gnome/dialog-trans-assoc.h
@@ -23,6 +23,6 @@
 #ifndef DIALOG_TRANS_ASSOC_H
 #define DIALOG_TRANS_ASSOC_H
 
-void gnc_trans_assoc_dialog (void);
+void gnc_trans_assoc_dialog (GtkWindow *parent);
 
 #endif
diff --git a/gnucash/gnome/gnc-plugin-basic-commands.c b/gnucash/gnome/gnc-plugin-basic-commands.c
index 3142c71..d44cec7 100644
--- a/gnucash/gnome/gnc-plugin-basic-commands.c
+++ b/gnucash/gnome/gnc-plugin-basic-commands.c
@@ -616,7 +616,7 @@ static void
 gnc_main_window_cmd_tools_imap_editor (GtkAction *action, GncMainWindowActionData *data)
 {
     gnc_set_busy_cursor(NULL, TRUE);
-    gnc_imap_dialog (NULL);
+    gnc_imap_dialog (GTK_WIDGET (data->window));
     gnc_unset_busy_cursor(NULL);
 }
 
@@ -624,7 +624,7 @@ static void
 gnc_main_window_cmd_tools_trans_assoc (GtkAction *action, GncMainWindowActionData *data)
 {
     gnc_set_busy_cursor (NULL, TRUE);
-    gnc_trans_assoc_dialog ();
+    gnc_trans_assoc_dialog (GTK_WINDOW (data->window));
     gnc_unset_busy_cursor (NULL);
 }
 
@@ -632,7 +632,7 @@ static void
 gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)
 {
     gnc_set_busy_cursor(NULL, TRUE);
-    gnc_prices_dialog (NULL);
+    gnc_prices_dialog (GTK_WIDGET (data->window));
     gnc_unset_busy_cursor(NULL);
 }
 
@@ -640,14 +640,14 @@ static void
 gnc_main_window_cmd_tools_commodity_editor (GtkAction *action, GncMainWindowActionData *data)
 {
     gnc_set_busy_cursor(NULL, TRUE);
-    gnc_commodities_dialog (NULL);
+    gnc_commodities_dialog (GTK_WIDGET (data->window));
     gnc_unset_busy_cursor(NULL);
 }
 
 static void
 gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data)
 {
-    gnc_ui_fincalc_dialog_create();
+    gnc_ui_fincalc_dialog_create(GTK_WINDOW (data->window));
 }
 
 static void
diff --git a/gnucash/gnome/gtkbuilder/dialog-price.glade b/gnucash/gnome/gtkbuilder/dialog-price.glade
index cbf5c51..e09c6cc 100644
--- a/gnucash/gnome/gtkbuilder/dialog-price.glade
+++ b/gnucash/gnome/gtkbuilder/dialog-price.glade
@@ -361,7 +361,6 @@
     </columns>
   </object>
   <object class="GtkDialog" id="deletion_date_dialog">
-    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Remove Old Prices</property>
diff --git a/gnucash/gnome/gtkbuilder/dialog-trans-assoc.glade b/gnucash/gnome/gtkbuilder/dialog-trans-assoc.glade
index eaf2b40..57e92b7 100644
--- a/gnucash/gnome/gtkbuilder/dialog-trans-assoc.glade
+++ b/gnucash/gnome/gtkbuilder/dialog-trans-assoc.glade
@@ -21,7 +21,6 @@
     </columns>
   </object>
   <object class="GtkDialog" id="transaction_association_dialog">
-    <property name="visible">True</property>
     <property name="can_focus">True</property>
     <property name="has_focus">True</property>
     <property name="can_default">True</property>

commit 7c52f9ec43ba24c5bf89d2c5af1c02a616686e05
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:20:06 2017 +0000

    Fix There is no budget icon yet so set it to the account one.

diff --git a/gnucash/gnome-utils/gnc-icons.h b/gnucash/gnome-utils/gnc-icons.h
index 72d7645..3a00be3 100644
--- a/gnucash/gnome-utils/gnc-icons.h
+++ b/gnucash/gnome-utils/gnc-icons.h
@@ -49,7 +49,7 @@ G_BEGIN_DECLS
 #define GNC_ICON_PDF_EXPORT "gnc-gnome-pdf"
 
 //FIXME: use own budget icons?
-#define GNC_ICON_BUDGET "gnc-budget"
+#define GNC_ICON_BUDGET "gnc-account"
 #define GNC_ICON_NEW_BUDGET "gnc-account"
 #define GNC_ICON_OPEN_BUDGET "gnc-account-open"
 //#define GNC_ICON_CLOSE_BUDGET "gnc-close-account"

commit 7ec281f6474258d9f7fab259c78de137ffeebab3
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:19:28 2017 +0000

    Fix error when sheet is read only.
    
    When the sheet is read only the entry is not realized so test for this
    before passing event to it.

diff --git a/gnucash/register/register-gnome/gnucash-sheet.c b/gnucash/register/register-gnome/gnucash-sheet.c
index 520d33b..68c5924 100644
--- a/gnucash/register/register-gnome/gnucash-sheet.c
+++ b/gnucash/register/register-gnome/gnucash-sheet.c
@@ -1809,9 +1809,13 @@ gnucash_sheet_key_press_event_internal (GtkWidget *widget, GdkEventKey *event)
     /* Forward the keystroke to the input line */
     if (pass_on)
     {
-        gboolean result;
+        gboolean result = FALSE;
         gtk_editable_set_editable(GTK_EDITABLE(sheet->entry), TRUE);
-        result = gtk_widget_event (sheet->entry, (GdkEvent *) event);
+
+        // If sheet is readonly, entry is not realized
+        if (gtk_widget_get_realized (GTK_WIDGET(sheet->entry)))
+            result = gtk_widget_event (sheet->entry, (GdkEvent *) event);
+
         gtk_editable_set_editable(GTK_EDITABLE(sheet->entry), FALSE);
         return result;
     }

commit 7dc3995aaa48fb1c438fe2274d38a572c211d584
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:18:46 2017 +0000

    Fix transient parent warnings for budgets

diff --git a/gnucash/gnome/gnc-plugin-budget.c b/gnucash/gnome/gnc-plugin-budget.c
index aab03fa..b885fb9 100644
--- a/gnucash/gnome/gnc-plugin-budget.c
+++ b/gnucash/gnome/gnc-plugin-budget.c
@@ -242,7 +242,7 @@ gnc_plugin_budget_cmd_open_budget (GtkAction *action,
         }
         else
         {
-            bgt = gnc_budget_gui_select_budget(book);
+            bgt = gnc_budget_gui_select_budget(GTK_WINDOW(data->window), book);
         }
 
         if (bgt) gnc_main_window_open_page(
@@ -276,7 +276,7 @@ gnc_plugin_budget_cmd_copy_budget (GtkAction *action,
         }
         else
         {
-            bgt = gnc_budget_gui_select_budget(book);
+            bgt = gnc_budget_gui_select_budget(GTK_WINDOW(data->window), book);
         }
 
         if (bgt)
@@ -311,7 +311,7 @@ row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *column,
 }
 
 GncBudget *
-gnc_budget_gui_select_budget(QofBook *book)
+gnc_budget_gui_select_budget(GtkWindow *parent, QofBook *book)
 {
     GncBudget *bgt;
     GtkDialog *dlg;
@@ -323,7 +323,7 @@ gnc_budget_gui_select_budget(QofBook *book)
     gboolean ok;
 
     dlg = GTK_DIALOG(gtk_dialog_new_with_buttons(
-                         _("Select a Budget"), NULL, GTK_DIALOG_MODAL,
+                         _("Select a Budget"), parent, GTK_DIALOG_MODAL,
                          _("_OK"), GTK_RESPONSE_OK,
                          _("_Cancel"), GTK_RESPONSE_CANCEL, NULL));
 
diff --git a/gnucash/gnome/gnc-plugin-budget.h b/gnucash/gnome/gnc-plugin-budget.h
index 5a1f6c2..7e63f35 100644
--- a/gnucash/gnome/gnc-plugin-budget.h
+++ b/gnucash/gnome/gnc-plugin-budget.h
@@ -59,7 +59,7 @@ GType gnc_plugin_budget_get_type(void);
 GncPlugin *gnc_plugin_budget_new(void);
 
 /* Launch the budget list dialog.*/
-GncBudget * gnc_budget_gui_select_budget(QofBook *book);
+GncBudget * gnc_budget_gui_select_budget(GtkWindow *parent, QofBook *book);
 
 
 G_END_DECLS
diff --git a/gnucash/gnome/gnc-plugin-page-budget.c b/gnucash/gnome/gnc-plugin-page-budget.c
index 5f2607a..f39f2c4 100644
--- a/gnucash/gnome/gnc-plugin-page-budget.c
+++ b/gnucash/gnome/gnc-plugin-page-budget.c
@@ -163,7 +163,7 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
 static guint gnc_plugin_page_budget_n_actions =
     G_N_ELEMENTS (gnc_plugin_page_budget_actions);
 
-#if 0 
+#if 0
 static const gchar *actions_requiring_account[] =
 {
     "OpenAccountAction",
@@ -785,8 +785,7 @@ gnc_plugin_page_budget_cmd_view_options (GtkAction *action,
 
         priv->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "budget_options_container_dialog"));
 
-        gtk_window_set_transient_for(
-            GTK_WINDOW(priv->dialog),
+        gtk_window_set_transient_for(GTK_WINDOW(priv->dialog),
             GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
 
         gbname = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetName"));
@@ -939,8 +938,7 @@ gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action,
 
     dialog = GTK_WIDGET(gtk_builder_get_object (builder, "budget_estimate_dialog"));
 
-    gtk_window_set_transient_for(
-        GTK_WINDOW(dialog),
+    gtk_window_set_transient_for(GTK_WINDOW(dialog),
         GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
 
     hb = GTK_WIDGET(gtk_builder_get_object (builder, "StartDate_hbox"));
diff --git a/gnucash/gnome/gtkbuilder/gnc-plugin-page-budget.glade b/gnucash/gnome/gtkbuilder/gnc-plugin-page-budget.glade
index b05fa0d..aa2b171 100644
--- a/gnucash/gnome/gtkbuilder/gnc-plugin-page-budget.glade
+++ b/gnucash/gnome/gtkbuilder/gnc-plugin-page-budget.glade
@@ -10,7 +10,6 @@
     <property name="page_increment">1</property>
   </object>
   <object class="GtkDialog" id="budget_estimate_dialog">
-    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Estimate Budget Values</property>
@@ -174,7 +173,6 @@
     <property name="page_increment">12</property>
   </object>
   <object class="GtkDialog" id="budget_options_container_dialog">
-    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Budget Options</property>
     <property name="modal">True</property>
@@ -393,7 +391,6 @@
     </action-widgets>
   </object>
   <object class="GtkDialog" id="budget_list_dialog - Not Used">
-    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Budget List</property>

commit 01ab889902ca81a4f795764aca80f0c027bf5fb6
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:15:43 2017 +0000

    Fix Invalid cast from GncWebkitHtml to GtkWindow
    
    Invalid cast from GncWebkitHtml to GtkWindow so use already set parent.

diff --git a/gnucash/html/gnc-html-webkit2.c b/gnucash/html/gnc-html-webkit2.c
index 0a8c377..b2ce26c 100644
--- a/gnucash/html/gnc-html-webkit2.c
+++ b/gnucash/html/gnc-html-webkit2.c
@@ -1123,7 +1123,7 @@ impl_webkit_print (GncHtml* self)
 
      priv = GNC_HTML_WEBKIT_GET_PRIVATE (self);
      op = webkit_print_operation_new (priv->web_view);
-     top = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self)));
+     top = GTK_WINDOW(priv->base.parent);
      webkit_print_operation_run_dialog (op, top);
      g_object_unref (op);
 }

commit bde39c527cbdd4ebf0bb279ef488b121307a40b9
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:15:03 2017 +0000

    Fix Test for filepath is NULL when cancel pressed for export

diff --git a/gnucash/report/report-gnome/gnc-plugin-page-report.c b/gnucash/report/report-gnome/gnc-plugin-page-report.c
index a719e27..909e83f 100644
--- a/gnucash/report/report-gnome/gnc-plugin-page-report.c
+++ b/gnucash/report/report-gnome/gnc-plugin-page-report.c
@@ -1537,10 +1537,12 @@ gnc_get_export_filename (SCM choice)
     filepath = gnc_file_dialog (gnc_ui_get_main_window (NULL),
                                 title, NULL, default_dir, GNC_FILE_DIALOG_EXPORT);
 
-    /* Try to test for extension on file name, add if missing */
-    if (g_strrstr(filepath, ".") == NULL)
-        filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
-
+    if (filepath != NULL) // test for cancel pressed
+    {
+        /* Try to test for extension on file name, add if missing */
+        if (g_strrstr(filepath, ".") == NULL)
+            filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
+    }
     g_free (type);
     g_free (title);
     g_free (default_dir);

commit 19e0f58763497ba4c40de613ac7d21f706bbca2d
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:14:17 2017 +0000

    Fix Critical errors when SX editor loaded
    
    When the SX editor is loaded, an embedded register plug-in page is
    created and as part of this the business menus and actions are updated.
    As this is an GncEmbeddedWindow they fail so test for a normal main
    window before proceeding.

diff --git a/gnucash/gnome/gnc-plugin-business.c b/gnucash/gnome/gnc-plugin-business.c
index daad449..eb418b3 100644
--- a/gnucash/gnome/gnc-plugin-business.c
+++ b/gnucash/gnome/gnc-plugin-business.c
@@ -910,6 +910,10 @@ gnc_plugin_business_update_menus (GncPluginPage *plugin_page)
     if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
         return;
 
+    // Check that this is a main window and not embedded sx
+    if (!GNC_IS_MAIN_WINDOW(plugin_page->window))
+        return;
+
     is_txn_register = GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page);
     window = GNC_MAIN_WINDOW(plugin_page->window);
     g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
@@ -1055,6 +1059,10 @@ static void update_inactive_actions(GncPluginPage *plugin_page)
     if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
         return;
 
+    // Check that this is a main window and not embedded sx
+    if (!GNC_IS_MAIN_WINDOW(plugin_page->window))
+        return;
+
     window = GNC_MAIN_WINDOW(plugin_page->window);
     g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
     action_group = gnc_main_window_get_action_group(window, PLUGIN_ACTIONS_NAME);

commit b8a85ab80aa3c47de61bae00121391194f890a1f
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:13:22 2017 +0000

    Fix Transient parent warnings for SX editor

diff --git a/gnucash/gnome/dialog-sx-editor.c b/gnucash/gnome/dialog-sx-editor.c
index 61e246a..645bd16 100644
--- a/gnucash/gnome/dialog-sx-editor.c
+++ b/gnucash/gnome/dialog-sx-editor.c
@@ -1114,8 +1114,8 @@ sxed_delete_event( GtkWidget *widget, GdkEvent *event, gpointer ud )
  * Create the Schedule Editor Dialog *
  ************************************/
 GncSxEditorDialog *
-gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx,
-					       gboolean newSX)
+gnc_ui_scheduled_xaction_editor_dialog_create (GtkWindow *parent, 
+    SchedXaction *sx, gboolean newSX)
 {
     GncSxEditorDialog *sxed;
     GtkBuilder *builder;
@@ -1192,12 +1192,13 @@ gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx,
 
     // Set the style context for this dialog so it can be easily manipulated with css
     gnc_widget_set_style_context (GTK_WIDGET(sxed->dialog), "GncSxEditorDialog");
+    
+    gtk_window_set_transient_for (GTK_WINDOW (sxed->dialog), parent);
 
     /* Setup the end-date GNC widget */
     {
         GtkWidget *endDateBox = GTK_WIDGET(gtk_builder_get_object (builder, "editor_end_date_box"));
-        sxed->endDateEntry = GNC_DATE_EDIT(gnc_date_edit_new (gnc_time (NULL),
-							      FALSE, FALSE));
+        sxed->endDateEntry = GNC_DATE_EDIT(gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE));
         gtk_widget_show(GTK_WIDGET(sxed->endDateEntry));
         g_signal_connect( sxed->endDateEntry, "date-changed",
                           G_CALLBACK( sxed_excal_update_adapt_cb ), sxed );
@@ -1714,6 +1715,7 @@ typedef struct _acct_deletion_handler_data
 {
     GList *affected_sxes;
     GtkWidget *dialog;
+    GtkWindow *parent;
 } acct_deletion_handler_data;
 
 
@@ -1726,8 +1728,8 @@ _open_editors(GtkDialog *dialog, gint response_code, gpointer data)
         GList *sx_iter;
         for (sx_iter = adhd->affected_sxes; sx_iter; sx_iter = sx_iter->next)
         {
-            gnc_ui_scheduled_xaction_editor_dialog_create((SchedXaction*)sx_iter->data,
-                                                          FALSE);
+            gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(adhd->parent),
+                (SchedXaction*)sx_iter->data, FALSE);
         }
     }
     g_list_free(adhd->affected_sxes);
@@ -1759,6 +1761,7 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
         acct_deletion_handler_data *data;
         GtkBuilder *builder;
         GtkWidget *dialog;
+        GtkWindow *parent;
         GtkListStore *name_list;
         GtkTreeView *list;
         GtkTreeViewColumn *name_column;
@@ -1768,6 +1771,9 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
         gnc_builder_add_from_file (builder, "dialog-sx.glade", "account_deletion_dialog");
 
         dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_deletion_dialog"));
+        parent = gnc_ui_get_main_window (NULL);
+
+        gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
 
         list = GTK_TREE_VIEW(gtk_builder_get_object (builder, "sx_list"));
 
@@ -1776,6 +1782,7 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
 
         data = (acct_deletion_handler_data*)g_new0(acct_deletion_handler_data, 1);
         data->dialog = dialog;
+        data->parent = parent;
         data->affected_sxes = affected_sxes;
         name_list = gtk_list_store_new(1, G_TYPE_STRING);
         for (sx_iter = affected_sxes; sx_iter != NULL; sx_iter = sx_iter->next)
diff --git a/gnucash/gnome/dialog-sx-editor.h b/gnucash/gnome/dialog-sx-editor.h
index 7e6d203..c7d6e1e 100644
--- a/gnucash/gnome/dialog-sx-editor.h
+++ b/gnucash/gnome/dialog-sx-editor.h
@@ -24,6 +24,7 @@
 #define DIALOG_SX_EDITOR_H
 
 #include "SchedXaction.h"
+#include <gtk/gtk.h>
 
 #define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
 #define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
@@ -36,8 +37,8 @@
 
 typedef struct _GncSxEditorDialog GncSxEditorDialog;
 
-GncSxEditorDialog* gnc_ui_scheduled_xaction_editor_dialog_create(SchedXaction *sx,
-        gboolean newSX);
+GncSxEditorDialog* gnc_ui_scheduled_xaction_editor_dialog_create(GtkWindow *parent,
+    SchedXaction *sx, gboolean newSX);
 
 void gnc_ui_scheduled_xaction_editor_dialog_destroy(GncSxEditorDialog *sxd);
 
diff --git a/gnucash/gnome/dialog-sx-editor2.c b/gnucash/gnome/dialog-sx-editor2.c
index 333da7f..6b280dd 100644
--- a/gnucash/gnome/dialog-sx-editor2.c
+++ b/gnucash/gnome/dialog-sx-editor2.c
@@ -1087,8 +1087,8 @@ sxed_delete_event (GtkWidget *widget, GdkEvent *event, gpointer ud)
  * Create the Schedule Editor Dialog *
  ************************************/
 GncSxEditorDialog2 *
-gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx,
-					       gboolean newSX)
+gnc_ui_scheduled_xaction_editor_dialog_create2 (GtkWindow *parent, 
+    SchedXaction *sx, gboolean newSX)
 {
     GncSxEditorDialog2 *sxed;
     GtkBuilder *builder;
@@ -1166,11 +1166,12 @@ gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx,
     // Set the style context for this dialog so it can be easily manipulated with css
     gnc_widget_set_style_context (GTK_WIDGET(sxed->dialog), "GncSxEditorDialog");
 
+    gtk_window_set_transient_for (GTK_WINDOW (sxed->dialog), parent);
+
     /* Setup the end-date GNC widget */
     {
         GtkWidget *endDateBox = GTK_WIDGET(gtk_builder_get_object (builder, "editor_end_date_box"));
-        sxed->endDateEntry = GNC_DATE_EDIT (gnc_date_edit_new (gnc_time (NULL),
-							      FALSE, FALSE));
+        sxed->endDateEntry = GNC_DATE_EDIT (gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE));
         gtk_widget_show (GTK_WIDGET (sxed->endDateEntry));
         g_signal_connect (sxed->endDateEntry, "date-changed",
                           G_CALLBACK (sxed_excal_update_adapt_cb), sxed);
@@ -1665,6 +1666,7 @@ typedef struct _acct_deletion_handler_data
 {
     GList *affected_sxes;
     GtkWidget *dialog;
+    GtkWindow *parent;
 } acct_deletion_handler_data;
 
 
@@ -1677,8 +1679,8 @@ _open_editors (GtkDialog *dialog, gint response_code, gpointer data)
         GList *sx_iter;
         for (sx_iter = adhd->affected_sxes; sx_iter; sx_iter = sx_iter->next)
         {
-            gnc_ui_scheduled_xaction_editor_dialog_create2 ((SchedXaction*)sx_iter->data,
-                    FALSE);
+            gnc_ui_scheduled_xaction_editor_dialog_create2 (GTK_WINDOW(adhd->parent),
+                (SchedXaction*)sx_iter->data, FALSE);
         }
     }
     g_list_free (adhd->affected_sxes);
@@ -1710,6 +1712,7 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
         acct_deletion_handler_data *data;
         GtkBuilder *builder;
         GtkWidget *dialog;
+        GtkWindow *parent;
         GtkListStore *name_list;
         GtkTreeView *list;
         GtkTreeViewColumn *name_column;
@@ -1719,6 +1722,9 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
         gnc_builder_add_from_file (builder, "dialog-sx.glade", "account_deletion_dialog");
 
         dialog = GTK_WIDGET (gtk_builder_get_object (builder, "account_deletion_dialog"));
+        parent = gnc_ui_get_main_window (NULL);
+        
+        gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
 
         list = GTK_TREE_VIEW (gtk_builder_get_object (builder, "sx_list"));
 
@@ -1727,6 +1733,7 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
 
         data = (acct_deletion_handler_data*)g_new0 (acct_deletion_handler_data, 1);
         data->dialog = dialog;
+        data->parent = parent;
         data->affected_sxes = affected_sxes;
         name_list = gtk_list_store_new (1, G_TYPE_STRING);
         for (sx_iter = affected_sxes; sx_iter != NULL; sx_iter = sx_iter->next)
diff --git a/gnucash/gnome/dialog-sx-editor2.h b/gnucash/gnome/dialog-sx-editor2.h
index b8c7cdf..26ab52a 100644
--- a/gnucash/gnome/dialog-sx-editor2.h
+++ b/gnucash/gnome/dialog-sx-editor2.h
@@ -36,8 +36,8 @@
 
 typedef struct _GncSxEditorDialog2 GncSxEditorDialog2;
 
-GncSxEditorDialog2* gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx,
-        gboolean newSX);
+GncSxEditorDialog2* gnc_ui_scheduled_xaction_editor_dialog_create2 (GtkWindow *parent,
+    SchedXaction *sx, gboolean newSX);
 
 void gnc_ui_scheduled_xaction_editor_dialog_destroy2 (GncSxEditorDialog2 *sxd);
 
diff --git a/gnucash/gnome/dialog-sx-from-trans.c b/gnucash/gnome/dialog-sx-from-trans.c
index f300b1e..c8625be 100644
--- a/gnucash/gnome/dialog-sx-from-trans.c
+++ b/gnucash/gnome/dialog-sx-from-trans.c
@@ -612,7 +612,8 @@ sxftd_advanced_clicked(SXFromTransInfo *sxfti)
     context = g_main_context_default();
     while (g_main_context_iteration(context, FALSE));
 
-    gnc_ui_scheduled_xaction_editor_dialog_create(sxfti->sx, TRUE /* newSX */);
+    gnc_ui_scheduled_xaction_editor_dialog_create(gnc_ui_get_main_window (sxfti->dialog),
+        sxfti->sx, TRUE /* newSX */);
     /* close ourself, since advanced editing entails us, and there are sync
      * issues otherwise. */
     sxftd_close(sxfti, FALSE);
@@ -752,7 +753,7 @@ sxftd_update_excal_adapt( GObject *o, gpointer ud )
  * Create the dialog *
  ********************/
 void
-gnc_sx_create_from_trans( Transaction *trans )
+gnc_sx_create_from_trans( GtkWindow *parent, Transaction *trans )
 {
 #ifndef __MINGW32__
     int errno;
@@ -771,6 +772,8 @@ gnc_sx_create_from_trans( Transaction *trans )
     // Set the style context for this dialog so it can be easily manipulated with css
     gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncSxFromTransDialog");
 
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
+
     sxfti->builder = builder;
     sxfti->dialog = dialog;
     sxfti->trans = trans;
diff --git a/gnucash/gnome/dialog-sx-from-trans.h b/gnucash/gnome/dialog-sx-from-trans.h
index 413aef2..aa66212 100644
--- a/gnucash/gnome/dialog-sx-from-trans.h
+++ b/gnucash/gnome/dialog-sx-from-trans.h
@@ -27,6 +27,6 @@
 
 #include "Transaction.h"
 
-void gnc_sx_create_from_trans(Transaction *trans);
+void gnc_sx_create_from_trans(GtkWindow *parent, Transaction *trans);
 
 #endif
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 057db7e..0ef9fe9 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -3799,13 +3799,15 @@ gnc_plugin_page_register_cmd_schedule (GtkAction *action,
                                        GncPluginPageRegister *plugin_page)
 {
     GncPluginPageRegisterPrivate *priv;
+    GtkWindow *window;
 
     ENTER("(action %p, plugin_page %p)", action, plugin_page);
 
     g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page));
 
+    window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
     priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
-    gsr_default_schedule_handler(priv->gsr, NULL);
+    gsr_default_schedule_handler(priv->gsr, window);
     LEAVE(" ");
 }
 
diff --git a/gnucash/gnome/gnc-plugin-page-register2.c b/gnucash/gnome/gnc-plugin-page-register2.c
index bd10fa9..58d9d36 100644
--- a/gnucash/gnome/gnc-plugin-page-register2.c
+++ b/gnucash/gnome/gnc-plugin-page-register2.c
@@ -3622,6 +3622,7 @@ gnc_plugin_page_register2_cmd_schedule (GtkAction *action,
     GncPluginPageRegister2Private *priv;
     GncTreeViewSplitReg *view;
     Transaction *trans;
+    GtkWindow *window;
 
     ENTER("(action %p, plugin_page %p)", action, plugin_page);
 
@@ -3629,6 +3630,7 @@ gnc_plugin_page_register2_cmd_schedule (GtkAction *action,
 
     priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE(plugin_page);
     view = gnc_ledger_display2_get_split_view_register (priv->ledger);
+    window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (plugin_page)));
 
     trans = gnc_tree_view_split_reg_get_current_trans (view);
 
@@ -3682,12 +3684,12 @@ gnc_plugin_page_register2_cmd_schedule (GtkAction *action,
 
 	if (theSX)
 	{
-	    gnc_ui_scheduled_xaction_editor_dialog_create2 (theSX, FALSE);
+	    gnc_ui_scheduled_xaction_editor_dialog_create2 (window, theSX, FALSE);
 	    LEAVE(" ");
 	    return;
 	}
     }
-    gnc_sx_create_from_trans (trans);
+    gnc_sx_create_from_trans (window, trans);
     LEAVE(" ");
 }
 
diff --git a/gnucash/gnome/gnc-plugin-page-sx-list.c b/gnucash/gnome/gnc-plugin-page-sx-list.c
index 6b66868..cc0bf04 100644
--- a/gnucash/gnome/gnc-plugin-page-sx-list.c
+++ b/gnucash/gnome/gnc-plugin-page-sx-list.c
@@ -639,6 +639,7 @@ gnc_plugin_page_sx_list_recreate_page (GtkWidget *window,
 static void
 gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
 {
+    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
     SchedXaction *new_sx;
     gboolean new_sx_flag = TRUE;
 
@@ -655,7 +656,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
         schedule = g_list_append(schedule, r);
         gnc_sx_set_schedule(new_sx, schedule);
     }
-    gnc_ui_scheduled_xaction_editor_dialog_create(new_sx, new_sx_flag);
+    gnc_ui_scheduled_xaction_editor_dialog_create(window, new_sx, new_sx_flag);
 }
 
 #ifdef REGISTER2_ENABLED
@@ -663,6 +664,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
 static void
 gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
 {
+    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
     SchedXaction *new_sx;
     gboolean new_sx_flag = TRUE;
 
@@ -679,7 +681,7 @@ gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
         schedule = g_list_append (schedule, r);
         gnc_sx_set_schedule (new_sx, schedule);
     }
-    gnc_ui_scheduled_xaction_editor_dialog_create2 (new_sx, new_sx_flag);
+    gnc_ui_scheduled_xaction_editor_dialog_create2 (window, new_sx, new_sx_flag);
 }
 /*################## Added for Reg2 #################*/
 #endif
@@ -687,7 +689,8 @@ gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
 static void
 _edit_sx(gpointer data, gpointer user_data)
 {
-    gnc_ui_scheduled_xaction_editor_dialog_create((SchedXaction*)data, FALSE);
+    gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(user_data),
+        (SchedXaction*)data, FALSE);
 }
 
 #ifdef REGISTER2_ENABLED
@@ -695,7 +698,8 @@ _edit_sx(gpointer data, gpointer user_data)
 static void
 _edit_sx2 (gpointer data, gpointer user_data)
 {
-    gnc_ui_scheduled_xaction_editor_dialog_create2 ((SchedXaction*)data, FALSE);
+    gnc_ui_scheduled_xaction_editor_dialog_create2 (GTK_WINDOW(user_data),
+        (SchedXaction*)data, FALSE);
 }
 /*################## Added for Reg2 #################*/
 #endif
@@ -711,6 +715,7 @@ static void
 gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
 {
     GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
+    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
     GtkTreeSelection *selection;
     GList *selected_paths, *to_edit;
     GtkTreeModel *model;
@@ -726,7 +731,7 @@ gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
     to_edit = gnc_g_list_map(selected_paths,
                              (GncGMapFunc)_argument_reorder_fn,
                              priv->tree_view);
-    g_list_foreach(to_edit, (GFunc)_edit_sx, NULL);
+    g_list_foreach(to_edit, (GFunc)_edit_sx, window);
     g_list_free(to_edit);
     g_list_foreach(selected_paths, (GFunc)gtk_tree_path_free, NULL);
     g_list_free(selected_paths);
@@ -738,6 +743,7 @@ static void
 gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
 {
     GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE (page);
+    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
     GtkTreeSelection *selection;
     GList *selected_paths, *to_edit;
     GtkTreeModel *model;
@@ -753,7 +759,7 @@ gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
     to_edit = gnc_g_list_map (selected_paths,
                              (GncGMapFunc)_argument_reorder_fn,
                              priv->tree_view);
-    g_list_foreach(to_edit, (GFunc)_edit_sx2, NULL);
+    g_list_foreach(to_edit, (GFunc)_edit_sx2, window);
     g_list_free (to_edit);
     g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
     g_list_free (selected_paths);
@@ -769,9 +775,10 @@ gppsl_row_activated_cb(GtkTreeView *tree_view,
 {
     GncPluginPageSxList *page = GNC_PLUGIN_PAGE_SX_LIST(user_data);
     GncPluginPageSxListPrivate *priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
+    GtkWindow *window = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
 
     SchedXaction *sx = gnc_tree_view_sx_list_get_sx_from_path(GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
-    gnc_ui_scheduled_xaction_editor_dialog_create(sx, FALSE);
+    gnc_ui_scheduled_xaction_editor_dialog_create(window, sx, FALSE);
 }
 
 
diff --git a/gnucash/gnome/gnc-split-reg.c b/gnucash/gnome/gnc-split-reg.c
index 13cdc97..1cb02f2 100644
--- a/gnucash/gnome/gnc-split-reg.c
+++ b/gnucash/gnome/gnc-split-reg.c
@@ -1363,10 +1363,10 @@ gsr_default_schedule_handler( GNCSplitReg *gsr, gpointer data )
 
     if ( theSX )
     {
-        gnc_ui_scheduled_xaction_editor_dialog_create(theSX, FALSE);
+        gnc_ui_scheduled_xaction_editor_dialog_create(GTK_WINDOW(data), theSX, FALSE);
         return;
     }
-    gnc_sx_create_from_trans(pending_trans);
+    gnc_sx_create_from_trans(GTK_WINDOW(data), pending_trans);
 }
 
 void
diff --git a/gnucash/gnome/gtkbuilder/dialog-sx.glade b/gnucash/gnome/gtkbuilder/dialog-sx.glade
index f09c8f3..a08f943 100644
--- a/gnucash/gnome/gtkbuilder/dialog-sx.glade
+++ b/gnucash/gnome/gtkbuilder/dialog-sx.glade
@@ -3,7 +3,6 @@
 <interface>
   <requires lib="gtk+" version="3.10"/>
   <object class="GtkDialog" id="account_deletion_dialog">
-    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Account Deletion</property>

commit dc1ec68646e231fddf2e72534ad848a18f5a312f
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:03:47 2017 +0000

    Add a left margin to report zoom to align with other options

diff --git a/gnucash/gnome-utils/gtkbuilder/dialog-preferences.glade b/gnucash/gnome-utils/gtkbuilder/dialog-preferences.glade
index 4aff574..51ee5b7 100644
--- a/gnucash/gnome-utils/gtkbuilder/dialog-preferences.glade
+++ b/gnucash/gnome-utils/gtkbuilder/dialog-preferences.glade
@@ -2837,6 +2837,7 @@ many months before the current month:</property>
                         <property name="can_focus">True</property>
                         <property name="tooltip_text" translatable="yes">On high resolution screens reports tend to be hard to read. This option allows you to scale reports up by the set factor. For example setting this to 2.0 will display reports at twice their typical size.</property>
                         <property name="halign">start</property>
+                        <property name="margin_left">12</property>
                         <property name="adjustment">default_zoom_adj</property>
                       </object>
                       <packing>

commit 9f3a357a2a7ea4813c406364182c1171d9ad21c3
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Dec 30 17:03:12 2017 +0000

    Fix register cell height by adding 1px for cell border

diff --git a/gnucash/register/register-gnome/gnucash-style.c b/gnucash/register/register-gnome/gnucash-style.c
index e999620..f62d2ee 100644
--- a/gnucash/register/register-gnome/gnucash-style.c
+++ b/gnucash/register/register-gnome/gnucash-style.c
@@ -209,8 +209,8 @@ set_dimensions_pass_one (GnucashSheet *sheet, CellBlock *cursor,
                 cd->pixel_height = gnc_item_edit_get_margin (item_edit, top_bottom) +
                                    gnc_item_edit_get_padding_border (item_edit, top_bottom);
             }
-
-            max_height = MAX(max_height, cd->pixel_height);
+            // add 1 to cd->pixel_height to allow for a cell border
+            max_height = MAX(max_height, cd->pixel_height + 1);
 
             if (cd->pixel_width > 0)
                 continue;



Summary of changes:
 gnucash/gnome-utils/dialog-preferences.c           | 13 +++++---
 gnucash/gnome-utils/dialog-preferences.h           |  4 ++-
 gnucash/gnome-utils/gnc-icons.h                    |  2 +-
 gnucash/gnome-utils/gnc-main-window.c              |  2 +-
 .../gtkbuilder/dialog-preferences.glade            |  1 +
 gnucash/gnome/dialog-fincalc.c                     |  6 +++-
 gnucash/gnome/dialog-fincalc.h                     |  2 +-
 gnucash/gnome/dialog-sx-editor.c                   | 19 +++++++----
 gnucash/gnome/dialog-sx-editor.h                   |  5 +--
 gnucash/gnome/dialog-sx-editor2.c                  | 19 +++++++----
 gnucash/gnome/dialog-sx-editor2.h                  |  4 +--
 gnucash/gnome/dialog-sx-from-trans.c               |  7 ++--
 gnucash/gnome/dialog-sx-from-trans.h               |  2 +-
 gnucash/gnome/dialog-trans-assoc.c                 | 10 ++++--
 gnucash/gnome/dialog-trans-assoc.h                 |  2 +-
 gnucash/gnome/gnc-plugin-basic-commands.c          | 10 +++---
 gnucash/gnome/gnc-plugin-budget.c                  |  8 ++---
 gnucash/gnome/gnc-plugin-budget.h                  |  2 +-
 gnucash/gnome/gnc-plugin-business.c                |  8 +++++
 gnucash/gnome/gnc-plugin-page-budget.c             |  8 ++---
 gnucash/gnome/gnc-plugin-page-register.c           |  4 ++-
 gnucash/gnome/gnc-plugin-page-register2.c          |  6 ++--
 gnucash/gnome/gnc-plugin-page-sx-list.c            | 21 ++++++++----
 gnucash/gnome/gnc-split-reg.c                      |  4 +--
 gnucash/gnome/gtkbuilder/dialog-price.glade        |  1 -
 gnucash/gnome/gtkbuilder/dialog-sx.glade           |  1 -
 gnucash/gnome/gtkbuilder/dialog-trans-assoc.glade  |  1 -
 .../gnome/gtkbuilder/gnc-plugin-page-budget.glade  |  3 --
 gnucash/html/gnc-html-webkit2.c                    |  2 +-
 gnucash/register/register-gnome/gnucash-header.c   | 38 +++++++++++++---------
 gnucash/register/register-gnome/gnucash-sheet.c    |  8 +++--
 gnucash/register/register-gnome/gnucash-style.c    |  4 +--
 .../report/report-gnome/gnc-plugin-page-report.c   | 10 +++---
 gnucash/report/standard-reports/transaction.scm    |  3 +-
 libgnucash/engine/engine.i                         |  2 ++
 35 files changed, 150 insertions(+), 92 deletions(-)



More information about the gnucash-changes mailing list