aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-05-29 07:13:29 +0800
committerChristian Persch <chpe@src.gnome.org>2005-05-29 07:13:29 +0800
commit13f46b7e761523e0f53c34f5d51b50b051b4ad01 (patch)
tree61bedea2ce4ee3bdebc8c67bcde97538ce1dd1bd /src/ephy-window.c
parentd0cc3530df347aed28b20fb884321a42b1b1958d (diff)
downloadgsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.tar
gsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.tar.gz
gsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.tar.bz2
gsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.tar.lz
gsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.tar.xz
gsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.tar.zst
gsoc2013-epiphany-13f46b7e761523e0f53c34f5d51b50b051b4ad01.zip
Disable mozilla's typeaheadfind.
2005-05-29 Christian Persch <chpe@cvs.gnome.org> * data/default-prefs-common.js: * data/default-prefs-toolkit.js: Disable mozilla's typeaheadfind. * src/ephy-find-toolbar.c: (get_find), (send_focus_change), (tab_dom_key_press_cb), (entry_changed_cb), (entry_preedit_changed_cb), (entry_key_press_event_cb), (entry_activate_cb), (set_focus_cb), (ephy_find_toolbar_grab_focus), (ephy_find_toolbar_init), (ephy_find_toolbar_class_init), (ephy_find_toolbar_set_embed), (ephy_find_toolbar_find_previous), (ephy_find_toolbar_open), (ephy_find_toolbar_close): * src/ephy-find-toolbar.h: * src/ephy-window.c: (sync_tab_document_type), (ephy_window_init), (ephy_window_set_print_preview), (ephy_window_find): Forward key events from the embed to the find toolbar. That way we can typeaheadfind without losing focus.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e48c73704..645b5b9bf 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1156,7 +1156,7 @@ sync_tab_document_type (EphyTab *tab,
if (!can_find)
{
- gtk_widget_hide (GTK_WIDGET (priv->find_toolbar));
+ ephy_find_toolbar_close (priv->find_toolbar);
}
}
@@ -2715,7 +2715,7 @@ ephy_window_init (EphyWindow *window)
G_CALLBACK (find_toolbar_close_cb), window);
gtk_box_pack_start (GTK_BOX (window->priv->main_vbox),
GTK_WIDGET (priv->find_toolbar), FALSE, FALSE, 0);
- gtk_widget_show (GTK_WIDGET (priv->find_toolbar));
+ /* don't show the find toolbar here! */
window->priv->statusbar = ephy_statusbar_new ();
gtk_box_pack_end (GTK_BOX (window->priv->main_vbox),
@@ -2889,8 +2889,10 @@ ephy_window_new_with_chrome (EphyEmbedChrome chrome,
* Sets whether the window is in print preview mode.
**/
void
-ephy_window_set_print_preview (EphyWindow *window, gboolean enabled)
+ephy_window_set_print_preview (EphyWindow *window,
+ gboolean enabled)
{
+ EphyWindowPrivate *priv = window->priv;
GtkAccelGroup *accel_group;
accel_group = gtk_ui_manager_get_accel_group (window->priv->manager);
@@ -2907,6 +2909,8 @@ ephy_window_set_print_preview (EphyWindow *window, gboolean enabled)
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
{
@@ -3262,10 +3266,9 @@ void
ephy_window_find (EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
- GtkWidget *toolbar = GTK_WIDGET (priv->find_toolbar);
- gtk_widget_show (toolbar);
- gtk_widget_grab_focus (toolbar);
+ ephy_find_toolbar_open (priv->find_toolbar, FALSE);
+ gtk_widget_grab_focus (GTK_WIDGET (priv->find_toolbar));
}
/**