fix bug 605957 'shortcuts in popup-menu'
[claws.git] / src / mainwindow.c
index 0b3f8b1787e45c596609f8747483c299c1b62b0e..ddedc9d3fc5dd4e75e61ca7eb4c5f85859494766 100644 (file)
@@ -973,6 +973,20 @@ MainWindow *main_window_create(SeparateType type)
        /* create actions menu */
        update_mainwin_actions_menu(ifactory, mainwin);
 
+       /* attach accel groups to main window */
+#define        ADD_MENU_ACCEL_GROUP_TO_WINDOW(menu,win)        \
+       gtk_window_add_accel_group                      \
+               (GTK_WINDOW(win),                       \
+                gtk_item_factory_from_widget(menu)->accel_group)                
+       
+       ADD_MENU_ACCEL_GROUP_TO_WINDOW(summaryview->popupmenu,mainwin->window);
+       
+       /* connect the accelerators for equivalent 
+          menu items in different menus             */
+       menu_connect_identical_items();
+
+
+       
        /* show main window */
        gtk_widget_set_uposition(mainwin->window,
                                 prefs_common.mainwin_x,