-static GtkItemFactoryEntry menu_items[] = {
- {"/Psensor", NULL, NULL, 0, "<Branch>"},
- {"/Psensor/Preferences",
- NULL, cb_menu_preferences, 0, "<Item>"},
- {"/Psensor/sep1",
- NULL, NULL, 0, "<Separator>"},
- {"/Psensor/Quit",
- "", cb_menu_quit, 0, "<StockItem>", GTK_STOCK_QUIT},
+static const char *menu_desc =
+"<ui>"
+" <menubar name='MainMenu'>"
+" <menu name='Psensor' action='PsensorMenuAction'>"
+" <menuitem name='Preferences' action='PreferencesAction' />"
+" <separator />"
+" <menuitem name='Quit' action='QuitAction' />"
+" </menu>"
+" </menubar>"
+"</ui>";
+
+static GtkActionEntry entries[] = {
+ { "PsensorMenuAction", NULL, "_Psensor" }, /* name, stock id, label */
+
+ { "PreferencesAction", GTK_STOCK_PREFERENCES, /* name, stock id */
+ "_Preferences", NULL, /* label, accelerator */
+ "Preferences", /* tooltip */
+ G_CALLBACK(cb_menu_preferences) },
+
+ { "QuitAction",
+ GTK_STOCK_QUIT, "_Quit", NULL, "Quit", G_CALLBACK(cb_menu_quit) }