Mercurial > hg > forks > geeqie
changeset 2831:29231f01f36c
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
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Fri, 21 Sep 2018 10:59:56 +0100 |
parents | 5d88a8dfa364 |
children | ac46f4e545a4 |
files | src/collect-table.c src/print.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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);