[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][TOP]
動的なメニューアイテムの追加
こんにちは。
以下(抜粋)のようにして作成したメニューに、プログラム中で動的に
アイテムを追加するにはどうするとよいんでしょうか。
http://developer.gnome.org/doc/API/libgnomeui/gnomeui-gnome-app-helper.html
とか見ていたんですが、どうもわかりませんです。
/* ... */
static GnomeUIInfo debug_menu [] = {
GNOMEUIINFO_ITEM_STOCK(N_("Debug"), N_("Debug"), debug_func,
GNOME_STOCK_MENU_PREF),
GNOMEUIINFO_END
};
static GnomeUIInfo menu [] = {
GNOMEUIINFO_SUBTREE(debug_menu),
GNOMEUIINFO_END
};
int main(int ac, char **av) {
/* ... */
gnome_app_create_menus_with_data(GNOME_APP(app), menu, app);
/* ... */
}
--
Takuo KITAME / kitame@xxxxxxxxxxxx
- It was a dark and stormy night... -