Rev 7533 | Rev 7594 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7533 | Rev 7551 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | //11.03.12 - start! |
1 | //11.03.12 - start! |
2 | //ver 2.2 |
2 | //ver 2.21 |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | #ifndef AUTOBUILD |
4 | #ifndef AUTOBUILD |
5 | ?include "lang.h--" |
5 | ?include "lang.h--" |
Line 51... | Line 51... | ||
51 | WALLPAPERS, |
51 | WALLPAPERS, |
52 | BTN_SELECT_WALLP_FOLDER }; |
52 | BTN_SELECT_WALLP_FOLDER }; |
Line 53... | Line 53... | ||
53 | 53 | ||
54 | char folder_path[4096]; |
54 | char folder_path[4096]; |
- | 55 | char cur_file_path[4096]; |
|
55 | char cur_file_path[4096]; |
56 | char cur_skin_path[4096]; |
56 | char temp_filename[4096]; |
57 | char temp_filename[4096]; |
Line 57... | Line 58... | ||
57 | int files_mas[400]; |
58 | int files_mas[400]; |
Line 91... | Line 92... | ||
91 | o_dialog.type = 2; //select folder |
92 | o_dialog.type = 2; //select folder |
92 | OpenDialog_init stdcall (#o_dialog); |
93 | OpenDialog_init stdcall (#o_dialog); |
Line 93... | Line 94... | ||
93 | 94 | ||
Line 94... | Line 95... | ||
94 | EventTabClick(SKINS); |
95 | EventTabClick(SKINS); |
95 | 96 | ||
96 | SetEventMask(0x27); |
97 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
97 | loop() switch(WaitEvent()) |
98 | loop() switch(WaitEvent()) |
98 | { |
99 | { |
99 | case evMouse: |
100 | case evMouse: |
Line 113... | Line 114... | ||
113 | } |
114 | } |
114 | break; |
115 | break; |
Line 115... | Line 116... | ||
115 | 116 | ||
116 | case evButton: |
117 | case evButton: |
117 | id=GetButtonID(); |
118 | id=GetButtonID(); |
118 | if (id==1) ExitProcess(); |
119 | if (id==1) EventExit(); |
119 | if (id==SKINS) EventTabClick(SKINS); |
120 | if (id==SKINS) EventTabClick(SKINS); |
120 | if (id==WALLPAPERS) EventTabClick(WALLPAPERS); |
121 | if (id==WALLPAPERS) EventTabClick(WALLPAPERS); |
121 | if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder(); |
122 | if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder(); |
122 | checkbox1.click(id); |
123 | checkbox1.click(id); |
Line 354... | Line 355... | ||
354 | { |
355 | { |
355 | char kivpath[4096+10]; |
356 | char kivpath[4096+10]; |
356 | EventSetNewCurrent(); |
357 | EventSetNewCurrent(); |
357 | if (tabs.active_tab==SKINS) |
358 | if (tabs.active_tab==SKINS) |
358 | { |
359 | { |
- | 360 | draw_window(); |
|
359 | cur = select_list.cur_y; |
361 | cur = select_list.cur_y; |
360 | SetSystemSkin(#cur_file_path); |
362 | SetSystemSkin(#cur_file_path); |
361 | SaveSkinSettings(#cur_file_path); |
363 | strcpy(#cur_skin_path, #cur_file_path); |
362 | } |
364 | } |
363 | if (tabs.active_tab==WALLPAPERS) |
365 | if (tabs.active_tab==WALLPAPERS) |
364 | { |
366 | { |
- | 367 | SelectList_Draw(); |
|
365 | strcpy(#kivpath, "\\S__"); |
368 | strcpy(#kivpath, "\\S__"); |
366 | strcat(#kivpath, #cur_file_path); |
369 | strcat(#kivpath, #cur_file_path); |
367 | RunProgram("/sys/media/kiv", #kivpath); |
370 | RunProgram("/sys/media/kiv", #kivpath); |
368 | SelectList_Draw(); |
- | |
369 | } |
371 | } |
370 | } |
372 | } |
Line 371... | Line 373... | ||
371 | 373 | ||
372 | void EventOpenFile() |
374 | void EventOpenFile() |
373 | { |
375 | { |
374 | if (tabs.active_tab==SKINS) RunProgram("/sys/skincfg", #cur_file_path); |
376 | if (tabs.active_tab==SKINS) RunProgram("/sys/skincfg", #cur_file_path); |
375 | if (tabs.active_tab==WALLPAPERS) RunProgram("/sys/media/kiv", #cur_file_path); |
377 | if (tabs.active_tab==WALLPAPERS) RunProgram("/sys/media/kiv", #cur_file_path); |
Line -... | Line 378... | ||
- | 378 | } |
|
- | 379 | ||
- | 380 | void EventExit() |
|
- | 381 | { |
|
- | 382 | ExitProcess(); |
|
- | 383 | SaveSkinSettings(#cur_skin_path); |
|
376 | } |
384 | } |