aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-06-19 02:52:03 +0800
committerChristian Persch <chpe@src.gnome.org>2006-06-19 02:52:03 +0800
commitc6573cb04bdc216e7e5ea3657cb1186eaf0f1095 (patch)
tree769cc33a1564a50d1414cb6b6b6f7306c1635840 /src
parent0db1af2c76d4cae33992f82a1736f6ed743b7dc1 (diff)
downloadgsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.tar
gsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.tar.gz
gsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.tar.bz2
gsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.tar.lz
gsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.tar.xz
gsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.tar.zst
gsoc2013-epiphany-c6573cb04bdc216e7e5ea3657cb1186eaf0f1095.zip
A embed/mozilla/GeckoPrintService.cpp: A
2006-06-18 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * data/default-prefs-common.js: * embed/Makefile.am: * embed/ephy-embed-shell.c: (ephy_embed_shell_dispose), (ephy_embed_shell_set_page_setup), (ephy_embed_shell_get_page_setup), (ephy_embed_shell_set_print_settings), (ephy_embed_shell_get_print_settings): * embed/ephy-embed-shell.h: * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: * embed/mozilla/EphyUtils.cpp: * embed/mozilla/EphyUtils.h: * embed/mozilla/Makefile.am: A embed/mozilla/GeckoPrintService.cpp: A embed/mozilla/GeckoPrintService.h: A embed/mozilla/GeckoPrintSession.cpp: A embed/mozilla/GeckoPrintSession.h: * embed/mozilla/MozRegisterComponents.cpp: R embed/mozilla/PrintingPromptService.cpp: R embed/mozilla/PrintingPromptService.h: * embed/mozilla/mozilla-embed-single.cpp: R embed/print-dialog.c: R embed/print-dialog.h: * src/ephy-shell.c: (ephy_shell_dispose), (ephy_shell_get_prefs_dialog): * src/ephy-shell.h: * src/epiphany.defs: * src/window-commands.c: (page_setup_done_cb), (window_cmd_file_print_setup): Drop libgnomeprint[ui] and use gtk printing.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c39
-rw-r--r--src/ephy-shell.h2
-rw-r--r--src/epiphany.defs6
-rw-r--r--src/window-commands.c23
4 files changed, 25 insertions, 45 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 410da1756..81618503e 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -21,6 +21,12 @@
#include "config.h"
+#include <string.h>
+#include <glib/gi18n.h>
+#include <gtk/gtknotebook.h>
+#include <dirent.h>
+#include <unistd.h>
+
#include "ephy-shell.h"
#include "ephy-type-builtins.h"
#include "ephy-embed-shell.h"
@@ -44,16 +50,9 @@
#include "egg-toolbars-model.h"
#include "ephy-toolbars-model.h"
#include "ephy-toolbar.h"
-#include "print-dialog.h"
#include "ephy-prefs.h"
#include "ephy-gui.h"
-#include <string.h>
-#include <glib/gi18n.h>
-#include <gtk/gtknotebook.h>
-#include <dirent.h>
-#include <unistd.h>
-
#ifdef ENABLE_NETWORK_MANAGER
#include "ephy-net-monitor.h"
#endif
@@ -75,7 +74,6 @@ struct _EphyShellPrivate
GtkWidget *history_window;
GObject *pdm_dialog;
GObject *prefs_dialog;
- GObject *print_setup_dialog;
GList *del_on_exit;
guint embed_single_connected : 1;
@@ -354,13 +352,6 @@ ephy_shell_dispose (GObject *object)
priv->prefs_dialog = NULL;
}
- if (priv->print_setup_dialog != NULL)
- {
- LOG ("Unref print setup dialog");
- g_object_unref (priv->print_setup_dialog);
- priv->print_setup_dialog = NULL;
- }
-
if (priv->bookmarks != NULL)
{
LOG ("Unref bookmarks");
@@ -855,24 +846,6 @@ ephy_shell_get_prefs_dialog (EphyShell *shell)
return shell->priv->prefs_dialog;
}
-GObject *
-ephy_shell_get_print_setup_dialog (EphyShell *shell)
-{
- if (shell->priv->print_setup_dialog == NULL)
- {
- GObject **dialog;
-
- shell->priv->print_setup_dialog = G_OBJECT (ephy_print_setup_dialog_new ());
-
- dialog = &shell->priv->print_setup_dialog;
-
- g_object_add_weak_pointer (shell->priv->print_setup_dialog,
- (gpointer *) dialog);
- }
-
- return shell->priv->print_setup_dialog;
-}
-
void
_ephy_shell_create_instance (void)
{
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 76e661c0f..8b400c2a4 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -117,8 +117,6 @@ GObject *ephy_shell_get_pdm_dialog (EphyShell *shell);
GObject *ephy_shell_get_prefs_dialog (EphyShell *shell);
-GObject *ephy_shell_get_print_setup_dialog (EphyShell *shell);
-
/* private API */
void _ephy_shell_create_instance (void);
diff --git a/src/epiphany.defs b/src/epiphany.defs
index 546212962..d811587c8 100644
--- a/src/epiphany.defs
+++ b/src/epiphany.defs
@@ -3144,12 +3144,6 @@
(return-type "GObject*")
)
-(define-method get_print_setup_dialog
- (of-object "EphyShell")
- (c-name "ephy_shell_get_print_setup_dialog")
- (return-type "GObject*")
-)
-
(define-method get_dbus_service
(of-object "EphyShell")
(c-name "ephy_shell_get_dbus_service")
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