Show Manage Search Engines in the context menu of the address entry

This commit is contained in:
Christian Dywan 2009-12-12 21:55:37 +01:00
parent 15cba9c74b
commit ff2e042898

View file

@ -15,6 +15,7 @@
#include "gtkiconentry.h" #include "gtkiconentry.h"
#include "marshal.h" #include "marshal.h"
#include "sokoke.h" #include "sokoke.h"
#include "midori-browser.h"
#include <string.h> #include <string.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
@ -1073,6 +1074,23 @@ midori_location_action_entry_changed_cb (GtkComboBox* combo_box,
} }
} }
static void
midori_location_action_populate_popup_cb (GtkWidget* entry,
GtkMenuShell* menu,
MidoriLocationAction* location_action)
{
MidoriBrowser* browser = midori_browser_get_for_widget (entry);
GtkActionGroup* actions = midori_browser_get_action_group (browser);
GtkWidget* menuitem;
menuitem = gtk_separator_menu_item_new ();
gtk_widget_show (menuitem);
gtk_menu_shell_append (menu, menuitem);
menuitem = sokoke_action_create_popup_menu_item (
gtk_action_group_get_action (actions, "ManageSearchEngines"));
gtk_menu_shell_append (menu, menuitem);
}
static void static void
midori_location_action_connect_proxy (GtkAction* action, midori_location_action_connect_proxy (GtkAction* action,
GtkWidget* proxy) GtkWidget* proxy)
@ -1128,6 +1146,8 @@ midori_location_action_connect_proxy (GtkAction* action,
midori_location_action_focus_out_event_cb, action, midori_location_action_focus_out_event_cb, action,
"signal::icon-release", "signal::icon-release",
midori_location_action_icon_released_cb, action, midori_location_action_icon_released_cb, action,
"signal::populate-popup",
midori_location_action_populate_popup_cb, action,
NULL); NULL);
} }
} }