mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-12 13:59:20 +03:00
Select the text in the URL bar on Ctrl-A if the widget has the focus, rather
than the document text. Thanks to Paweł Blokus <pblokus@gmail.com> for the patch. svn path=/trunk/netsurf/; revision=6659
This commit is contained in:
parent
460460b493
commit
5b53bb6baa
@ -777,8 +777,13 @@ MENUHANDLER(select_all)
|
|||||||
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
|
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
|
||||||
struct browser_window *bw = nsgtk_get_browser_for_gui(gw->top_level);
|
struct browser_window *bw = nsgtk_get_browser_for_gui(gw->top_level);
|
||||||
|
|
||||||
LOG(("Selecting all text"));
|
if (GTK_WIDGET_HAS_FOCUS(gw->url_bar)) {
|
||||||
|
LOG(("Selecting all URL bar text"));
|
||||||
|
gtk_editable_select_region(GTK_EDITABLE(gw->url_bar), 0, -1);
|
||||||
|
} else {
|
||||||
|
LOG(("Selecting all document text"));
|
||||||
selection_select_all(bw->sel);
|
selection_select_all(bw->sel);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user