gnucash unstable: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sat Mar 10 15:15:51 EST 2018
Updated via https://github.com/Gnucash/gnucash/commit/daca1312 (commit)
via https://github.com/Gnucash/gnucash/commit/612cb5c6 (commit)
via https://github.com/Gnucash/gnucash/commit/59ae8571 (commit)
via https://github.com/Gnucash/gnucash/commit/6cbf5dbb (commit)
via https://github.com/Gnucash/gnucash/commit/95329f23 (commit)
from https://github.com/Gnucash/gnucash/commit/fd0ba2c7 (commit)
commit daca1312e7462c9526f2515560f367d1919ecfe8
Merge: fd0ba2c 612cb5c
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Mar 10 12:12:48 2018 -0800
Merge Bob Fewell's transient parent PR308 into unstable.
commit 612cb5c69f1b50913d92504cbd1dd35ae55c5bf2
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Thu Mar 8 04:20:36 2018 +0000
Fix transient parent warnings for various import dialogs
diff --git a/gnucash/gtkbuilder/dialog-bi-import-gui.glade b/gnucash/gtkbuilder/dialog-bi-import-gui.glade
index 66a7ffd..7cab394 100644
--- a/gnucash/gtkbuilder/dialog-bi-import-gui.glade
+++ b/gnucash/gtkbuilder/dialog-bi-import-gui.glade
@@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="bi_import_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Import transactions from text file</property>
<property name="type_hint">dialog</property>
diff --git a/gnucash/gtkbuilder/dialog-customer-import-gui.glade b/gnucash/gtkbuilder/dialog-customer-import-gui.glade
index cef519f..8d675b5 100644
--- a/gnucash/gtkbuilder/dialog-customer-import-gui.glade
+++ b/gnucash/gtkbuilder/dialog-customer-import-gui.glade
@@ -5,7 +5,6 @@
<object class="GtkDialog" id="customer_import_dialog">
<property name="width_request">500</property>
<property name="height_request">500</property>
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes" comments="Title of dialog">Import customers or vendors from text file</property>
<property name="type_hint">dialog</property>
diff --git a/gnucash/gtkbuilder/dialog-import.glade b/gnucash/gtkbuilder/dialog-import.glade
index d12dc36..9ffe7f6 100644
--- a/gnucash/gtkbuilder/dialog-import.glade
+++ b/gnucash/gtkbuilder/dialog-import.glade
@@ -8,7 +8,6 @@
<property name="icon_name">gnc-account-new</property>
</object>
<object class="GtkDialog" id="account_picker_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Select Account</property>
<property name="default_width">800</property>
@@ -721,7 +720,6 @@
<property name="text" translatable="yes">Double click on the transaction to change the matching transaction to reconcile, or the destination account of the auto-balance split (if required).</property>
</object>
<object class="GtkDialog" id="matcher_help_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="title" translatable="yes">Transaction List Help</property>
diff --git a/gnucash/import-export/bi-import/dialog-bi-import-gui.c b/gnucash/import-export/bi-import/dialog-bi-import-gui.c
index c7f302e..d57a8e7 100644
--- a/gnucash/import-export/bi-import/dialog-bi-import-gui.c
+++ b/gnucash/import-export/bi-import/dialog-bi-import-gui.c
@@ -120,6 +120,8 @@ gnc_plugin_bi_import_showGUI (GtkWindow *parent)
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(gui->dialog), "GncBillImportDialog");
+ gtk_window_set_transient_for (GTK_WINDOW (gui->dialog), parent);
+
gui->book = gnc_get_current_book();
gui->regexp = g_string_new ( "^(?<id>[^;]*);(?<date_opened>[^;]*);(?<owner_id>[^;]*);(?<billing_id>[^;]*);?(?<notes>[^;]*);?(?<date>[^;]*);?(?<desc>[^;]*);?(?<action>[^;]*);?(?<account>[^;]*);?(?<quantity>[^;]*);?(?<price>[^;]*);?(?<disc_type>[^;]*);?(?<disc_how>[^;]*);?(?<discount>[^;]*);?(?<taxable>[^;]*);?(?<taxincluded>[^;]*);?(?<tax_table>[^;]*);(?<date_posted>[^;]*);(?<due_date>[^;]*);(?<account_posted>[^;]*);(?<memo_posted>[^;]*);(?<accu_splits>[^;]*)$");
diff --git a/gnucash/import-export/customer-import/dialog-customer-import-gui.c b/gnucash/import-export/customer-import/dialog-customer-import-gui.c
index a416086..5293721 100644
--- a/gnucash/import-export/customer-import/dialog-customer-import-gui.c
+++ b/gnucash/import-export/customer-import/dialog-customer-import-gui.c
@@ -74,7 +74,7 @@ static void gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar
CustomerImportGui *
-gnc_plugin_customer_import_showGUI(void)
+gnc_plugin_customer_import_showGUI(GtkWindow *parent)
{
CustomerImportGui *gui;
//gktbuilderXML *xml;
@@ -107,6 +107,8 @@ gnc_plugin_customer_import_showGUI(void)
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(gui->dialog), "GncCustomerImportDialog");
+ gtk_window_set_transient_for (GTK_WINDOW (gui->dialog), parent);
+
gui->regexp = g_string_new ( "^(?<id>[^;]+);(?<company>[^;]*);(?<name>[^;]+);(?<addr1>[^;]+);?(?<addr2>[^;]*);?(?<addr3>[^;]*);?(?<addr4>[^;]*);?(?<phone>[^;]*);?(?<fax>[^;]*);?(?<email>[^;]*);?(?<shipname>[^;]*);?(?<shipaddr1>[^;]*);?(?<shipaddr2>[^;]*);?(?<shipaddr3>[^;]*);?(?<shipaddr4>[^;]*);?(?<shipphone>[^;]*);?(?<shipfax>[^;]*);?(?<shipemail>[^;]*)");
gui->book = gnc_get_current_book();
diff --git a/gnucash/import-export/customer-import/dialog-customer-import-gui.h b/gnucash/import-export/customer-import/dialog-customer-import-gui.h
index 757f12d..346d818 100644
--- a/gnucash/import-export/customer-import/dialog-customer-import-gui.h
+++ b/gnucash/import-export/customer-import/dialog-customer-import-gui.h
@@ -39,7 +39,7 @@ typedef struct _customer_import_gui CustomerImportGui;
/**
* File chooser
*/
-CustomerImportGui *gnc_plugin_customer_import_showGUI(void);
+CustomerImportGui *gnc_plugin_customer_import_showGUI (GtkWindow *parent);
G_END_DECLS
diff --git a/gnucash/import-export/customer-import/gnc-plugin-customer-import.c b/gnucash/import-export/customer-import/gnc-plugin-customer-import.c
index 1099490..0586a74 100644
--- a/gnucash/import-export/customer-import/gnc-plugin-customer-import.c
+++ b/gnucash/import-export/customer-import/gnc-plugin-customer-import.c
@@ -110,7 +110,7 @@ gnc_plugin_customer_import_cmd_test (GtkAction *action, GncMainWindowActionData
ENTER ("action %p, main window data %p", action, data);
g_message ("customer_import");
- gnc_plugin_customer_import_showGUI();
+ gnc_plugin_customer_import_showGUI (GTK_WINDOW(data->window));
LEAVE (" ");
}
diff --git a/gnucash/import-export/import-account-matcher.c b/gnucash/import-export/import-account-matcher.c
index 5373ef8..36fb7c6 100644
--- a/gnucash/import-export/import-account-matcher.c
+++ b/gnucash/import-export/import-account-matcher.c
@@ -143,7 +143,12 @@ gnc_import_add_account(GtkWidget *button, AccountPickerDialog *picker)
{
Account *selected_account, *new_account;
GList * valid_types = NULL;
- GtkWindow *parent = GTK_WINDOW (gtk_widget_get_toplevel (button));
+ GtkWindow *parent = NULL;
+
+ if (picker->dialog != NULL)
+ parent = GTK_WINDOW (picker->dialog);
+ else
+ parent = GTK_WINDOW (picker->assistant);
/*DEBUG("Begin"); */
if (picker->new_account_default_type != ACCT_TYPE_NONE)
diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index ae55178..627d218 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -567,9 +567,8 @@ GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
heading_label = GTK_WIDGET(gtk_builder_get_object (builder, "heading_label"));
g_assert (heading_label != NULL);
- /* if (parent)
- gtk_window_set_transient_for (GTK_WINDOW (info->dialog),
- GTK_WINDOW (parent));*/
+ if (parent)
+ gtk_window_set_transient_for (GTK_WINDOW (info->dialog), GTK_WINDOW (parent));
if (heading)
gtk_label_set_text (GTK_LABEL (heading_label), heading);
diff --git a/gnucash/import-export/ofx/gnc-ofx-import.c b/gnucash/import-export/ofx/gnc-ofx-import.c
index 5a37e15..47d822c 100644
--- a/gnucash/import-export/ofx/gnc-ofx-import.c
+++ b/gnucash/import-export/ofx/gnc-ofx-import.c
@@ -586,7 +586,8 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void *user_data)
investment_account_onlineid = g_strdup_printf( "%s%s",
data.account_id,
data.unique_id);
- investment_account = gnc_import_select_account(NULL,
+ investment_account = gnc_import_select_account(
+ gnc_gen_trans_list_widget(gnc_ofx_importer_gui),
investment_account_onlineid,
1,
investment_account_text,
@@ -934,7 +935,8 @@ int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data)
"%s \"%s\"",
account_type_name,
data.account_name);
- gnc_import_select_account(NULL, data.account_id, 1,
+ gnc_import_select_account(gnc_gen_trans_list_widget(gnc_ofx_importer_gui),
+ data.account_id, 1,
account_description, default_commodity,
default_type, NULL, NULL);
g_free(account_description);
@@ -1013,7 +1015,7 @@ void gnc_file_ofx_import (GtkWindow *parent)
DEBUG("Filename found: %s", selected_filename);
/* Create the Generic transaction importer GUI. */
- gnc_ofx_importer_gui = gnc_gen_trans_list_new(NULL, NULL, FALSE, 42);
+ gnc_ofx_importer_gui = gnc_gen_trans_list_new (GTK_WIDGET(parent), NULL, FALSE, 42);
/* Look up the needed preferences */
auto_create_commodity =
commit 59ae8571429e0a65ddfb2f92126ea2efb94055eb
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Thu Mar 8 04:19:16 2018 +0000
Fix transient parent warnings for report dialogs
diff --git a/gnucash/gtkbuilder/dialog-custom-report.glade b/gnucash/gtkbuilder/dialog-custom-report.glade
index 3fd47b3..c7b0411 100644
--- a/gnucash/gtkbuilder/dialog-custom-report.glade
+++ b/gnucash/gtkbuilder/dialog-custom-report.glade
@@ -6,6 +6,7 @@
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Saved Report Configurations</property>
+ <property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
diff --git a/gnucash/gtkbuilder/dialog-report.glade b/gnucash/gtkbuilder/dialog-report.glade
index 222bafb..4479db0 100644
--- a/gnucash/gtkbuilder/dialog-report.glade
+++ b/gnucash/gtkbuilder/dialog-report.glade
@@ -424,7 +424,6 @@
<property name="page_increment">10</property>
</object>
<object class="GtkDialog" id="edit_report_size">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Report Size</property>
<property name="resizable">False</property>
@@ -576,7 +575,6 @@
</action-widgets>
</object>
<object class="GtkDialog" id="select_style_sheet_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Select HTML Style Sheet</property>
<property name="default_width">300</property>
@@ -705,7 +703,6 @@
</data>
</object>
<object class="GtkDialog" id="new_style_sheet_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New Style Sheet</property>
<property name="modal">True</property>
diff --git a/gnucash/report/report-gnome/dialog-custom-report.c b/gnucash/report/report-gnome/dialog-custom-report.c
index 8f09a2a..980cf01 100644
--- a/gnucash/report/report-gnome/dialog-custom-report.c
+++ b/gnucash/report/report-gnome/dialog-custom-report.c
@@ -503,6 +503,8 @@ static CustomReportDialog *gnc_ui_custom_report_internal(GncMainWindow * window)
set_reports_view_and_model(crd);
crd->window = window;
+ gtk_window_set_transient_for (GTK_WINDOW (crd->dialog), GTK_WINDOW(window));
+
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(crd->dialog), "GncCustomReportDialog");
diff --git a/gnucash/report/report-gnome/dialog-report-column-view.c b/gnucash/report/report-gnome/dialog-report-column-view.c
index 8c508f3..76e0b9d 100644
--- a/gnucash/report/report-gnome/dialog-report-column-view.c
+++ b/gnucash/report/report-gnome/dialog-report-column-view.c
@@ -36,6 +36,7 @@
#include "guile-mappings.h"
#include "gnc-guile-utils.h"
#include "gnc-report.h"
+#include "gnc-ui.h"
enum available_cols
{
@@ -309,7 +310,7 @@ gnc_column_view_edit_options(SCM options, SCM view)
gnc_column_view_edit * r = g_new0(gnc_column_view_edit, 1);
GtkBuilder *builder;
- r->optwin = gnc_options_dialog_new(NULL, NULL);
+ r->optwin = gnc_options_dialog_new (NULL, GTK_WINDOW(gnc_ui_get_main_window (NULL)));
/* Hide the generic dialog page list. */
gtk_widget_hide(gnc_options_page_list(r->optwin));
@@ -601,6 +602,9 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer user_data)
gnc_builder_add_from_file (builder, "dialog-report.glade", "edit_report_size");
dlg = GTK_WIDGET(gtk_builder_get_object (builder, "edit_report_size"));
+ gtk_window_set_transient_for (GTK_WINDOW(dlg),
+ GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(button))));
+
/* get the spinner widgets */
rowspin = GTK_WIDGET(gtk_builder_get_object (builder, "row_spin"));
colspin = GTK_WIDGET(gtk_builder_get_object (builder, "col_spin"));
diff --git a/gnucash/report/report-gnome/dialog-report-style-sheet.c b/gnucash/report/report-gnome/dialog-report-style-sheet.c
index ebd8a1e..148cd7b 100644
--- a/gnucash/report/report-gnome/dialog-report-style-sheet.c
+++ b/gnucash/report/report-gnome/dialog-report-style-sheet.c
@@ -417,7 +417,7 @@ gnc_style_sheet_select_dialog_event_cb (GtkWidget *widget,
static StyleSheetDialog *
-gnc_style_sheet_select_dialog_create(void)
+gnc_style_sheet_select_dialog_create(GtkWindow *parent)
{
StyleSheetDialog * ss = g_new0(StyleSheetDialog, 1);
GtkBuilder * builder;
@@ -429,6 +429,8 @@ gnc_style_sheet_select_dialog_create(void)
ss->toplevel = GTK_WIDGET(gtk_builder_get_object (builder, "select_style_sheet_dialog"));
+ gtk_window_set_transient_for (GTK_WINDOW (ss->toplevel), GTK_WINDOW(parent));
+
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(ss->toplevel), "GncStyleSheetDialog");
@@ -461,7 +463,7 @@ gnc_style_sheet_select_dialog_create(void)
void
-gnc_style_sheet_dialog_open(void)
+gnc_style_sheet_dialog_open(GtkWindow *parent)
{
if (gnc_style_sheet_dialog)
{
@@ -470,7 +472,7 @@ gnc_style_sheet_dialog_open(void)
else
{
gnc_style_sheet_dialog =
- gnc_style_sheet_select_dialog_create();
+ gnc_style_sheet_select_dialog_create(parent);
}
}
diff --git a/gnucash/report/report-gnome/dialog-report-style-sheet.h b/gnucash/report/report-gnome/dialog-report-style-sheet.h
index 1b41116..42f0c77 100644
--- a/gnucash/report/report-gnome/dialog-report-style-sheet.h
+++ b/gnucash/report/report-gnome/dialog-report-style-sheet.h
@@ -26,6 +26,6 @@
typedef struct _stylesheetdialog StyleSheetDialog;
-void gnc_style_sheet_dialog_open(void);
+void gnc_style_sheet_dialog_open(GtkWindow *parent);
#endif
diff --git a/gnucash/report/stylesheets/gnc-plugin-stylesheets.c b/gnucash/report/stylesheets/gnc-plugin-stylesheets.c
index 17061d1..923a0a4 100644
--- a/gnucash/report/stylesheets/gnc-plugin-stylesheets.c
+++ b/gnucash/report/stylesheets/gnc-plugin-stylesheets.c
@@ -147,7 +147,7 @@ static void
gnc_plugin_stylesheets_cmd_edit_style_sheet (GtkAction *action,
GncMainWindowActionData *data)
{
- gnc_style_sheet_dialog_open();
+ gnc_style_sheet_dialog_open(GTK_WINDOW (data->window));
}
/************************************************************
commit 6cbf5dbba5778ff0df1417db9accf5c450c03c88
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Thu Mar 8 04:17:00 2018 +0000
Fix transient parent warnings for various business dialogs
diff --git a/gnucash/gnome-utils/dialog-tax-table.c b/gnucash/gnome-utils/dialog-tax-table.c
index 0274167..dddce0b 100644
--- a/gnucash/gnome-utils/dialog-tax-table.c
+++ b/gnucash/gnome-utils/dialog-tax-table.c
@@ -680,7 +680,7 @@ find_handler (gpointer find_data, gpointer user_data)
/* Create a tax-table window */
TaxTableWindow *
-gnc_ui_tax_table_window_new (QofBook *book)
+gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
{
TaxTableWindow *ttw;
GtkBuilder *builder;
@@ -716,6 +716,8 @@ gnc_ui_tax_table_window_new (QofBook *book)
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 style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(ttw->dialog), "GncTaxTableDialog");
@@ -786,13 +788,13 @@ gnc_ui_tax_table_window_destroy (TaxTableWindow *ttw)
/* Create a new tax-table by name */
GncTaxTable *
-gnc_ui_tax_table_new_from_name (QofBook *book, const char *name)
+gnc_ui_tax_table_new_from_name (GtkWindow *parent, QofBook *book, const char *name)
{
TaxTableWindow *ttw;
if (!book) return NULL;
- ttw = gnc_ui_tax_table_window_new (book);
+ ttw = gnc_ui_tax_table_window_new (parent, book);
if (!ttw) return NULL;
return new_tax_table_dialog (ttw, TRUE, NULL, name);
diff --git a/gnucash/gnome-utils/dialog-tax-table.h b/gnucash/gnome-utils/dialog-tax-table.h
index abbb545..c90a740 100644
--- a/gnucash/gnome-utils/dialog-tax-table.h
+++ b/gnucash/gnome-utils/dialog-tax-table.h
@@ -29,10 +29,10 @@ typedef struct _taxtable_window TaxTableWindow;
#include "gncTaxTable.h"
/* Create a new tax-table by name */
-GncTaxTable * gnc_ui_tax_table_new_from_name (QofBook *book, const char *name);
+GncTaxTable * gnc_ui_tax_table_new_from_name (GtkWindow *parent, QofBook *book, const char *name);
/* Create a tax-table window */
-TaxTableWindow * gnc_ui_tax_table_window_new (QofBook *book);
+TaxTableWindow * gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book);
/* Destroy a tax-table window */
void gnc_ui_tax_table_window_destroy (TaxTableWindow *ttw);
diff --git a/gnucash/gnome-utils/gnome-utils.i b/gnucash/gnome-utils/gnome-utils.i
index 5246cd8..c5c4fe3 100644
--- a/gnucash/gnome-utils/gnome-utils.i
+++ b/gnucash/gnome-utils/gnome-utils.i
@@ -78,4 +78,4 @@ void gnc_window_show_progress (const char *message, double percentage);
gboolean gnucash_ui_is_running(void);
-TaxTableWindow * gnc_ui_tax_table_window_new (QofBook *book);
+TaxTableWindow * gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book);
diff --git a/gnucash/gnome/dialog-billterms.c b/gnucash/gnome/dialog-billterms.c
index 0a935d3..38bb656 100644
--- a/gnucash/gnome/dialog-billterms.c
+++ b/gnucash/gnome/dialog-billterms.c
@@ -741,7 +741,7 @@ find_handler (gpointer find_data, gpointer user_data)
/* Create a billterms window */
BillTermsWindow *
-gnc_ui_billterms_window_new (QofBook *book)
+gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
{
BillTermsWindow *btw;
GtkBuilder *builder;
@@ -783,6 +783,8 @@ gnc_ui_billterms_window_new (QofBook *book)
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(btw->dialog), "GncBillTermsDialog");
+ gtk_window_set_transient_for (GTK_WINDOW (btw->dialog), parent);
+
/* 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);
@@ -842,13 +844,13 @@ gnc_ui_billterms_window_destroy (BillTermsWindow *btw)
#if 0
/* Create a new billterms by name */
GncBillTerm *
-gnc_ui_billterms_new_from_name (QofBook *book, const char *name)
+gnc_ui_billterms_new_from_name (GtkWindow *parent, QofBook *book, const char *name)
{
BillTermsWindow *btw;
if (!book) return NULL;
- btw = gnc_ui_billterms_window_new (book);
+ btw = gnc_ui_billterms_window_new (parent, book);
if (!btw) return NULL;
return new_billterm_dialog (btw, NULL, name);
diff --git a/gnucash/gnome/dialog-billterms.h b/gnucash/gnome/dialog-billterms.h
index 71dc883..1bbcb7e 100644
--- a/gnucash/gnome/dialog-billterms.h
+++ b/gnucash/gnome/dialog-billterms.h
@@ -29,7 +29,7 @@ typedef struct _billterms_window BillTermsWindow;
#include "qof.h"
/* Create a billterms window */
-BillTermsWindow * gnc_ui_billterms_window_new (QofBook *book);
+BillTermsWindow * gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book);
/* Destroy a billterms window */
void gnc_ui_billterms_window_destroy (BillTermsWindow *ttw);
diff --git a/gnucash/gnome/gnc-plugin-business.c b/gnucash/gnome/gnc-plugin-business.c
index e1b6d57..5efa09b 100644
--- a/gnucash/gnome/gnc-plugin-business.c
+++ b/gnucash/gnome/gnc-plugin-business.c
@@ -779,7 +779,7 @@ gnc_plugin_business_cmd_tax_tables (GtkAction *action,
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
- gnc_ui_tax_table_window_new (gnc_get_current_book());
+ gnc_ui_tax_table_window_new (GTK_WINDOW (mw->window), gnc_get_current_book());
}
static void
@@ -789,7 +789,7 @@ gnc_plugin_business_cmd_billing_terms (GtkAction *action,
g_return_if_fail (mw != NULL);
g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
- gnc_ui_billterms_window_new (gnc_get_current_book());
+ gnc_ui_billterms_window_new (GTK_WINDOW (mw->window), gnc_get_current_book());
}
diff --git a/gnucash/gtkbuilder/dialog-billterms.glade b/gnucash/gtkbuilder/dialog-billterms.glade
index b84d653..313262d 100644
--- a/gnucash/gtkbuilder/dialog-billterms.glade
+++ b/gnucash/gtkbuilder/dialog-billterms.glade
@@ -440,7 +440,6 @@
</child>
</object>
<object class="GtkDialog" id="terms_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Terms</property>
<property name="type_hint">dialog</property>
@@ -798,7 +797,6 @@
</data>
</object>
<object class="GtkDialog" id="edit_term_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
@@ -990,7 +988,6 @@
</action-widgets>
</object>
<object class="GtkDialog" id="new_term_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
diff --git a/gnucash/gtkbuilder/dialog-tax-table.glade b/gnucash/gtkbuilder/dialog-tax-table.glade
index 077ea18..7c94459 100644
--- a/gnucash/gtkbuilder/dialog-tax-table.glade
+++ b/gnucash/gtkbuilder/dialog-tax-table.glade
@@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="tax_table_window_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Tax Tables</property>
<property name="type_hint">normal</property>
diff --git a/gnucash/register/ledger-core/gncEntryLedgerControl.c b/gnucash/register/ledger-core/gncEntryLedgerControl.c
index c95f05a..b36e44d 100644
--- a/gnucash/register/ledger-core/gncEntryLedgerControl.c
+++ b/gnucash/register/ledger-core/gncEntryLedgerControl.c
@@ -766,7 +766,7 @@ static gboolean gnc_entry_ledger_traverse (VirtualLocation *p_new_virt_loc,
ledger->full_refresh = FALSE;
- table = gnc_ui_tax_table_new_from_name (ledger->book, name);
+ table = gnc_ui_tax_table_new_from_name (GTK_WINDOW (ledger->parent), ledger->book, name);
if (!table)
break;
commit 95329f23544c3ad6fa95e61ae6f5cb9fcb84e201
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Thu Mar 8 04:14:30 2018 +0000
Fix transient parent warnings for various dialogs
diff --git a/gnucash/gnome-utils/dialog-account.c b/gnucash/gnome-utils/dialog-account.c
index 9c41dca..ae697c3 100644
--- a/gnucash/gnome-utils/dialog-account.c
+++ b/gnucash/gnome-utils/dialog-account.c
@@ -1291,11 +1291,12 @@ opening_equity_cb (GtkWidget *w, gpointer data)
* gnc_account_window_create *
* creates a window to create a new account. *
* *
+ * Args: parent - the parent window dialog *
* Args: aw - the information structure for this window *
* Return: the created window *
\*******************************************************************/
static void
-gnc_account_window_create(AccountWindow *aw)
+gnc_account_window_create(GtkWindow *parent, AccountWindow *aw)
{
GtkWidget *amount;
GtkWidget *date_edit;
@@ -1315,6 +1316,9 @@ gnc_account_window_create(AccountWindow *aw)
aw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_dialog"));
awo = G_OBJECT (aw->dialog);
+ if (parent)
+ gtk_window_set_transient_for (GTK_WINDOW (aw->dialog), parent);
+
// Set the style context for this dialog so it can be easily manipulated with css
gnc_widget_set_style_context (GTK_WIDGET(aw->dialog), "GncAccountDialog");
@@ -1616,9 +1620,7 @@ gnc_ui_new_account_window_internal (GtkWindow *parent,
aw->next_name = subaccount_names + 1;
}
- gnc_account_window_create (aw);
- gtk_window_set_transient_for (GTK_WINDOW (aw->dialog), parent);
-
+ gnc_account_window_create (parent, aw);
gnc_account_to_ui (aw);
gnc_resume_gui_refresh ();
@@ -1854,8 +1856,7 @@ gnc_ui_edit_account_window(GtkWindow *parent, Account *account)
gnc_suspend_gui_refresh ();
- gnc_account_window_create (aw);
- gtk_window_set_transient_for (GTK_WINDOW (aw->dialog), parent);
+ gnc_account_window_create (parent, aw);
gnc_account_to_ui (aw);
gnc_resume_gui_refresh ();
diff --git a/gnucash/gnome/dialog-find-transactions.c b/gnucash/gnome/dialog-find-transactions.c
index 48ffa2e..4c25ae7 100644
--- a/gnucash/gnome/dialog-find-transactions.c
+++ b/gnucash/gnome/dialog-find-transactions.c
@@ -90,7 +90,7 @@ free_ftd_cb (gpointer user_data)
}
GNCSearchWindow *
-gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg)
+gnc_ui_find_transactions_dialog_create(GtkWindow *parent, GNCLedgerDisplay * orig_ledg)
{
QofIdType type = GNC_ID_SPLIT;
struct _ftd_data *ftd;
@@ -98,7 +98,6 @@ gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg)
QofQuery *start_q, *show_q = NULL;
gboolean num_action =
qof_book_use_split_action_for_num_field(gnc_get_current_book());
- GtkWindow *parent = GTK_WINDOW(gnc_ledger_display_get_parent(orig_ledg));
/* Build parameter list in reverse order */
if (params == NULL)
diff --git a/gnucash/gnome/dialog-find-transactions.h b/gnucash/gnome/dialog-find-transactions.h
index 81cd3be..d4a150c 100644
--- a/gnucash/gnome/dialog-find-transactions.h
+++ b/gnucash/gnome/dialog-find-transactions.h
@@ -28,6 +28,6 @@
#include "dialog-search.h"
GNCSearchWindow *
-gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * ledger);
+gnc_ui_find_transactions_dialog_create (GtkWindow *parent, GNCLedgerDisplay * ledger);
#endif
diff --git a/gnucash/gnome/gnc-plugin-basic-commands.c b/gnucash/gnome/gnc-plugin-basic-commands.c
index d44cec7..5e50f6b 100644
--- a/gnucash/gnome/gnc-plugin-basic-commands.c
+++ b/gnucash/gnome/gnc-plugin-basic-commands.c
@@ -665,7 +665,7 @@ gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowAct
gnc_ui_find_transactions_dialog_create2 (NULL);
/*################## Added for Reg2 #################*/
#else
- gnc_ui_find_transactions_dialog_create (NULL);
+ gnc_ui_find_transactions_dialog_create (GTK_WINDOW(data->window), NULL);
#endif
}
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 57372d4..619d42b 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -2981,12 +2981,14 @@ gnc_plugin_page_register_cmd_find_transactions (GtkAction *action,
GncPluginPageRegister *page)
{
GncPluginPageRegisterPrivate *priv;
+ GtkWindow *window;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER(page));
ENTER("(action %p, page %p)", action, page);
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
- gnc_ui_find_transactions_dialog_create(priv->ledger);
+ window = GTK_WINDOW(gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page)));
+ gnc_ui_find_transactions_dialog_create (window, priv->ledger);
LEAVE(" ");
}
@@ -3087,6 +3089,8 @@ gnc_plugin_page_register_cmd_void_transaction (GtkAction *action,
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "void_transaction_dialog"));
entry = GTK_WIDGET(gtk_builder_get_object (builder, "reason"));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), window);
+
result = gtk_dialog_run(GTK_DIALOG(dialog));
if (result == GTK_RESPONSE_OK)
{
diff --git a/gnucash/gtkbuilder/dialog-reset-warnings.glade b/gnucash/gtkbuilder/dialog-reset-warnings.glade
index e565d08..c6afbae 100644
--- a/gnucash/gtkbuilder/dialog-reset-warnings.glade
+++ b/gnucash/gtkbuilder/dialog-reset-warnings.glade
@@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="reset_warnings_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Reset Warnings</property>
diff --git a/gnucash/gtkbuilder/gnc-plugin-page-register.glade b/gnucash/gtkbuilder/gnc-plugin-page-register.glade
index d690887..20bf4e0 100644
--- a/gnucash/gtkbuilder/gnc-plugin-page-register.glade
+++ b/gnucash/gtkbuilder/gnc-plugin-page-register.glade
@@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="filter_by_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" comments="Filter register by... Dialog">Filter register by...</property>
@@ -518,7 +517,6 @@
<property name="page_increment">10</property>
</object>
<object class="GtkDialog" id="sort_by_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" comments="Sort register by Dialog">Sort register by...</property>
@@ -873,7 +871,6 @@
<property name="page_increment">10</property>
</object>
<object class="GtkDialog" id="duplicate_transaction_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" comments="Duplicate Transaction Dialog">Duplicate Transaction</property>
@@ -1058,7 +1055,6 @@
</action-widgets>
</object>
<object class="GtkDialog" id="void_transaction_dialog">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Void Transaction</property>
Summary of changes:
gnucash/gnome-utils/dialog-account.c | 13 +++++++------
gnucash/gnome-utils/dialog-tax-table.c | 8 +++++---
gnucash/gnome-utils/dialog-tax-table.h | 4 ++--
gnucash/gnome-utils/gnome-utils.i | 2 +-
gnucash/gnome/dialog-billterms.c | 8 +++++---
gnucash/gnome/dialog-billterms.h | 2 +-
gnucash/gnome/dialog-find-transactions.c | 3 +--
gnucash/gnome/dialog-find-transactions.h | 2 +-
gnucash/gnome/gnc-plugin-basic-commands.c | 2 +-
gnucash/gnome/gnc-plugin-business.c | 4 ++--
gnucash/gnome/gnc-plugin-page-register.c | 6 +++++-
gnucash/gtkbuilder/dialog-bi-import-gui.glade | 1 -
gnucash/gtkbuilder/dialog-billterms.glade | 3 ---
gnucash/gtkbuilder/dialog-custom-report.glade | 1 +
gnucash/gtkbuilder/dialog-customer-import-gui.glade | 1 -
gnucash/gtkbuilder/dialog-import.glade | 2 --
gnucash/gtkbuilder/dialog-report.glade | 3 ---
gnucash/gtkbuilder/dialog-reset-warnings.glade | 1 -
gnucash/gtkbuilder/dialog-tax-table.glade | 1 -
gnucash/gtkbuilder/gnc-plugin-page-register.glade | 4 ----
gnucash/import-export/bi-import/dialog-bi-import-gui.c | 2 ++
.../customer-import/dialog-customer-import-gui.c | 4 +++-
.../customer-import/dialog-customer-import-gui.h | 2 +-
.../customer-import/gnc-plugin-customer-import.c | 2 +-
gnucash/import-export/import-account-matcher.c | 7 ++++++-
gnucash/import-export/import-main-matcher.c | 5 ++---
gnucash/import-export/ofx/gnc-ofx-import.c | 8 +++++---
gnucash/register/ledger-core/gncEntryLedgerControl.c | 2 +-
gnucash/report/report-gnome/dialog-custom-report.c | 2 ++
gnucash/report/report-gnome/dialog-report-column-view.c | 6 +++++-
gnucash/report/report-gnome/dialog-report-style-sheet.c | 8 +++++---
gnucash/report/report-gnome/dialog-report-style-sheet.h | 2 +-
gnucash/report/stylesheets/gnc-plugin-stylesheets.c | 2 +-
33 files changed, 67 insertions(+), 56 deletions(-)
More information about the gnucash-changes
mailing list