Rev 5652 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5652 | Rev 5656 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | SOFTWARE CENTER v2.32 |
2 | SOFTWARE CENTER v2.32 |
3 | */ |
3 | */ |
Line 4... | Line 4... | ||
4 | 4 | ||
5 | #define MEMSIZE 0x5000 |
- | |
6 | #include "..\lib\kolibri.h" |
5 | #define MEMSIZE 0x5000 |
7 | #include "..\lib\strings.h" |
6 | #include "..\lib\strings.h" |
8 | #include "..\lib\mem.h" |
7 | #include "..\lib\mem.h" |
9 | #include "..\lib\file_system.h" |
- | |
10 | #include "..\lib\dll.h" |
8 | #include "..\lib\file_system.h" |
Line 11... | Line 9... | ||
11 | #include "..\lib\gui.h" |
9 | #include "..\lib\gui.h" |
12 | 10 | ||
13 | #include "..\lib\obj\libio_lib.h" |
11 | #include "..\lib\obj\libio_lib.h" |
Line 122... | Line 120... | ||
122 | icon_char_pos = strchr(key_value, ','); |
120 | icon_char_pos = strchr(key_value, ','); |
123 | if (icon_char_pos) ESBYTE[icon_char_pos] = 0; //delete icon from string |
121 | if (icon_char_pos) ESBYTE[icon_char_pos] = 0; //delete icon from string |
124 | RunProgram(key_value, ""); |
122 | RunProgram(key_value, ""); |
125 | } |
123 | } |
126 | current_item_id++; |
124 | current_item_id++; |
127 | if (strncmp(key_value, "/kolibrios/", 11)==0) && (!kolibrios_mounted) current_item_id--; |
125 | if (!strncmp(key_value, "/kolibrios/", 11)) && (!kolibrios_mounted) current_item_id--; |
128 | return 1; |
126 | return true; |
129 | } |
127 | } |
Line 130... | Line 128... | ||
130 | 128 | ||
131 | 129 | ||
Line 139... | Line 137... | ||
139 | row++; |
137 | row++; |
140 | col=0; |
138 | col=0; |
141 | } |
139 | } |
Line 142... | Line 140... | ||
142 | 140 | ||
143 | //do not show items located in /kolibrios/ if this directory not mounted |
141 | //do not show items located in /kolibrios/ if this directory not mounted |
Line 144... | Line 142... | ||
144 | if (strncmp(key_value, "/kolibrios/", 11)==0) && (!kolibrios_mounted) return 1; |
142 | if (!strncmp(key_value, "/kolibrios/", 11)) && (!kolibrios_mounted) return true; |
145 | 143 | ||
146 | if (col==0) DrawBar(0, row * cell_h + list_pos, Form.cwidth, cell_h, LIST_BACKGROUND_COLOR); |
144 | if (col==0) DrawBar(0, row * cell_h + list_pos, Form.cwidth, cell_h, LIST_BACKGROUND_COLOR); |
Line 152... | Line 150... | ||
152 | img_draw stdcall(skin.image, col*cell_w+tmp-10, row*cell_h+5 + list_pos, 32, 32, 0, icon_id*32); |
150 | img_draw stdcall(skin.image, col*cell_w+tmp-10, row*cell_h+5 + list_pos, 32, 32, 0, icon_id*32); |
153 | WriteTextCenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0xDCDCDC,key_name); |
151 | WriteTextCenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0xDCDCDC,key_name); |
154 | WriteTextCenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0x000000,key_name); |
152 | WriteTextCenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0x000000,key_name); |
155 | current_item_id++; |
153 | current_item_id++; |
156 | col++; |
154 | col++; |
157 | return 1; |
155 | return true; |
158 | } |
156 | } |
Line 159... | Line 157... | ||
159 | 157 | ||
160 | 158 | ||
161 | byte process_sections(dword sec_name, f_name) |
159 | byte process_sections(dword sec_name, f_name) |
Line 162... | Line 160... | ||
162 | { |
160 | { |
163 | if (strcmp(sec_name, "Config")==0) return 1; |
161 | if (!strcmp(sec_name, "Config")) return true; |
164 | 162 | ||
165 | if (item_id_need_to_run!=-1) |
163 | if (item_id_need_to_run!=-1) |
Line 181... | Line 179... | ||
181 | DrawBar(0, row * cell_h + list_pos, Form.cwidth , 20, LIST_BACKGROUND_COLOR); |
179 | DrawBar(0, row * cell_h + list_pos, Form.cwidth , 20, LIST_BACKGROUND_COLOR); |
182 | WriteTextB(10, row * cell_h + 9 + list_pos, 0x90, 0x000000, sec_name); |
180 | WriteTextB(10, row * cell_h + 9 + list_pos, 0x90, 0x000000, sec_name); |
183 | list_pos += 20; |
181 | list_pos += 20; |
184 | ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); |
182 | ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); |
185 | } |
183 | } |
186 | return 1; |
184 | return true; |
187 | } |
185 | } |
Line 188... | Line 186... | ||
188 | 186 | ||
189 | void draw_top_bar() |
187 | void draw_top_bar() |
190 | { |
188 | { |