Add a New Tab menu item to the tab context menu
This commit is contained in:
parent
5dcdccb27c
commit
414f9412b8
1 changed files with 13 additions and 0 deletions
|
@ -2475,6 +2475,13 @@ midori_view_get_proxy_menu_item (MidoriView* view)
|
||||||
return view->menu_item;
|
return view->menu_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
midori_view_tab_label_menu_new_tab_cb (GtkWidget* menuitem,
|
||||||
|
MidoriView* view)
|
||||||
|
{
|
||||||
|
g_signal_emit (view, signals[NEW_TAB], 0, "", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
midori_view_tab_label_menu_open_cb (GtkWidget* menuitem,
|
midori_view_tab_label_menu_open_cb (GtkWidget* menuitem,
|
||||||
GtkWidget* view)
|
GtkWidget* view)
|
||||||
|
@ -2537,6 +2544,12 @@ midori_view_get_tab_menu (MidoriView* view)
|
||||||
g_return_val_if_fail (MIDORI_IS_VIEW (view), NULL);
|
g_return_val_if_fail (MIDORI_IS_VIEW (view), NULL);
|
||||||
|
|
||||||
menu = gtk_menu_new ();
|
menu = gtk_menu_new ();
|
||||||
|
menuitem = gtk_menu_item_new_with_mnemonic (_("New _Tab"));
|
||||||
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||||
|
g_signal_connect (menuitem, "activate",
|
||||||
|
G_CALLBACK (midori_view_tab_label_menu_new_tab_cb), view);
|
||||||
|
menuitem = gtk_separator_menu_item_new ();
|
||||||
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, NULL);
|
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, NULL);
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||||
g_signal_connect (menuitem, "activate",
|
g_signal_connect (menuitem, "activate",
|
||||||
|
|
Loading…
Reference in a new issue