diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-06-25 19:31:22 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-06-25 19:31:22 +0800 |
commit | 36ad80414746a470d3f64849266817c58fef2344 (patch) | |
tree | f7360d1212f4dbc10e0606b4e78852ebbb3463a2 /embed/mozilla/mozilla-embed.cpp | |
parent | b6b7539092921b12790435b10e6bfb68ec9339f5 (diff) | |
download | gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.tar gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.tar.gz gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.tar.bz2 gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.tar.lz gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.tar.xz gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.tar.zst gsoc2013-epiphany-36ad80414746a470d3f64849266817c58fef2344.zip |
Simplify print code. Now there is only one case to deal with, the mozilla
2004-06-25 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-embed.c: (ephy_embed_print),
(ephy_embed_set_print_preview_mode):
* embed/ephy-embed.h:
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/PrintingPromptService.cpp:
* embed/mozilla/mozilla-embed.cpp:
* embed/print-dialog.c: (ephy_print_dialog_response_cb),
(ephy_print_dialog_new):
* embed/print-dialog.h:
* src/ephy-window.c: (ephy_window_delete_event_cb),
(ephy_window_finalize), (update_embed_dialogs), (ephy_window_find):
* src/ppview-toolbar.c: (toolbar_cmd_ppv_close):
* src/window-commands.c: (window_cmd_file_print_preview),
(window_cmd_file_print):
Simplify print code. Now there is only one case to deal with,
the mozilla prompt dialog.
This should help with xprint.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 5d7e30bc8..cdbd4ea8c 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -683,39 +683,19 @@ impl_get_security_level (EphyEmbed *embed, } static void -impl_print (EphyEmbed *embed, - EmbedPrintInfo *info) +impl_print (EphyEmbed *embed) { MozillaEmbedPrivate *mpriv = MOZILLA_EMBED(embed)->priv; - nsresult result; - - nsCOMPtr<nsIPrintSettings> options; - result = mpriv->browser->GetPrintSettings(getter_AddRefs(options)); - if (NS_FAILED (result) || !options) return; - - /* work around mozilla bug which borks when printing selection without having one */ - if (info->pages == 2 && ephy_command_manager_can_do_command - (EPHY_COMMAND_MANAGER (embed), "cmd_copy") == FALSE) - { - info->pages = 0; - } - - MozillaCollatePrintSettings(info, options); - - options->SetPrintSilent (PR_TRUE); - - result = mpriv->browser->Print(options, info->preview); - - /* Workaround for bug 125984 */ - options->SetPrintSilent (PR_FALSE); + + mpriv->browser->Print (); } static void -impl_print_preview_close (EphyEmbed *embed) +impl_set_print_preview_mode (EphyEmbed *embed, gboolean preview_mode) { MozillaEmbedPrivate *mpriv = MOZILLA_EMBED(embed)->priv; - mpriv->browser->PrintPreviewClose(); + mpriv->browser->SetPrintPreviewMode (preview_mode); } static int @@ -1203,7 +1183,7 @@ ephy_embed_iface_init (EphyEmbedIface *iface) iface->get_encoding = impl_get_encoding; iface->has_automatic_encoding = impl_has_automatic_encoding; iface->print = impl_print; - iface->print_preview_close = impl_print_preview_close; + iface->set_print_preview_mode = impl_set_print_preview_mode; iface->print_preview_n_pages = impl_print_preview_n_pages; iface->print_preview_navigate = impl_print_preview_navigate; iface->has_modified_forms = impl_has_modified_forms; |