Rev 7594 | Rev 7612 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7594 | Rev 7611 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | ?define WINDOW_HEADER " áâனª¨ ®ä®à¬«¥¨ï" |
29 | ?define WINDOW_HEADER " áâனª¨ ®ä®à¬«¥¨ï" |
30 | ?define T_SKINS "â¨«ì ®ª®" |
30 | ?define T_SKINS "â¨«ì ®ª®" |
31 | ?define T_WALLPAPERS "¡®¨" |
31 | ?define T_WALLPAPERS "¡®¨" |
32 | ?define T_SELECT_FOLDER "ë¡à âì ¯ ¯ªã" |
32 | ?define T_SELECT_FOLDER "ë¡à âì ¯ ¯ªã" |
33 | ?define MENU_LIST "âªàëâì ä ©« Enter\n¤ «¨âì ä ©« Del" |
33 | ?define MENU_LIST "âªàëâì ä ©« Enter\n¤ «¨âì ä ©« Del" |
- | 34 | ?define T_PICTURE_MODE " ®«®¦¥¨¥ ª à⨪¨ " |
|
- | 35 | ?define T_CHECKBOX_STRETCH " áâïãâì" |
|
- | 36 | ?define T_CHECKBOX_TILED " ¬®áâ¨âì" |
|
34 | #else |
37 | #else |
35 | ?define WINDOW_HEADER "Appearance" |
38 | ?define WINDOW_HEADER "Appearance" |
36 | ?define T_SKINS "Skins" |
39 | ?define T_SKINS "Skins" |
37 | ?define T_WALLPAPERS "Wallpapers" |
40 | ?define T_WALLPAPERS "Wallpapers" |
38 | ?define T_SELECT_FOLDER "Select wallpapers" |
41 | ?define T_SELECT_FOLDER "Select folder" |
39 | ?define MENU_LIST "Open file Enter\nDelete file Del" |
42 | ?define MENU_LIST "Open file Enter\nDelete file Del" |
- | 43 | ?define T_PICTURE_MODE " Picture Mode " |
|
- | 44 | ?define T_CHECKBOX_STRETCH "Stretch" |
|
- | 45 | ?define T_CHECKBOX_TILED "Tiled" |
|
40 | #endif |
46 | #endif |
Line 41... | Line 47... | ||
41 | 47 | ||
42 | #define PANEL_H 40 |
48 | #define PANEL_H 40 |
43 | #define LP 10 //LIST_PADDING |
49 | #define LP 10 //LIST_PADDING |
Line 73... | Line 79... | ||
73 | 0x10000000,sizeof(st_str)-2,#st_str,0, 0b}; |
79 | 0x10000000,sizeof(st_str)-2,#st_str,0, 0b}; |
Line 74... | Line 80... | ||
74 | 80 | ||
75 | char default_dir[] = "/rd/1"; |
81 | char default_dir[] = "/rd/1"; |
Line -... | Line 82... | ||
- | 82 | od_filter filter2 = { 8, "TXT\0\0" }; |
|
- | 83 | ||
- | 84 | checkbox optionbox_stretch = { T_CHECKBOX_STRETCH, true }; |
|
76 | od_filter filter2 = { 8, "TXT\0\0" }; |
85 | checkbox optionbox_tiled = { T_CHECKBOX_TILED, false }; |
77 | 86 | ||
78 | //===================================================// |
87 | //===================================================// |
79 | // // |
88 | // // |
80 | // CODE // |
89 | // CODE // |
Line 130... | Line 139... | ||
130 | if (id==SKINS) EventTabClick(SKINS); |
139 | if (id==SKINS) EventTabClick(SKINS); |
131 | if (id==WALLPAPERS) EventTabClick(WALLPAPERS); |
140 | if (id==WALLPAPERS) EventTabClick(WALLPAPERS); |
132 | if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder(); |
141 | if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder(); |
133 | checkbox1.click(id); |
142 | checkbox1.click(id); |
134 | spinbox1.click(id); |
143 | spinbox1.click(id); |
- | 144 | if (!optionbox_stretch.checked) && (optionbox_stretch.click(id)) EventSetWallpMode_Stretch(); |
|
- | 145 | if (!optionbox_tiled.checked) && (optionbox_tiled.click(id)) EventSetWallpMode_Tiled(); |
|
135 | break; |
146 | break; |
Line 136... | Line 147... | ||
136 | 147 | ||
137 | case evKey: |
148 | case evKey: |
138 | GetKeys(); |
149 | GetKeys(); |
Line 187... | Line 198... | ||
187 | { |
198 | { |
188 | int id; |
199 | int id; |
189 | incn y; |
200 | incn y; |
190 | int list_w; |
201 | int list_w; |
Line 191... | Line 202... | ||
191 | 202 | ||
Line 192... | Line 203... | ||
192 | if (tabs.active_tab == SKINS) list_w=250; else list_w=370; |
203 | if (tabs.active_tab == SKINS) list_w=250; else list_w=350; |
Line 193... | Line 204... | ||
193 | 204 | ||
194 | DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work); |
205 | DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work); |
Line 235... | Line 246... | ||
235 | DrawStandartCaptButton(skp.x+20, skp.y+skp.h-40, GetFreeButtonId(), "Button1"); |
246 | DrawStandartCaptButton(skp.x+20, skp.y+skp.h-40, GetFreeButtonId(), "Button1"); |
236 | DrawStandartCaptButton(skp.x+120, skp.y+skp.h-40, GetFreeButtonId(), "Button2"); |
247 | DrawStandartCaptButton(skp.x+120, skp.y+skp.h-40, GetFreeButtonId(), "Button2"); |
237 | } |
248 | } |
238 | if (tabs.active_tab == WALLPAPERS) |
249 | if (tabs.active_tab == WALLPAPERS) |
239 | { |
250 | { |
- | 251 | skp.x -= TAB_PADDING + 3; |
|
240 | DrawStandartCaptButton(select_list.x + select_list.w + scroll1.size_x + 17, |
252 | DrawStandartCaptButton(skp.x, select_list.y, BTN_SELECT_WALLP_FOLDER, T_SELECT_FOLDER); |
- | 253 | DrawBar(skp.x, select_list.y+50, 180, 80, system.color.work); |
|
241 | select_list.y, BTN_SELECT_WALLP_FOLDER, T_SELECT_FOLDER); |
254 | DrawFrame(skp.x, select_list.y+50, 180, 80, T_PICTURE_MODE); |
- | 255 | optionbox_stretch.draw(skp.x+14, select_list.y+70); |
|
- | 256 | optionbox_tiled.draw(skp.x+14, select_list.y+97); |
|
242 | } |
257 | } |
243 | } |
258 | } |
Line 244... | Line 259... | ||
244 | 259 | ||
245 | :void DrawStEditBoxPos(dword x,y, edit_box_pointer) |
260 | :void DrawStEditBoxPos(dword x,y, edit_box_pointer) |
Line 359... | Line 374... | ||
359 | strcpy(#wallp_folder_path, #opendir_path); |
374 | strcpy(#wallp_folder_path, #opendir_path); |
360 | EventTabClick(WALLPAPERS); |
375 | EventTabClick(WALLPAPERS); |
361 | } |
376 | } |
362 | } |
377 | } |
Line -... | Line 378... | ||
- | 378 | ||
- | 379 | void EventSetWallpMode_Stretch() |
|
- | 380 | { |
|
- | 381 | optionbox_tiled.checked = false; |
|
- | 382 | optionbox_tiled.redraw(); |
|
- | 383 | EventApply(); |
|
- | 384 | } |
|
- | 385 | ||
- | 386 | void EventSetWallpMode_Tiled() |
|
- | 387 | { |
|
- | 388 | optionbox_stretch.checked = false; |
|
- | 389 | optionbox_stretch.redraw(); |
|
- | 390 | EventApply(); |
|
- | 391 | } |
|
363 | 392 | ||
364 | void EventApply() |
393 | void EventApply() |
365 | { |
394 | { |
366 | char kivpath[4096+10]; |
395 | char kivpath[4096+10]; |
367 | EventSetNewCurrent(); |
396 | EventSetNewCurrent(); |
Line 373... | Line 402... | ||
373 | strcpy(#cur_skin_path, #cur_file_path); |
402 | strcpy(#cur_skin_path, #cur_file_path); |
374 | } |
403 | } |
375 | if (tabs.active_tab==WALLPAPERS) |
404 | if (tabs.active_tab==WALLPAPERS) |
376 | { |
405 | { |
377 | SelectList_Draw(); |
406 | SelectList_Draw(); |
- | 407 | if (optionbox_stretch.checked) strcpy(#kivpath, "\\S__"); |
|
378 | strcpy(#kivpath, "\\S__"); |
408 | if (optionbox_tiled.checked) strcpy(#kivpath, "\\T__"); |
379 | strcat(#kivpath, #cur_file_path); |
409 | strcat(#kivpath, #cur_file_path); |
380 | RunProgram("/sys/media/kiv", #kivpath); |
410 | RunProgram("/sys/media/kiv", #kivpath); |
381 | } |
411 | } |
382 | } |
412 | } |