[Xfce4-commits] <midori:master> Deprecate redundant midori_findbar_find
Christian Dywan
noreply at xfce.org
Sat Mar 31 05:50:02 CEST 2012
Updating branch refs/heads/master
to b8380232894669a10e19acb10b3dce7c626e9ae5 (commit)
from 79942f24aa1337afafa0359b3d7ef2daa14f7268 (commit)
commit b8380232894669a10e19acb10b3dce7c626e9ae5
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Mar 31 03:36:00 2012 +0200
Deprecate redundant midori_findbar_find
midori/midori-browser.c | 4 ++--
toolbars/midori-findbar.c | 23 +++++++++++++++++------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 5061ec0..cb8c04d 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2752,14 +2752,14 @@ static void
_action_find_next_activate (GtkAction* action,
MidoriBrowser* browser)
{
- midori_findbar_find (MIDORI_FINDBAR (browser->find), TRUE);
+ midori_findbar_find_text (MIDORI_FINDBAR (browser->find), NULL, TRUE);
}
static void
_action_find_previous_activate (GtkAction* action,
MidoriBrowser* browser)
{
- midori_findbar_find (MIDORI_FINDBAR (browser->find), FALSE);
+ midori_findbar_find_text (MIDORI_FINDBAR (browser->find), NULL, FALSE);
}
static void
diff --git a/toolbars/midori-findbar.c b/toolbars/midori-findbar.c
index 6ef47f2..cbee17b 100644
--- a/toolbars/midori-findbar.c
+++ b/toolbars/midori-findbar.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008-2010 Christian Dywan <christian at twotoasts.de>
+ Copyright (C) 2008-2012 Christian Dywan <christian at twotoasts.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -97,7 +97,7 @@ midori_findbar_find_key_press_event_cb (MidoriFindbar* findbar,
else if (event->keyval == GDK_KEY_Return
&& (event->state & GDK_SHIFT_MASK))
{
- midori_findbar_find (findbar, FALSE);
+ midori_findbar_find_text (findbar, NULL, FALSE);
return TRUE;
}
@@ -141,6 +141,9 @@ midori_findbar_find_text (MidoriFindbar* findbar,
if (!(view = midori_browser_get_current_tab (browser)))
return;
+ if (text == NULL)
+ text = gtk_entry_get_text (GTK_ENTRY (findbar->find_text));
+
case_sensitive = midori_findbar_case_sensitive (findbar);
midori_view_search_text (MIDORI_VIEW (view), text, case_sensitive, forward);
}
@@ -161,12 +164,20 @@ midori_findbar_get_text (MidoriFindbar* findbar)
return gtk_entry_get_text (GTK_ENTRY (findbar->find_text));
}
+/**
+ * midori_findbar_find:
+ * @findbar: #MidoriFindbar
+ * @forward: %TRUE to search forward
+ *
+ * Advance to the next match.
+ *
+ * Deprecated: 0.4.5: Use midori_findbar_find_text() instead.
+ **/
void
midori_findbar_find (MidoriFindbar* findbar,
gboolean forward)
{
- const gchar* text = gtk_entry_get_text (GTK_ENTRY (findbar->find_text));
- midori_findbar_find_text (findbar, text, forward);
+ midori_findbar_find_text (findbar, NULL, forward);
}
void
@@ -195,14 +206,14 @@ static void
midori_findbar_next_activate_cb (GtkWidget* entry,
MidoriFindbar* findbar)
{
- midori_findbar_find (findbar, TRUE);
+ midori_findbar_find_text (findbar, NULL, TRUE);
}
static void
midori_findbar_previous_clicked_cb (GtkWidget* entry,
MidoriFindbar* findbar)
{
- midori_findbar_find (findbar, FALSE);
+ midori_findbar_find_text (findbar, NULL, FALSE);
}
static void
More information about the Xfce4-commits
mailing list