From f0d836444d0cf09a92bdcf3376e0090de97c3b16 Mon Sep 17 00:00:00 2001 From: Crispin Flowerday Date: Tue, 9 Aug 2005 19:14:52 +0000 Subject: When opening the find bar with Ctrl+F, search for the item, and select the 2005-08-09 Crispin Flowerday * src/ephy-find-toolbar.c (ephy_find_toolbar_open): When opening the find bar with Ctrl+F, search for the item, and select the text. --- src/ephy-find-toolbar.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c index 173deb095..2ae7d15ed 100644 --- a/src/ephy-find-toolbar.c +++ b/src/ephy-find-toolbar.c @@ -669,6 +669,10 @@ ephy_find_toolbar_open (EphyFindToolbar *toolbar, { gtk_entry_set_text (GTK_ENTRY (priv->entry), ""); } + else + { + gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1); + } gtk_widget_show (GTK_WIDGET (toolbar)); @@ -676,9 +680,15 @@ ephy_find_toolbar_open (EphyFindToolbar *toolbar, gtk_widget_grab_focus (GTK_WIDGET (priv->embed)); send_focus_change (priv->entry, TRUE); + + if (strlen(gtk_entry_get_text (GTK_ENTRY (priv->entry))) != 0) + { + entry_changed_cb (GTK_ENTRY (priv->entry), toolbar); + } #else gtk_widget_grab_focus (GTK_WIDGET (toolbar)); #endif + } void -- cgit v1.2.3