Commit 0b9cc3a7 authored by Victor Ananjevsky's avatar Victor Ananjevsky

don't use uninitialized print_settings

parent 2dc05c8e
......@@ -256,16 +256,18 @@ yad_print_run (void)
pcap |= GTK_PRINT_CAPABILITY_PREVIEW;
gtk_print_unix_dialog_set_manual_capabilities (GTK_PRINT_UNIX_DIALOG (dlg), pcap);
uri = g_build_filename (g_get_current_dir (), "yad.pdf", NULL);
gtk_print_settings_set (print_settings, "output-uri", g_filename_to_uri (uri, NULL, NULL));
g_free (uri);
if (print_settings)
gtk_print_unix_dialog_set_settings (GTK_PRINT_UNIX_DIALOG (dlg), print_settings);
else
print_settings = gtk_print_settings_new ();
if (page_setup)
gtk_print_unix_dialog_set_page_setup (GTK_PRINT_UNIX_DIALOG (dlg), page_setup);
uri = g_build_filename (g_get_current_dir (), "yad.pdf", NULL);
gtk_print_settings_set (print_settings, "output-uri", g_filename_to_uri (uri, NULL, NULL));
g_free (uri);
/* set window behavior */
gtk_widget_set_name (dlg, "yad-dialog-window");
if (options.data.sticky)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment