diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-05-30 00:11:06 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-05-30 00:11:06 +0800 |
commit | 87299e4f35efdde09a67fd530812725197bbc87c (patch) | |
tree | 4a786bbcf4c864cfaee07040829578fda015abc8 /src/ephy-window.c | |
parent | 2dfaf78cccff672362ae9f3bbf299da641851306 (diff) | |
download | gsoc2013-epiphany-87299e4f35efdde09a67fd530812725197bbc87c.tar.gz gsoc2013-epiphany-87299e4f35efdde09a67fd530812725197bbc87c.tar.zst gsoc2013-epiphany-87299e4f35efdde09a67fd530812725197bbc87c.zip |
Deactivate typeaheadfind in print preview mode.
2005-05-29 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-find-toolbar.c: (tab_dom_key_press_cb),
(entry_activate_cb), (sync_print_preview_mode),
(ephy_find_toolbar_set_window), (ephy_find_toolbar_get_property),
(ephy_find_toolbar_set_property), (ephy_find_toolbar_class_init),
(ephy_find_toolbar_new):
* src/ephy-find-toolbar.h:
* src/ephy-window.c: (ephy_window_init),
(ephy_window_set_print_preview), (ephy_window_get_is_popup),
(ephy_window_get_is_print_preview):
* src/ephy-window.h:
Deactivate typeaheadfind in print preview mode.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 871f35eca..8bf8ca2a9 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2711,7 +2711,7 @@ ephy_window_init (EphyWindow *window) TRUE, TRUE, 0); gtk_widget_show (GTK_WIDGET (window->priv->notebook)); - priv->find_toolbar = ephy_find_toolbar_new (); + priv->find_toolbar = ephy_find_toolbar_new (window); g_signal_connect (priv->find_toolbar, "close", G_CALLBACK (find_toolbar_close_cb), window); gtk_box_pack_start (GTK_BOX (window->priv->main_vbox), @@ -2898,27 +2898,25 @@ ephy_window_set_print_preview (EphyWindow *window, accel_group = gtk_ui_manager_get_accel_group (window->priv->manager); - if (window->priv->ppv_mode == enabled) return; + if (priv->ppv_mode == enabled) return; - window->priv->ppv_mode = enabled; + priv->ppv_mode = enabled; sync_chromes_visibility (window); if (enabled) { - g_return_if_fail (window->priv->ppview_toolbar == NULL); + g_return_if_fail (priv->ppview_toolbar == NULL); - window->priv->ppview_toolbar = ppview_toolbar_new (window); + priv->ppview_toolbar = ppview_toolbar_new (window); gtk_window_remove_accel_group (GTK_WINDOW (window), accel_group); - - ephy_find_toolbar_close (priv->find_toolbar); } else { - g_return_if_fail (window->priv->ppview_toolbar != NULL); + g_return_if_fail (priv->ppview_toolbar != NULL); - g_object_unref (window->priv->ppview_toolbar); - window->priv->ppview_toolbar = NULL; + g_object_unref (priv->ppview_toolbar); + priv->ppview_toolbar = NULL; gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); } @@ -3402,3 +3400,19 @@ ephy_window_get_is_popup (EphyWindow *window) return window->priv->is_popup; } + +/** + * ephy_window_get_is_print_preview: + * @window: an #EphyWindow + * + * Returns whether this window is in print preview mode. + * + * Return value: %TRUE if it is in print preview mode + **/ +gboolean +ephy_window_get_is_print_preview (EphyWindow *window) +{ + g_return_val_if_fail (EPHY_IS_WINDOW (window), FALSE); + + return window->priv->ppv_mode; +} |