Rev 9524 | Rev 9533 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9524 | Rev 9530 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | // // |
26 | // // |
27 | //===================================================// |
27 | //===================================================// |
Line 28... | Line 28... | ||
28 | 28 | ||
Line 29... | Line -... | ||
29 | int active_skin=-1, active_wallpaper=-1, active_screensaver=-1; |
- | |
30 | - | ||
31 | checkbox update_docky = { T_UPDATE_DOCK, false }; |
29 | int active_skin=-1, active_wallpaper=-1, active_screensaver=-1; |
32 | 30 | ||
33 | checkbox optionbox_stretch = { T_CHECKBOX_STRETCH, false }; |
31 | checkbox optionbox_stretch = { T_CHECKBOX_STRETCH, false }; |
Line 34... | Line 32... | ||
34 | checkbox optionbox_tiled = { T_CHECKBOX_TILED, false }; |
32 | checkbox optionbox_tiled = { T_CHECKBOX_TILED, false }; |
Line 79... | Line 77... | ||
79 | if (id==1) EventExit(); |
77 | if (id==1) EventExit(); |
80 | tabs.click(id); |
78 | tabs.click(id); |
81 | if (tabs.active_tab == TAB_SKINS) { |
79 | if (tabs.active_tab == TAB_SKINS) { |
82 | checkbox1.click(id); |
80 | checkbox1.click(id); |
83 | spinbox1.click(id); |
81 | spinbox1.click(id); |
84 | if (update_docky.click(id)) EventUpdateDocky(); |
- | |
85 | } |
82 | } |
86 | if (tabs.active_tab == TAB_WALLPAPERS) { |
83 | if (tabs.active_tab == TAB_WALLPAPERS) { |
87 | if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder(); |
84 | if (id==BTN_SELECT_WALLP_FOLDER) EventSelectWallpFolder(); |
88 | if (optionbox_stretch.click(id)) EventSetWallpMode(1,0,0); |
85 | if (optionbox_stretch.click(id)) EventSetWallpMode(1,0,0); |
89 | if (optionbox_tiled.click(id)) EventSetWallpMode(0,1,0); |
86 | if (optionbox_tiled.click(id)) EventSetWallpMode(0,1,0); |
Line 125... | Line 122... | ||
125 | } |
122 | } |
Line 126... | Line 123... | ||
126 | 123 | ||
127 | void draw_window() |
124 | void draw_window() |
128 | { |
125 | { |
129 | sc.get(); |
126 | sc.get(); |
- | 127 | DefineAndDrawWindow(screen.width-WIN_W-9/2,80,WIN_W+9,WIN_H+4+skin_height,0x74,sc.work,WINDOW_HEADER,0); |
|
- | 128 | ||
- | 129 | DrawBar(0, 0, WIN_W, PANEL_H-2, sc.work); //top |
|
- | 130 | DrawBar(0, PANEL_H-2, LP-2, WIN_H-PANEL_H-LP+4, EDX); //left |
|
- | 131 | DrawBar(LIST_W+LP+20, PANEL_H-2, WIN_W-LIST_W-26, WIN_H-PANEL_H-LP+4, EDX); //right |
|
Line 130... | Line 132... | ||
130 | DefineAndDrawWindow(screen.width-WIN_W-9/2,80,WIN_W+9,WIN_H+4+skin_height,0x34,sc.work,WINDOW_HEADER,0); |
132 | DrawBar(0, WIN_H-LP+2, WIN_W, LP-2, EDX); //bottom |
131 | 133 | ||
132 | tabs.draw(); |
134 | tabs.draw(); |
133 | draw_icon_16w(tabs.x + TAB_P, LP+5, 17); |
135 | draw_icon_16w(tabs.x + TAB_P, LP+5, 17); |
Line 134... | Line -... | ||
134 | draw_icon_16w(sizeof(t_skins)-1*8 + TAB_P + TAB_P + tabs.x, LP+5, 6); |
- | |
135 | draw_icon_16w(sizeof(t_wallpapers)+sizeof(t_skins)-2*8 + TAB_P + TAB_P + TAB_P + tabs.x, LP+5, 61); |
- | |
136 | - | ||
137 | $push select_list.cur_y |
- | |
138 | SelectList_Init( |
- | |
139 | LP, |
- | |
140 | PANEL_H, |
- | |
141 | LIST_W, |
- | |
142 | WIN_H - LP - PANEL_H |
- | |
143 | ); |
- | |
144 | $pop select_list.cur_y |
- | |
145 | - | ||
146 | DrawBar(RIGHTx, PANEL_H, RIGHTw, WIN_H-PANEL_H-LP, sc.work); |
- | |
147 | - | ||
148 | SelectList_Draw(); |
136 | draw_icon_16w(sizeof(t_skins)-1*8 + TAB_P + TAB_P + tabs.x, LP+5, 6); |
149 | SelectList_DrawBorder(); |
137 | draw_icon_16w(sizeof(t_wallpapers)+sizeof(t_skins)-2*8 + TAB_P + TAB_P + TAB_P + tabs.x, LP+5, 61); |
150 | 138 | ||
151 | if (tabs.active_tab == TAB_SKINS) |
139 | if (tabs.active_tab == TAB_SKINS) |
152 | { |
- | |
153 | DrawFrame(RIGHTx, PANEL_H+5, RIGHTw, RIGHTh, T_UI_PREVIEW); |
140 | { |
154 | DrawUiElementsPreview(RIGHTx+20, PANEL_H+5, RIGHTh); |
141 | DrawFrame(RIGHTx, PANEL_H+5, RIGHTw, RIGHTh, T_UI_PREVIEW); |
155 | if (CheckProcessExists("@DOCKY")) update_docky.draw(RIGHTx, PANEL_H+250); |
142 | DrawUiElementsPreview(RIGHTx+20, PANEL_H+5, RIGHTh); |
156 | } |
143 | } |
157 | if (tabs.active_tab == TAB_WALLPAPERS) |
144 | if (tabs.active_tab == TAB_WALLPAPERS) |
Line 170... | Line 157... | ||
170 | scrollbar_h_draw stdcall (#ss_timeout); |
157 | scrollbar_h_draw stdcall (#ss_timeout); |
171 | DrawRectangle(RIGHTx, RIGHTy+25, RIGHTw-20, 15, sc.work_graph); |
158 | DrawRectangle(RIGHTx, RIGHTy+25, RIGHTw-20, 15, sc.work_graph); |
172 | ESI = DrawStandartCaptButton(RIGHTx, PANEL_H + 65, BTN_TEST_SCREENSAVER, T_SS_PREVIEW); |
159 | ESI = DrawStandartCaptButton(RIGHTx, PANEL_H + 65, BTN_TEST_SCREENSAVER, T_SS_PREVIEW); |
173 | DrawStandartCaptButton(RIGHTx+ESI, PANEL_H + 65, BTN_SET_SCREENSAVER, T_SS_SET); |
160 | DrawStandartCaptButton(RIGHTx+ESI, PANEL_H + 65, BTN_SET_SCREENSAVER, T_SS_SET); |
174 | } |
161 | } |
- | 162 | ||
- | 163 | $push select_list.cur_y |
|
- | 164 | SelectList_Init( |
|
- | 165 | LP, |
|
- | 166 | PANEL_H, |
|
- | 167 | LIST_W, |
|
- | 168 | WIN_H - LP - PANEL_H |
|
- | 169 | ); |
|
- | 170 | $pop select_list.cur_y |
|
- | 171 | ||
- | 172 | SelectList_Draw(); |
|
- | 173 | SelectList_DrawBorder(); |
|
175 | } |
174 | } |
Line 176... | Line 175... | ||
176 | 175 | ||
177 | void draw_timeout() |
176 | void draw_timeout() |
178 | { |
177 | { |
Line 397... | Line 396... | ||
397 | char kivparam[4096+10]; |
396 | char kivparam[4096+10]; |
398 | dword file_name = list.get(select_list.cur_y); |
397 | dword file_name = list.get(select_list.cur_y); |
399 | strcpy(#cur_file_path, list.get(select_list.cur_y)); |
398 | strcpy(#cur_file_path, list.get(select_list.cur_y)); |
400 | if (tabs.active_tab==TAB_SKINS) |
399 | if (tabs.active_tab==TAB_SKINS) |
401 | { |
400 | { |
402 | SetSystemSkin(#cur_file_path); |
- | |
403 | SelectList_Draw(); |
- | |
404 | strcpy(#cur_skin_path, #cur_file_path); |
401 | strcpy(#cur_skin_path, #cur_file_path); |
405 | EventUpdateDocky(); |
402 | SetSystemSkin(#cur_file_path); |
- | 403 | MoveSize(OLD, OLD, OLD, WIN_H+4+GetSkinHeight()); |
|
406 | } |
404 | } |
407 | if (tabs.active_tab==TAB_WALLPAPERS) |
405 | if (tabs.active_tab==TAB_WALLPAPERS) |
408 | { |
406 | { |
409 | SelectList_Draw(); |
407 | SelectList_Draw(); |
410 | miniprintf(#kivparam, "\\S__%s", #cur_file_path); |
408 | miniprintf(#kivparam, "\\S__%s", #cur_file_path); |
Line 421... | Line 419... | ||
421 | { |
419 | { |
422 | SelectList_Draw(); |
420 | SelectList_Draw(); |
423 | } |
421 | } |
424 | } |
422 | } |
Line 425... | Line -... | ||
425 | - | ||
426 | void EventUpdateDocky() |
- | |
427 | { |
- | |
428 | if (update_docky.checked) { |
- | |
429 | RestartProcessByName("/sys/@docky", MULTIPLE); |
- | |
430 | pause(50); |
- | |
431 | ActivateWindow_Self(); |
- | |
432 | } |
- | |
433 | } |
- | |
434 | 423 | ||
435 | void EventOpenFile() |
424 | void EventOpenFile() |
436 | { |
425 | { |
437 | switch (tabs.active_tab) { |
426 | switch (tabs.active_tab) { |
438 | case TAB_SKINS: RunProgram("/sys/skincfg", #cur_file_path); break; |
427 | case TAB_SKINS: RunProgram("/sys/skincfg", #cur_file_path); break; |