diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-01-18 23:17:53 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-01-18 23:40:10 +0800 |
commit | 3cc93b5ec64d97739cf5065e19b31759d1495b9e (patch) | |
tree | 573db2c6ec58b83bbeeb8db2659ac5ab0b569c43 | |
parent | 066acbea3d32c04f15b6754310c8ba422f7c2f36 (diff) | |
download | gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.tar gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.tar.gz gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.tar.bz2 gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.tar.lz gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.tar.xz gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.tar.zst gsoc2013-epiphany-3cc93b5ec64d97739cf5065e19b31759d1495b9e.zip |
Remove Print Setup item from the super menu and embed it into print dialog
-rw-r--r-- | data/ui/epiphany-ui.xml | 1 | ||||
-rw-r--r-- | embed/ephy-web-view.c | 9 | ||||
-rw-r--r-- | src/ephy-lockdown.c | 3 | ||||
-rw-r--r-- | src/ephy-window.c | 3 | ||||
-rw-r--r-- | src/window-commands.c | 25 | ||||
-rw-r--r-- | src/window-commands.h | 3 |
6 files changed, 6 insertions, 38 deletions
diff --git a/data/ui/epiphany-ui.xml b/data/ui/epiphany-ui.xml index a44059b32..1d22837d7 100644 --- a/data/ui/epiphany-ui.xml +++ b/data/ui/epiphany-ui.xml @@ -94,7 +94,6 @@ <menuitem name="EditCopyMenu" action="EditCopy"/> <menuitem name="EditPasteMenu" action="EditPaste"/> <separator name="EditSep3"/> - <menuitem name="FilePrintSetupMenu" action="FilePrintSetup"/> <menuitem name="FilePrintMenu" action="FilePrint"/> <separator name="FileSep4"/> <menuitem name="EditFindMenu" action="EditFind"/> diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 638640ba9..9fe4f1fdb 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -3277,10 +3277,10 @@ ephy_web_view_run_print_action (EphyWebView *view, GtkPrintOperationAction actio main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view)); operation = gtk_print_operation_new (); - gtk_print_operation_set_default_page_setup (operation, ephy_embed_shell_get_page_setup (shell)); + gtk_print_operation_set_embed_page_setup (operation, TRUE); + gtk_print_operation_set_default_page_setup (operation, ephy_embed_shell_get_page_setup (shell)); webkit_web_frame_print_full (main_frame, operation, action, &error); - g_object_unref (operation); if (error) { GtkWidget *info_bar; @@ -3300,7 +3300,10 @@ ephy_web_view_run_print_action (EphyWebView *view, GtkPrintOperationAction actio ephy_embed_add_top_widget (embed, info_bar, FALSE); gtk_widget_show_all (info_bar); - } + } else + ephy_embed_shell_set_page_setup (shell, gtk_print_operation_get_default_page_setup (operation)); + + g_object_unref (operation); } /** diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c index cc75b1291..9186cad0a 100644 --- a/src/ephy-lockdown.c +++ b/src/ephy-lockdown.c @@ -103,9 +103,6 @@ typedef struct { static const BindAction window_actions[] = { { EPHY_PREFS_LOCKDOWN_PRINTING, "FilePrint", "sensitive" }, - { EPHY_PREFS_LOCKDOWN_PRINTING, "FilePrintSetup", "sensitive" }, - { EPHY_PREFS_LOCKDOWN_PRINT_SETUP, "FilePrintSetup", "sensitive" }, - { EPHY_PREFS_LOCKDOWN_COMMAND_LINE, "FilePrintSetup", "sensitive" }, { EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING, "FileBookmarkPage", "sensitive" }, diff --git a/src/ephy-window.c b/src/ephy-window.c index 4ff7ce3fc..dcf312d50 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -126,9 +126,6 @@ static const GtkActionEntry ephy_menu_entries [] = { { "FileSaveAsApplication", GTK_STOCK_SAVE_AS, N_("Save As _Web Application…"), "<shift><control>A", N_("Save the current page as a Web Application"), G_CALLBACK (window_cmd_file_save_as_application) }, - { "FilePrintSetup", STOCK_PRINT_SETUP, N_("Page Set_up"), NULL, - N_("Setup the page settings for printing"), - G_CALLBACK (window_cmd_file_print_setup) }, { "FilePrint", GTK_STOCK_PRINT, N_("_Print…"), "<control>P", N_("Print the current page"), G_CALLBACK (window_cmd_file_print) }, diff --git a/src/window-commands.c b/src/window-commands.c index 65dedb5e2..f2539dd9c 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -59,31 +59,6 @@ #include <string.h> #include <webkit/webkit.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) -{ - EphyEmbedShell *shell; - - 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), - (GtkPageSetupDoneFunc) page_setup_done_cb, - shell); -} - void window_cmd_file_print (GtkAction *action, EphyWindow *window) diff --git a/src/window-commands.h b/src/window-commands.h index ddd42a0ab..70cc9e597 100644 --- a/src/window-commands.h +++ b/src/window-commands.h @@ -54,9 +54,6 @@ void window_cmd_file_save_as (GtkAction *action, void window_cmd_file_save_as_application (GtkAction *action, EphyWindow *window); -void window_cmd_file_print_setup (GtkAction *action, - EphyWindow *window); - void window_cmd_file_print (GtkAction *action, EphyWindow *window); |