mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-10 19:44:43 +03:00
GTK changes for core search update (r12646).
svn path=/trunk/netsurf/; revision=12647
This commit is contained in:
parent
63c07ee28d
commit
48917cbb82
@ -1297,8 +1297,8 @@ MULTIHANDLER(reload)
|
||||
return TRUE;
|
||||
|
||||
/* clear potential search effects */
|
||||
if (bw->search_context != NULL)
|
||||
search_destroy_context(bw->search_context);
|
||||
browser_window_search_destroy_context(bw);
|
||||
|
||||
nsgtk_search_set_forward_state(true, bw);
|
||||
nsgtk_search_set_back_state(true, bw);
|
||||
|
||||
@ -1316,8 +1316,8 @@ MULTIHANDLER(back)
|
||||
return TRUE;
|
||||
|
||||
/* clear potential search effects */
|
||||
if (bw->search_context != NULL)
|
||||
search_destroy_context(bw->search_context);
|
||||
browser_window_search_destroy_context(bw);
|
||||
|
||||
nsgtk_search_set_forward_state(true, bw);
|
||||
nsgtk_search_set_back_state(true, bw);
|
||||
|
||||
@ -1336,8 +1336,8 @@ MULTIHANDLER(forward)
|
||||
return TRUE;
|
||||
|
||||
/* clear potential search effects */
|
||||
if (bw->search_context != NULL)
|
||||
search_destroy_context(bw->search_context);
|
||||
browser_window_search_destroy_context(bw);
|
||||
|
||||
nsgtk_search_set_forward_state(true, bw);
|
||||
nsgtk_search_set_back_state(true, bw);
|
||||
|
||||
@ -2223,8 +2223,8 @@ void nsgtk_scaffolding_toggle_search_bar_visibility(nsgtk_scaffolding *g)
|
||||
gui_window_get_browser_window(g->top_level);
|
||||
g_object_get(G_OBJECT(g->search->bar), "visible", &vis, NULL);
|
||||
if (vis) {
|
||||
if ((bw != NULL) && (bw->search_context != NULL))
|
||||
search_destroy_context(bw->search_context);
|
||||
if (bw != NULL)
|
||||
browser_window_search_destroy_context(bw);
|
||||
nsgtk_search_set_forward_state(true, bw);
|
||||
nsgtk_search_set_back_state(true, bw);
|
||||
gtk_widget_hide(GTK_WIDGET(g->search->bar));
|
||||
@ -2251,8 +2251,7 @@ void nsgtk_scaffolding_set_top_level (struct gui_window *gw)
|
||||
nsgtk_window_update_back_forward(nsgtk_get_scaffold(gw));
|
||||
|
||||
/* clear effects of potential searches */
|
||||
if (bw->search_context != NULL)
|
||||
search_destroy_context(bw->search_context);
|
||||
browser_window_search_destroy_context(bw);
|
||||
|
||||
nsgtk_search_set_forward_state(true, bw);
|
||||
nsgtk_search_set_back_state(true, bw);
|
||||
|
22
gtk/search.c
22
gtk/search.c
@ -70,8 +70,9 @@ gboolean nsgtk_search_forward_button_clicked(GtkWidget *widget, gpointer data)
|
||||
(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
nsgtk_scaffolding_search(g)->checkAll)) ?
|
||||
SEARCH_FLAG_SHOWALL : 0);
|
||||
if (search_verify_new(bw, &nsgtk_search_callbacks, (void *)bw))
|
||||
search_step(bw->search_context, flags, gtk_entry_get_text(
|
||||
if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
|
||||
(void *)bw))
|
||||
browser_window_search_step(bw, flags, gtk_entry_get_text(
|
||||
nsgtk_scaffolding_search(g)->entry));
|
||||
return TRUE;
|
||||
}
|
||||
@ -91,8 +92,9 @@ gboolean nsgtk_search_back_button_clicked(GtkWidget *widget, gpointer data)
|
||||
(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
nsgtk_scaffolding_search(g)->checkAll)) ?
|
||||
SEARCH_FLAG_SHOWALL : 0);
|
||||
if (search_verify_new(bw, &nsgtk_search_callbacks, (void *)bw))
|
||||
search_step(bw->search_context, flags, gtk_entry_get_text(
|
||||
if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
|
||||
(void *)bw))
|
||||
browser_window_search_step(bw, flags, gtk_entry_get_text(
|
||||
nsgtk_scaffolding_search(g)->entry));
|
||||
return TRUE;
|
||||
}
|
||||
@ -131,8 +133,10 @@ gboolean nsgtk_search_entry_changed(GtkWidget *widget, gpointer data)
|
||||
nsgtk_scaffolding *g = (nsgtk_scaffolding *)data;
|
||||
struct browser_window *bw = gui_window_get_browser_window(
|
||||
nsgtk_scaffolding_top_level(g));
|
||||
if ((bw != NULL) && (bw->search_context != NULL))
|
||||
search_destroy_context(bw->search_context);
|
||||
|
||||
if (bw != NULL)
|
||||
browser_window_search_destroy_context(bw);
|
||||
|
||||
nsgtk_search_set_forward_state(true, (void *)bw);
|
||||
nsgtk_search_set_back_state(true, (void *)bw);
|
||||
return TRUE;
|
||||
@ -153,8 +157,10 @@ gboolean nsgtk_search_entry_activate(GtkWidget *widget, gpointer data)
|
||||
(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||
nsgtk_scaffolding_search(g)->checkAll)) ?
|
||||
SEARCH_FLAG_SHOWALL : 0);
|
||||
if (search_verify_new(bw, &nsgtk_search_callbacks, (void *)bw))
|
||||
search_step(bw->search_context, flags, gtk_entry_get_text(
|
||||
|
||||
if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
|
||||
(void *)bw))
|
||||
browser_window_search_step(bw, flags, gtk_entry_get_text(
|
||||
nsgtk_scaffolding_search(g)->entry));
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -194,8 +194,9 @@ void nsgtk_tab_page_changed(GtkNotebook *notebook, gpointer *page,
|
||||
struct browser_window *bw = gui_window_get_browser_window(gw);
|
||||
if (bw == NULL)
|
||||
return;
|
||||
if (bw->search_context != NULL)
|
||||
search_destroy_context(bw->search_context);
|
||||
|
||||
browser_window_search_destroy_context(bw);
|
||||
|
||||
nsgtk_search_set_forward_state(true, bw);
|
||||
nsgtk_search_set_back_state(true, bw);
|
||||
nsgtk_scaffolding_set_top_level(gw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user