aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-05-30 20:56:52 +0800
committerChristian Persch <chpe@src.gnome.org>2005-05-30 20:56:52 +0800
commitb22ddd541aec144446ac24fe045ae6757fa0c0ed (patch)
treef3899b0c498e41eb169bc823ee90915f073fedfa /src
parent5aefdeff8343bb6b4cba2bc1f544683e84c73182 (diff)
downloadgsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.tar
gsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.tar.gz
gsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.tar.bz2
gsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.tar.lz
gsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.tar.xz
gsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.tar.zst
gsoc2013-epiphany-b22ddd541aec144446ac24fe045ae6757fa0c0ed.zip
Don't erase the search term when opening the find bar with Ctrl-F.
2005-05-30 Christian Persch <chpe@cvs.gnome.org> * src/ephy-find-toolbar.c: (tab_dom_key_press_cb), (ephy_find_toolbar_open): * src/ephy-find-toolbar.h: * src/ephy-window.c: (ephy_window_find): Don't erase the search term when opening the find bar with Ctrl-F.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-find-toolbar.c12
-rw-r--r--src/ephy-find-toolbar.h3
-rw-r--r--src/ephy-window.c2
3 files changed, 11 insertions, 6 deletions
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index cad443aec..6de388c91 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -182,13 +182,13 @@ tab_dom_key_press_cb (EphyEmbed *embed,
{
if (event_key->keyval == GDK_slash)
{
- ephy_find_toolbar_open (toolbar, FALSE);
+ ephy_find_toolbar_open (toolbar, FALSE, TRUE);
gdk_event_free (event);
return TRUE;
}
else if (event_key->keyval == GDK_apostrophe)
{
- ephy_find_toolbar_open (toolbar, TRUE);
+ ephy_find_toolbar_open (toolbar, TRUE, TRUE);
gdk_event_free (event);
return TRUE;
}
@@ -641,7 +641,8 @@ ephy_find_toolbar_find_previous (EphyFindToolbar *toolbar)
void
ephy_find_toolbar_open (EphyFindToolbar *toolbar,
- gboolean links_only)
+ gboolean links_only,
+ gboolean clear_search)
{
EphyFindToolbarPrivate *priv = toolbar->priv;
@@ -650,7 +651,10 @@ ephy_find_toolbar_open (EphyFindToolbar *toolbar,
priv->links_only = links_only;
priv->explicit_focus = FALSE;
- gtk_entry_set_text (GTK_ENTRY (priv->entry), "");
+ if (clear_search)
+ {
+ gtk_entry_set_text (GTK_ENTRY (priv->entry), "");
+ }
gtk_widget_show (GTK_WIDGET (toolbar));
ephy_embed_activate (priv->embed);
diff --git a/src/ephy-find-toolbar.h b/src/ephy-find-toolbar.h
index 6bc4bf800..10d11859e 100644
--- a/src/ephy-find-toolbar.h
+++ b/src/ephy-find-toolbar.h
@@ -71,7 +71,8 @@ void ephy_find_toolbar_find_next (EphyFindToolbar *toolbar);
void ephy_find_toolbar_find_previous (EphyFindToolbar *toolbar);
void ephy_find_toolbar_open (EphyFindToolbar *toolbar,
- gboolean links_only);
+ gboolean links_only,
+ gboolean clear_search);
void ephy_find_toolbar_close (EphyFindToolbar *toolbar);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 8bf8ca2a9..6b11fd299 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3266,7 +3266,7 @@ ephy_window_find (EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
- ephy_find_toolbar_open (priv->find_toolbar, FALSE);
+ ephy_find_toolbar_open (priv->find_toolbar, FALSE, FALSE);
gtk_widget_grab_focus (GTK_WIDGET (priv->find_toolbar));
}