Apply Darren Salt's patch to implement Open Location/Ctrl-L in nsgtk

svn path=/trunk/netsurf/; revision=3200
This commit is contained in:
Rob Kendrick 2007-03-06 23:33:05 +00:00
parent 212b92f66e
commit a6ab365cbb
2 changed files with 12 additions and 1 deletions

View File

@ -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;

View File

@ -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>