[epiphany/gnome-3-32] Remember printer settings



commit ba301774b2977bd1f3c442361510ab33c75da606
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Thu Mar 21 19:42:21 2019 +0000

    Remember printer settings
    
    Keep track of printer settings and restore if needed.
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/138
    
    
    (cherry picked from commit 8f6fecdfa9be86a5adaf097b6ddbe9eb48843462)

 embed/ephy-web-view.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2155d482b..3c634bce1 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3585,14 +3585,15 @@ ephy_web_view_print (EphyWebView *view)
                     G_CALLBACK (print_operation_failed_cb),
                     view);
   webkit_print_operation_set_page_setup (operation, ephy_embed_shell_get_page_setup (shell));
-  settings = gtk_print_settings_new ();
+  settings = ephy_embed_shell_get_print_settings (shell);
   gtk_print_settings_set (settings,
                           GTK_PRINT_SETTINGS_OUTPUT_BASENAME,
                           webkit_web_view_get_title (WEBKIT_WEB_VIEW (view)));
   webkit_print_operation_set_print_settings (operation, settings);
-  webkit_print_operation_run_dialog (operation, NULL);
+  if (webkit_print_operation_run_dialog (operation, NULL) == WEBKIT_PRINT_OPERATION_RESPONSE_PRINT)
+    ephy_embed_shell_set_print_settings (shell, webkit_print_operation_get_print_settings (operation));
+
   g_object_unref (operation);
-  g_object_unref (settings);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]