GtkWidget* find_text;
GtkToolItem* find_case;
GtkToolItem* find_highlight;
+ gboolean find_typing;
GtkWidget* statusbar;
GtkWidget* progressbar;
{
gint position = -1;
+ browser->find_typing = TRUE;
gtk_widget_show (browser->find);
gtk_window_set_focus (GTK_WINDOW (browser), browser->find_text);
gtk_editable_insert_text (GTK_EDITABLE (browser->find_text), typing, -1, &position);
gtk_editable_set_position (GTK_EDITABLE (browser->find_text), -1);
+ gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (
+ browser->find_highlight), TRUE);
}
if (GTK_WIDGET_VISIBLE (browser->find))
{
_midori_browser_find (browser, TRUE);
}
+static void
+midori_browser_find_text_changed (GtkWidget* entry,
+ MidoriBrowser* browser)
+{
+ if (browser->find_typing)
+ _midori_browser_find (browser, TRUE);
+}
+
static void
_action_find_previous_activate (GtkAction* action,
MidoriBrowser* browser)
GtkWidget* view = midori_browser_get_current_tab (browser);
midori_view_unmark_text_matches (MIDORI_VIEW (view));
gtk_widget_hide (toolbar);
+ browser->find_typing = FALSE;
return TRUE;
}
MidoriBrowser* browser)
{
gtk_widget_hide (browser->find);
+ browser->find_typing = FALSE;
}
static void
G_CALLBACK (midori_browser_entry_clear_icon_released_cb), NULL);
g_signal_connect (browser->find_text, "activate",
G_CALLBACK (_action_find_next_activate), browser);
+ g_signal_connect (browser->find_text, "changed",
+ G_CALLBACK (midori_browser_find_text_changed), browser);
toolitem = gtk_tool_item_new ();
gtk_container_add (GTK_CONTAINER (toolitem), browser->find_text);
gtk_tool_item_set_expand (GTK_TOOL_ITEM (toolitem), TRUE);