GtkWidget*
midori_panel_construct_menu_item (MidoriPanel* panel,
- MidoriViewable* viewable);
+ MidoriViewable* viewable,
+ gboolean popup);
static void
midori_browser_settings_notify (MidoriWebSettings* web_settings,
j = 0;
while ((widget = midori_panel_get_nth_page (panel, j++)))
{
- menuitem = midori_panel_construct_menu_item (panel, MIDORI_VIEWABLE (widget));
+ menuitem = midori_panel_construct_menu_item (panel, MIDORI_VIEWABLE (widget), FALSE);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
}
continue;
{ "BookmarksExport"},
{ NULL },
{ "Fullscreen" },
- { "Panel" },
+ { "p" },
{ "-" },
#endif
{ NULL },
g_signal_emit (browser, signals[POPULATE_TOOL_MENU], 0, menu);
continue;
}
+ else if (actions[i].name[0] == 'p')
+ {
+ MidoriPanel* panel;
+ gsize j;
+ GtkWidget* widget;
+
+ panel = MIDORI_PANEL (browser->panel);
+ j = 0;
+ while ((widget = midori_panel_get_nth_page (panel, j++)))
+ {
+ menuitem = midori_panel_construct_menu_item (panel, MIDORI_VIEWABLE (widget), TRUE);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ }
+ continue;
+ }
menuitem = sokoke_action_create_popup_menu_item (
_action_by_name (browser, actions[i].name));
}
/* Private function, used by MidoriBrowser */
/* static */ GtkWidget*
midori_panel_construct_menu_item (MidoriPanel* panel,
- MidoriViewable* viewable)
+ MidoriViewable* viewable,
+ gboolean popup)
{
GtkAction* action;
GtkWidget* menuitem;
action = g_object_get_data (G_OBJECT (viewable), "midori-panel-action");
- menuitem = gtk_action_create_menu_item (action);
+ menuitem = popup ? sokoke_action_create_popup_menu_item (action)
+ : gtk_action_create_menu_item (action);
g_object_set_data (G_OBJECT (menuitem), "page", viewable);
if (gtk_widget_get_visible (GTK_WIDGET (viewable)))