mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Make sure to ask for an export-to-PDF output folder every time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21723 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c5b86dd183
commit
7b08c8f345
@ -1112,16 +1112,6 @@ impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf )
|
|||||||
// Two different modes of operation. Either export to PDF, or run the
|
// Two different modes of operation. Either export to PDF, or run the
|
||||||
// normal print dialog
|
// normal print dialog
|
||||||
if (export_pdf)
|
if (export_pdf)
|
||||||
{
|
|
||||||
gboolean have_outputdir = gtk_print_settings_has_key(print_settings, GNC_GTK_PRINT_SETTINGS_EXPORT_DIR);
|
|
||||||
if (have_outputdir)
|
|
||||||
{
|
|
||||||
gchar *tmp = g_build_filename(gtk_print_settings_get(print_settings, GNC_GTK_PRINT_SETTINGS_EXPORT_DIR),
|
|
||||||
export_filename, NULL);
|
|
||||||
g_free(export_filename);
|
|
||||||
export_filename = tmp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
gint result;
|
gint result;
|
||||||
@ -1133,7 +1123,16 @@ impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf )
|
|||||||
NULL);
|
NULL);
|
||||||
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
|
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(dialog), export_filename);
|
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(dialog), export_filename);
|
||||||
|
|
||||||
|
if (gtk_print_settings_has_key(print_settings, GNC_GTK_PRINT_SETTINGS_EXPORT_DIR))
|
||||||
|
{
|
||||||
|
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
|
||||||
|
gtk_print_settings_get(print_settings,
|
||||||
|
GNC_GTK_PRINT_SETTINGS_EXPORT_DIR));
|
||||||
|
}
|
||||||
|
|
||||||
result = gtk_dialog_run (GTK_DIALOG (dialog));
|
result = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||||
|
|
||||||
if (result == GTK_RESPONSE_ACCEPT)
|
if (result == GTK_RESPONSE_ACCEPT)
|
||||||
{
|
{
|
||||||
gchar *dirname;
|
gchar *dirname;
|
||||||
@ -1155,7 +1154,6 @@ impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf )
|
|||||||
g_object_unref( op );
|
g_object_unref( op );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// This function expects the full filename including (absolute?) path
|
// This function expects the full filename including (absolute?) path
|
||||||
gtk_print_operation_set_export_filename(op, export_filename);
|
gtk_print_operation_set_export_filename(op, export_filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user