diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-10-06 21:27:25 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-10-06 21:27:25 +0800 |
commit | f930448d67fd82019311755a12e0972f776ddaa7 (patch) | |
tree | c45c9b1eac5d1b955822f45de383ef530b145b9c /src/ephy-window.c | |
parent | 1811e906901628e83dfe6439c75f5399e8ec2d9b (diff) | |
download | gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar.gz gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar.zst gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.zip |
Notify when entering or leaving print preview mode. Fixes bug #154591.
2004-10-06 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-window.c: (ephy_window_set_property),
(ephy_window_get_property), (ephy_window_class_init),
(ephy_window_set_print_preview):
Notify when entering or leaving print preview mode. Fixes bug #154591.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 319bfc98b..4c669882f 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -372,7 +372,8 @@ enum { PROP_0, PROP_ACTIVE_TAB, - PROP_CHROME + PROP_CHROME, + PROP_PPV_MODE }; static GObjectClass *parent_class = NULL; @@ -2009,6 +2010,9 @@ ephy_window_set_property (GObject *object, case PROP_CHROME: ephy_window_set_chrome (window, g_value_get_flags (value)); break; + case PROP_PPV_MODE: + ephy_window_set_print_preview (window, g_value_get_boolean (value)); + break; } } @@ -2028,6 +2032,9 @@ ephy_window_get_property (GObject *object, case PROP_CHROME: g_value_set_flags (value, window->priv->chrome); break; + case PROP_PPV_MODE: + g_value_set_boolean (value, window->priv->ppv_mode); + break; } } @@ -2095,7 +2102,15 @@ ephy_window_class_init (EphyWindowClass *klass) G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); - g_type_class_add_private (object_class, sizeof(EphyWindowPrivate)); + g_object_class_install_property (object_class, + PROP_PPV_MODE, + g_param_spec_boolean ("print-preview-mode", + "Print preview mode", + "Whether the window is in print preview mode", + FALSE, + G_PARAM_READWRITE)); + + g_type_class_add_private (object_class, sizeof (EphyWindowPrivate)); } static void @@ -2438,6 +2453,8 @@ ephy_window_set_print_preview (EphyWindow *window, gboolean enabled) window->priv->ppview_toolbar = NULL; gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); } + + g_object_notify (G_OBJECT (window), "print-preview-mode"); } /** |