[epiphany] Remember printer settings
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Remember printer settings
- Date: Sun, 24 Mar 2019 19:19:45 +0000 (UTC)
commit 8f6fecdfa9be86a5adaf097b6ddbe9eb48843462
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Thu Mar 21 20:42:21 2019 +0100
Remember printer settings
Keep track of printer settings and restore if needed.
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/138
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]