aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-shell.c
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 /embed/ephy-embed-shell.c
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 'embed/ephy-embed-shell.c')
-rw-r--r--embed/ephy-embed-shell.c95
1 files changed, 95 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 1ce52db44..45c48fa2e 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -46,6 +46,8 @@ struct _EphyEmbedShellPrivate
EphyEmbedSingle *embed_single;
EphyEncodings *encodings;
EphyAdBlockManager *adblock_manager;
+ GtkPageSetup *page_setup;
+ GtkPrintSettings *print_settings;
guint single_initialised : 1;
};
@@ -123,6 +125,18 @@ ephy_embed_shell_dispose (GObject *object)
priv->encodings = NULL;
}
+ if (priv->page_setup != NULL)
+ {
+ g_object_unref (priv->page_setup);
+ priv->page_setup = NULL;
+ }
+
+ if (priv->print_settings != NULL)
+ {
+ g_object_unref (priv->print_settings);
+ priv->print_settings = NULL;
+ }
+
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -359,3 +373,84 @@ ephy_embed_shell_get_adblock_manager (EphyEmbedShell *shell)
return G_OBJECT (shell->priv->adblock_manager);
}
+void
+ephy_embed_shell_set_page_setup (EphyEmbedShell *shell,
+ GtkPageSetup *page_setup)
+{
+ EphyEmbedShellPrivate *priv;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ priv = shell->priv;
+
+ if (page_setup != NULL)
+ {
+ g_object_ref (page_setup);
+ }
+
+ if (priv->page_setup != NULL)
+ {
+ g_object_unref (priv->page_setup);
+ }
+
+ /* FIXME: save settings to disk! */
+
+ priv->page_setup = page_setup;
+}
+
+GtkPageSetup *
+ephy_embed_shell_get_page_setup (EphyEmbedShell *shell)
+{
+ EphyEmbedShellPrivate *priv;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ priv = shell->priv;
+
+ if (priv->page_setup == NULL)
+ {
+ /* FIXME: load stored settings! */
+ priv->page_setup = gtk_page_setup_new ();
+ }
+
+ return priv->page_setup;
+}
+
+void
+ephy_embed_shell_set_print_settings (EphyEmbedShell *shell,
+ GtkPrintSettings *settings)
+{
+ EphyEmbedShellPrivate *priv;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ priv = shell->priv;
+
+ if (settings != NULL)
+ {
+ g_object_ref (settings);
+ }
+
+ if (priv->print_settings != NULL)
+ {
+ g_object_unref (priv->print_settings);
+ }
+
+ /* FIXME: save settings to disk! */
+
+ priv->print_settings = settings;
+}
+
+GtkPrintSettings *
+ephy_embed_shell_get_print_settings (EphyEmbedShell *shell)
+{
+ EphyEmbedShellPrivate *priv;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ priv = shell->priv;
+
+ if (priv->print_settings == NULL)
+ {
+ /* FIXME: load stored settings! */
+ priv->print_settings = gtk_print_settings_new ();
+ }
+
+ return priv->print_settings;
+}