aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-06 21:27:25 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-06 21:27:25 +0800
commitf930448d67fd82019311755a12e0972f776ddaa7 (patch)
treec45c9b1eac5d1b955822f45de383ef530b145b9c /src
parent1811e906901628e83dfe6439c75f5399e8ec2d9b (diff)
downloadgsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar
gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar.gz
gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar.bz2
gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar.lz
gsoc2013-epiphany-f930448d67fd82019311755a12e0972f776ddaa7.tar.xz
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')
-rw-r--r--src/ephy-window.c21
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");
}
/**