mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
Apply Darren Salt's patch to implement Open Location/Ctrl-L in nsgtk
svn path=/trunk/netsurf/; revision=3200
This commit is contained in:
parent
212b92f66e
commit
a6ab365cbb
@ -104,6 +104,7 @@ static void nsgtk_attach_menu_handlers(GladeXML *, gpointer);
|
||||
/* prototypes for menu handlers */
|
||||
/* file menu */
|
||||
MENUPROTO(new_window);
|
||||
MENUPROTO(open_location);
|
||||
MENUPROTO(close_window);
|
||||
MENUPROTO(quit);
|
||||
|
||||
@ -135,6 +136,7 @@ MENUPROTO(about);
|
||||
static struct menu_events menu_events[] = {
|
||||
/* file menu */
|
||||
MENUEVENT(new_window),
|
||||
MENUEVENT(open_location),
|
||||
MENUEVENT(close_window),
|
||||
MENUEVENT(quit),
|
||||
|
||||
@ -343,6 +345,15 @@ MENUHANDLER(new_window)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(open_location)
|
||||
{
|
||||
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
|
||||
|
||||
gtk_widget_grab_focus(gw->url_bar);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(close_window)
|
||||
{
|
||||
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
|
||||
|
@ -64,7 +64,7 @@
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="open_location">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="tooltip" translatable="yes">Open an address into this browser window.</property>
|
||||
<property name="label" translatable="yes">Open _location...</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
Loading…
Reference in New Issue
Block a user