diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-29 16:00:01 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-29 16:30:26 -0400 |
commit | 15c6760a96379ba8c6e6ed21bcc3683437a7bfeb (patch) | |
tree | fb0aee1a92e90ec00019a42bf2d56fe864972e39 /gtk/gtkprintunixdialog.c | |
parent | 6ffb3d3fe5729105093845228380daabd225b704 (diff) | |
download | gtk+-15c6760a96379ba8c6e6ed21bcc3683437a7bfeb.tar.gz |
print dialog: Prevent cascading paper dialogs
We trigger the paper dialog when the "manage" item
in the dropdown is selected. But the selection also
changes due to internal changes, such as reloading
the custom paper list when the paper dialog is
closed. We need to be extra careful to avoid triggering
another paper dialog when that happens.
Diffstat (limited to 'gtk/gtkprintunixdialog.c')
-rw-r--r-- | gtk/gtkprintunixdialog.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 5375926db4..b7e486fb30 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -1614,7 +1614,7 @@ set_paper_size (GtkPrintUnixDialog *dialog, if (page_setup == NULL) return FALSE; - model = G_LIST_MODEL (dialog->page_setup_list); + model = gtk_drop_down_get_model (GTK_DROP_DOWN (dialog->paper_size_combo)); for (i = 0; i < g_list_model_get_n_items (model); i++) { list_page_setup = g_list_model_get_item (model, i); @@ -2901,9 +2901,8 @@ custom_paper_dialog_response_cb (GtkDialog *custom_paper_dialog, { GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (user_data); - gtk_print_load_custom_papers (dialog->custom_paper_list); - dialog->internal_page_setup_change = TRUE; + gtk_print_load_custom_papers (dialog->custom_paper_list); update_paper_sizes (dialog); dialog->internal_page_setup_change = FALSE; |