-static GtkItemFactoryEntry menu_items[] = {
- {"/Show",
- NULL, cb_menu_show, 0, "<Item>"},
- {"/Preferences",
- NULL, cb_menu_preferences, 0, "<Item>"},
- {"/Sensor Preferences",
- NULL, cb_sensor_preferences, 0, "<Item>"},
- {"/sep1",
- NULL, NULL, 0, "<Separator>"},
- {"/Quit",
- "", cb_menu_quit, 0, "<StockItem>", GTK_STOCK_QUIT},
+static const char *menu_desc =
+"<ui>"
+" <popup name='MainMenu'>"
+" <menuitem name='Show' action='ShowAction' />"
+" <menuitem name='Preferences' action='PreferencesAction' />"
+" <menuitem name='SensorPreferences' action='SensorPreferencesAction' />"
+" <separator />"
+" <menuitem name='Quit' action='QuitAction' />"
+" </popup>"
+"</ui>";
+
+static GtkActionEntry entries[] = {
+ { "PsensorMenuAction", NULL, "_Psensor" }, /* name, stock id, label */
+
+ { "ShowAction", NULL, /* name, stock id */
+ "_Show", NULL, /* label, accelerator */
+ "Show", /* tooltip */
+ G_CALLBACK(cb_menu_show) },
+
+ { "PreferencesAction", GTK_STOCK_PREFERENCES, /* name, stock id */
+ "_Preferences", NULL, /* label, accelerator */
+ "Preferences", /* tooltip */
+ G_CALLBACK(cb_menu_preferences) },
+
+ { "SensorPreferencesAction", GTK_STOCK_PREFERENCES,
+ "S_ensor Preferences",
+ NULL,
+ "SensorPreferences",
+ G_CALLBACK(cb_sensor_preferences) },
+
+ { "QuitAction",
+ GTK_STOCK_QUIT, "_Quit", NULL, "Quit", G_CALLBACK(cb_menu_quit) }