{
g_return_if_fail (MIDORI_IS_VIEW (view));
+ #if GTK_CHECK_VERSION (3, 2, 0)
+ if (gtk_widget_get_visible (view->overlay_find))
+ {
+ text = midori_findbar_get_text (MIDORI_FINDBAR (view->overlay_find));
+ webkit_web_view_search_text (WEBKIT_WEB_VIEW (view->web_view),
+ text, case_sensitive, forward, TRUE);
+ return;
+ }
+ #endif
g_signal_emit (view, signals[SEARCH_TEXT], 0,
webkit_web_view_search_text (WEBKIT_WEB_VIEW (view->web_view),
text, case_sensitive, forward, TRUE), NULL);
midori_view_search_text (MIDORI_VIEW (view), text, case_sensitive, forward);
}
+/**
+ * midori_findbar_get_text:
+ * @findbar: #MidoriFindbar
+ *
+ * Returns: the text typed in the entry
+ *
+ * Since: 0.4.5
+ **/
+const gchar*
+midori_findbar_get_text (MidoriFindbar* findbar)
+{
+ g_return_val_if_fail (MIDORI_IS_FINDBAR (findbar), NULL);
+
+ return gtk_entry_get_text (GTK_ENTRY (findbar->find_text));
+}
+
void
midori_findbar_find (MidoriFindbar* findbar,
gboolean forward)
/*
- Copyright (C) 2010 Christian Dywan <christian@twotoasts.de>
+ Copyright (C) 2012 Christian Dywan <christian@twotoasts.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
const gchar* text,
gboolean forward);
+const gchar*
+midori_findbar_get_text (MidoriFindbar* findbar);
+
void
midori_findbar_set_can_find (MidoriFindbar* findbar,
gboolean can_find);