- static const GtkActionEntry entries[] =
- {
- {
- "help", NULL, /* name, stock id */
- N_("_Help"), NULL, /* label, accelerator */
- NULL,
- NULL,
- },
-
- {
- "help_reference", "help-reference-manual", /* name, stock id */
- N_("_Reference Manual"), NULL, /* label, accelerator */
- NULL, /* tooltip */
- G_CALLBACK (reference_manual)
- },
-
- {
- "help_about", "help-about",
- NULL, NULL, NULL,
- G_CALLBACK (about_new)
- },
- };
-
- gtk_action_group_set_translation_domain (action_group, PACKAGE);
-
- gtk_ui_manager_add_ui_from_string (uim, "\
- <menubar name=\"menubar\">\
- <menu action=\"help\">\
- <menuitem action=\"help_reference\"/>\
- <menuitem action=\"help_about\"/>\
- </menu>\
- </menubar>\
- ", -1, 0);
-
- gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), NULL);
-
- gtk_ui_manager_insert_action_group (uim, action_group, 0);
+ gtk_widget_add_accelerator (help_ref,
+ "activate", accel_group,
+ GDK_KEY_F1, 0,
+ GTK_ACCEL_VISIBLE);
+
+ gtk_menu_attach (GTK_MENU (menu), help_ref, 0, 1, 0, 1);
+ gtk_menu_attach (GTK_MENU (menu), help_about, 0, 1, 1, 2);
+
+ g_signal_connect (help_about, "activate", G_CALLBACK (about_new), toplevel);
+ g_signal_connect (help_ref, "activate", G_CALLBACK (reference_manual), NULL);
+
+ g_object_set (menuitem, "submenu", menu, NULL);
+
+ gtk_widget_show_all (menuitem);
+
+ return menuitem;