# HG changeset patch # User Colin Clark # Date 1537523996 -3600 # Node ID 29231f01f36ccf69ae213b531013f9dfc47cbfed # Parent 5d88a8dfa364b8c768b096d788c203916b9f39bc Bug fix #160: Replace print dialog by standard GTK dialog https://github.com/BestImageViewer/geeqie/issues/160 Ensure print dialog has a parent window Eliminate run-time error diff -r 5d88a8dfa364 -r 29231f01f36c src/collect-table.c --- a/src/collect-table.c Thu Sep 20 19:29:39 2018 +0100 +++ b/src/collect-table.c Fri Sep 21 10:59:56 2018 +0100 @@ -904,7 +904,7 @@ fd = (ct->click_info) ? ct->click_info->fd : NULL; - print_window_new(fd, collection_table_selection_get_list(ct), collection_table_get_list(ct), ct->listview); + print_window_new(fd, collection_table_selection_get_list(ct), collection_table_get_list(ct), gtk_widget_get_toplevel(ct->listview)); } static void collection_table_popup_show_names_cb(GtkWidget *widget, gpointer data) diff -r 5d88a8dfa364 -r 29231f01f36c src/print.c --- a/src/print.c Thu Sep 20 19:29:39 2018 +0100 +++ b/src/print.c Fri Sep 21 10:59:56 2018 +0100 @@ -491,6 +491,11 @@ pw->source_selection = file_data_process_groups_in_selection(selection, FALSE, NULL); pw->text_fields = options->printer.text_fields; + if (print_layout_page_count(pw) == 0) + { + return; + } + vbox = gtk_vbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), PREF_PAD_BORDER); gtk_widget_show(vbox);