diff options
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index ac845e637..051115db3 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -59,17 +59,32 @@ #include <gtk/gtkmain.h> #include <gtk/gtkicontheme.h> #include <gtk/gtktoggleaction.h> +#include <gtk/gtkprintoperation.h> #include <glib/gi18n.h> +static void +page_setup_done_cb (GtkPageSetup *setup, + EphyEmbedShell *shell) +{ + if (setup != NULL) + { + ephy_embed_shell_set_page_setup (shell, setup); + } +} + void window_cmd_file_print_setup (GtkAction *action, EphyWindow *window) { - EphyDialog *dialog; - - dialog = EPHY_DIALOG (ephy_shell_get_print_setup_dialog (ephy_shell)); + EphyEmbedShell *shell; - ephy_dialog_show (dialog); + shell = ephy_embed_shell_get_default (); + gtk_print_run_page_setup_dialog_async + (GTK_WINDOW (window), + ephy_embed_shell_get_page_setup (shell), + ephy_embed_shell_get_print_settings (shell), + page_setup_done_cb, + shell); } void |