mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Pass a NULL parent to gnc_options_dialog_new_modal in assistant-hierarchy.
In this case the dialog isn't a dialog, it's a notebook page, so it doesn't need to have a parent at creation.
This commit is contained in:
@@ -1174,9 +1174,9 @@ book_options_dialog_close_cb(GNCOptionWin * optionwin,
|
||||
}
|
||||
|
||||
static void
|
||||
assistant_insert_book_options_page (hierarchy_data *data, GtkWindow* parent)
|
||||
assistant_insert_book_options_page (hierarchy_data *data)
|
||||
{
|
||||
GtkWidget *options;
|
||||
GtkWidget *options, *parent;
|
||||
GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_box_set_homogeneous (GTK_BOX (vbox), FALSE);
|
||||
|
||||
@@ -1185,9 +1185,9 @@ assistant_insert_book_options_page (hierarchy_data *data, GtkWindow* parent)
|
||||
gnc_option_db_load, data->options);
|
||||
gnc_option_db_clean (data->options);
|
||||
|
||||
/* The options dialog gets added to the notebook so it doesn't need a parent.*/
|
||||
data->optionwin = gnc_options_dialog_new_modal (TRUE, _("New Book Options"),
|
||||
DIALOG_BOOK_OPTIONS_CM_CLASS,
|
||||
parent);
|
||||
DIALOG_BOOK_OPTIONS_CM_CLASS, NULL);
|
||||
gnc_options_dialog_build_contents_full (data->optionwin, data->options, FALSE);
|
||||
|
||||
gnc_options_dialog_set_close_cb (data->optionwin,
|
||||
@@ -1196,6 +1196,7 @@ assistant_insert_book_options_page (hierarchy_data *data, GtkWindow* parent)
|
||||
gnc_options_dialog_set_new_book_option_values (data->options);
|
||||
|
||||
options = gnc_options_dialog_notebook (data->optionwin);
|
||||
parent = gtk_widget_get_parent (options);
|
||||
|
||||
g_object_ref (options);
|
||||
gtk_container_remove (GTK_CONTAINER(parent), options);
|
||||
@@ -1278,7 +1279,7 @@ gnc_create_hierarchy_assistant (gboolean use_defaults, GncHierarchyAssistantFini
|
||||
|
||||
/* Book options page - only on new books */
|
||||
if (data->new_book)
|
||||
assistant_insert_book_options_page (data, GTK_WINDOW (tree_view));
|
||||
assistant_insert_book_options_page (data);
|
||||
|
||||
/* Final Accounts Page */
|
||||
data->final_account_tree_container = GTK_WIDGET(gtk_builder_get_object (builder, "final_account_tree_box"));
|
||||
|
||||
Reference in New Issue
Block a user