comparison finch/libgnt/test/menu.c @ 15931:f00f2e283ffb

Some define changes. This helps in generating the python bindings.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 26 Mar 2007 04:10:39 +0000
parents 0e3a8505ebbe
children f104e1d45d85
comparison
equal deleted inserted replaced
15930:846a00760176 15931:f00f2e283ffb
20 gnt_init(); 20 gnt_init();
21 21
22 GntWidget *menu = gnt_menu_new(GNT_MENU_TOPLEVEL); 22 GntWidget *menu = gnt_menu_new(GNT_MENU_TOPLEVEL);
23 GObject *item = gnt_menuitem_new("File"); 23 GObject *item = gnt_menuitem_new("File");
24 24
25 gnt_menu_add_item(GNT_MENU(menu), GNT_MENUITEM(item)); 25 gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item));
26 26
27 item = gnt_menuitem_new("Edit"); 27 item = gnt_menuitem_new("Edit");
28 gnt_menu_add_item(GNT_MENU(menu), GNT_MENUITEM(item)); 28 gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item));
29 29
30 item = gnt_menuitem_new("Help"); 30 item = gnt_menuitem_new("Help");
31 gnt_menu_add_item(GNT_MENU(menu), GNT_MENUITEM(item)); 31 gnt_menu_add_item(GNT_MENU(menu), GNT_MENU_ITEM(item));
32 32
33 GntWidget *sub = gnt_menu_new(GNT_MENU_POPUP); 33 GntWidget *sub = gnt_menu_new(GNT_MENU_POPUP);
34 gnt_menuitem_set_submenu(GNT_MENUITEM(item), GNT_MENU(sub)); 34 gnt_menuitem_set_submenu(GNT_MENU_ITEM(item), GNT_MENU(sub));
35 35
36 item = gnt_menuitem_new("Online Help"); 36 item = gnt_menuitem_new("Online Help");
37 gnt_menu_add_item(GNT_MENU(sub), GNT_MENUITEM(item)); 37 gnt_menu_add_item(GNT_MENU(sub), GNT_MENU_ITEM(item));
38 38
39 item = gnt_menuitem_new("About"); 39 item = gnt_menuitem_new("About");
40 gnt_menu_add_item(GNT_MENU(sub), GNT_MENUITEM(item)); 40 gnt_menu_add_item(GNT_MENU(sub), GNT_MENU_ITEM(item));
41 41
42 sub = gnt_menu_new(GNT_MENU_POPUP); 42 sub = gnt_menu_new(GNT_MENU_POPUP);
43 gnt_menuitem_set_submenu(GNT_MENUITEM(item), GNT_MENU(sub)); 43 gnt_menuitem_set_submenu(GNT_MENU_ITEM(item), GNT_MENU(sub));
44 44
45 item = gnt_menuitem_new("Online Help"); 45 item = gnt_menuitem_new("Online Help");
46 gnt_menu_add_item(GNT_MENU(sub), GNT_MENUITEM(item)); 46 gnt_menu_add_item(GNT_MENU(sub), GNT_MENU_ITEM(item));
47 gnt_menuitem_set_callback(GNT_MENUITEM(item), dothis, NULL); 47 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), dothis, NULL);
48 48
49 gnt_screen_menu_show(menu); 49 gnt_screen_menu_show(menu);
50 50
51 GntWidget *win = gnt_window_new(); 51 GntWidget *win = gnt_window_new();
52 gnt_box_add_widget(GNT_BOX(win), 52 gnt_box_add_widget(GNT_BOX(win),