Rev 9481 | Rev 9516 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9481 | Rev 9489 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | // // |
25 | // // |
26 | //===================================================// |
26 | //===================================================// |
Line 27... | Line 27... | ||
27 | 27 | ||
Line 28... | Line -... | ||
28 | int active_skin, active_wallpaper, active_screensaver; |
- | |
29 | - | ||
30 | enum { |
- | |
31 | BASE_TAB_BUTTON_ID=3, |
- | |
32 | BTN_SELECT_WALLP_FOLDER=10, |
- | |
33 | BTN_TEST_SCREENSAVER }; |
28 | int active_skin, active_wallpaper, active_screensaver; |
34 | 29 | ||
35 | char folder_path[4096]; |
30 | char folder_path[4096]; |
36 | char cur_file_path[4096]; |
31 | char cur_file_path[4096]; |
37 | char cur_skin_path[4096]; |
32 | char cur_skin_path[4096]; |
Line 97... | Line 92... | ||
97 | if (optionbox_tiled.click(id)) EventSetWallpMode(0,1,0); |
92 | if (optionbox_tiled.click(id)) EventSetWallpMode(0,1,0); |
98 | if (optionbox_auto.click(id)) EventSetWallpMode(0,0,1); |
93 | if (optionbox_auto.click(id)) EventSetWallpMode(0,0,1); |
99 | } |
94 | } |
100 | if (tabs.active_tab == TAB_SCREENSAVERS) { |
95 | if (tabs.active_tab == TAB_SCREENSAVERS) { |
101 | if (id==BTN_TEST_SCREENSAVER) EventOpenFile(); |
96 | if (id==BTN_TEST_SCREENSAVER) EventOpenFile(); |
- | 97 | if (id==BTN_SET_SCREENSAVER) EventSetSs(); |
|
102 | } |
98 | } |
103 | break; |
99 | break; |
Line 104... | Line 100... | ||
104 | 100 | ||
105 | case evKey: |
101 | case evKey: |
Line 183... | Line 179... | ||
183 | optionbox_auto.draw(RIGHTx+14, PANEL_H+79); |
179 | optionbox_auto.draw(RIGHTx+14, PANEL_H+79); |
184 | DrawStandartCaptButton(RIGHTx, PANEL_H+130, BTN_SELECT_WALLP_FOLDER, T_SELECT_FOLDER); |
180 | DrawStandartCaptButton(RIGHTx, PANEL_H+130, BTN_SELECT_WALLP_FOLDER, T_SELECT_FOLDER); |
185 | } |
181 | } |
186 | if (tabs.active_tab == TAB_SCREENSAVERS) |
182 | if (tabs.active_tab == TAB_SCREENSAVERS) |
187 | { |
183 | { |
- | 184 | miniprintf(#param, T_SS_TIMEOUT, screensaver_timeout); |
|
- | 185 | WriteTextWithBg(RIGHTx, PANEL_H, 0xD0, sc.work_text, #param, sc.work); |
|
188 | DrawStandartCaptButton(RIGHTx, PANEL_H, BTN_TEST_SCREENSAVER, T_SS_PREVIEW); |
186 | ESI = DrawStandartCaptButton(RIGHTx, PANEL_H + 25, BTN_TEST_SCREENSAVER, T_SS_PREVIEW); |
- | 187 | DrawStandartCaptButton(RIGHTx+ESI, PANEL_H + 25, BTN_SET_SCREENSAVER, T_SS_SET); |
|
189 | } |
188 | } |
190 | } |
189 | } |
Line 191... | Line 190... | ||
191 | 190 | ||
192 | bool strreqi(dword _left, _right) |
191 | bool strreqi(dword _left, _right) |
Line 429... | Line 428... | ||
429 | } |
428 | } |
Line 430... | Line 429... | ||
430 | 429 | ||
431 | void EventUpdateDocky() |
430 | void EventUpdateDocky() |
432 | { |
431 | { |
433 | if (!update_docky.checked) return; |
432 | if (!update_docky.checked) return; |
434 | KillProcessByName("@docky", MULTIPLE); |
433 | // KillProcessByName("@docky", MULTIPLE); |
- | 434 | // RunProgram("/sys/@docky",NULL); |
|
435 | RunProgram("/sys/@docky",NULL); |
435 | RestartProcessByName("/sys/@docky", MULTIPLE); |
436 | pause(50); |
436 | pause(50); |
437 | ActivateWindow_Self(); |
437 | ActivateWindow_Self(); |
Line 438... | Line 438... | ||
438 | } |
438 | } |
Line 453... | Line 453... | ||
453 | ini.SetString("skin", #cur_skin_path, strlen(#cur_skin_path)); |
453 | ini.SetString("skin", #cur_skin_path, strlen(#cur_skin_path)); |
454 | } |
454 | } |
455 | ExitProcess(); |
455 | ExitProcess(); |
456 | } |
456 | } |
Line -... | Line 457... | ||
- | 457 | ||
- | 458 | void EventSetSs() |
|
- | 459 | { |
|
- | 460 | dword cur_ss = list.get(select_list.cur_y); |
|
- | 461 | ini.section = "screensaver"; |
|
- | 462 | ini.SetString("program", cur_ss, strlen(cur_ss)); |
|
- | 463 | RestartProcessByName("/sys/@ss", MULTIPLE); |
|
- | 464 | } |
|
457 | 465 |