Create "/Menus" in mainwindow's UI manager in mainwindow.c, not in summaryview.c.
authorAndrej Kacian <ticho@claws-mail.org>
Sat, 1 Dec 2018 09:32:00 +0000 (10:32 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Sat, 1 Dec 2018 09:32:00 +0000 (10:32 +0100)
src/mainwindow.c
src/summaryview.c

index e12732e..53e81f1 100644 (file)
@@ -1884,6 +1884,10 @@ MainWindow *main_window_create()
                gtk_widget_hide(menubar);
        gtk_window_add_accel_group(GTK_WINDOW(window), gtk_ui_manager_get_accel_group(mainwin->ui_manager));
 
+       /* Create a menu container for the different popup menus we
+        * will be adding from other UI elements. */
+       MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/", "Menus", "Menus", GTK_UI_MANAGER_MENUBAR)
+
        gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
 
        if (prefs_common.toolbar_detachable) {
index 38c1c1e..93d85f1 100644 (file)
@@ -695,7 +695,6 @@ SummaryView *summary_create(MainWindow *mainwin)
        summaryview->action_group = cm_menu_create_action_group_full(summaryview->ui_manager,"Menu", summary_popup_entries,
                        G_N_ELEMENTS(summary_popup_entries), (gpointer)summaryview);
 
-       MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/", "Menus", "Menus", GTK_UI_MANAGER_MENUBAR)
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus", "SummaryViewPopup", "SummaryViewPopup", GTK_UI_MANAGER_MENU)
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "Reply", "SummaryViewPopup/Reply", GTK_UI_MANAGER_MENUITEM)
 #ifndef GENERIC_UMPC