application/menu.c

changeset 4
d8e8f34e65ee
parent 3
c04433993fbb
equal deleted inserted replaced
3:c04433993fbb 4:d8e8f34e65ee
38 static UiInteger *tb_singleview; 38 static UiInteger *tb_singleview;
39 static UiInteger *tb_dualview; 39 static UiInteger *tb_dualview;
40 40
41 static void create_main_menu(void) { 41 static void create_main_menu(void) {
42 ui_menu("File"); 42 ui_menu("File");
43 ui_menuitem_st(UI_STOCK_NEW, NULL, NULL);
43 ui_menuitem_st(UI_STOCK_OPEN, NULL, NULL); 44 ui_menuitem_st(UI_STOCK_OPEN, NULL, NULL);
44 45
45 ui_menu("Edit"); 46 ui_menu("Edit");
46 ui_menuitem_st(UI_STOCK_UNDO, NULL, NULL); 47 ui_menuitem_st(UI_STOCK_UNDO, NULL, NULL);
47 ui_menuitem_st(UI_STOCK_REDO, NULL, NULL); 48 ui_menuitem_st(UI_STOCK_REDO, NULL, NULL);
59 60
60 ui_toolitem_toggle("show-sidebar", "Sidebar", NULL, tb_sidebar); 61 ui_toolitem_toggle("show-sidebar", "Sidebar", NULL, tb_sidebar);
61 ui_toolitem_toggle("singleview", "S", NULL, tb_singleview); 62 ui_toolitem_toggle("singleview", "S", NULL, tb_singleview);
62 ui_toolitem_toggle("dualview", "D", NULL, tb_dualview); 63 ui_toolitem_toggle("dualview", "D", NULL, tb_dualview);
63 64
65 ui_toolitem_st("new-note", UI_STOCK_NEW, NULL, NULL);
66
64 tb_sidebar->value = 1; 67 tb_sidebar->value = 1;
65 tb_singleview->value = 0; 68 tb_singleview->value = 0;
66 tb_dualview->value = 1; 69 tb_dualview->value = 1;
67 70
68 ui_toolbar_add_default("show-sidebar"); 71 ui_toolbar_add_default("show-sidebar");
69 ui_toolbar_add_default("@separator"); 72 ui_toolbar_add_default("@separator");
70 ui_toolbar_add_default("singleview"); 73 ui_toolbar_add_default("singleview");
71 ui_toolbar_add_default("dualview"); 74 ui_toolbar_add_default("dualview");
72 ui_toolbar_add_default("@separator"); 75 ui_toolbar_add_default("@separator");
76 ui_toolbar_add_default("new-note");
73 } 77 }
74 78
75 void menu_init(void) { 79 void menu_init(void) {
76 create_main_menu(); 80 create_main_menu();
77 create_main_toolbar(); 81 create_main_toolbar();

mercurial