Rev 7630 | Rev 7806 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7630 | Rev 7636 | ||
---|---|---|---|
Line 71... | Line 71... | ||
71 | 71 | ||
72 | more_less_box tbPanelHeight = { NULL, 6, 99, PANEL_HEIGHT }; |
72 | more_less_box tbPanelHeight = { NULL, 6, 99, PANEL_HEIGHT }; |
73 | more_less_box tbSoftenHeight = { NULL, 0, 99, SOFTEN_HEIGHT }; |
73 | more_less_box tbSoftenHeight = { NULL, 0, 99, SOFTEN_HEIGHT }; |
Line -... | Line 74... | ||
- | 74 | more_less_box tbButtonOffset = { NULL, 0, 99, BUTTON_OFFSET }; |
|
- | 75 | ||
- | 76 | checkbox taskbar_on = 0; |
|
74 | more_less_box tbButtonOffset = { NULL, 0, 99, BUTTON_OFFSET }; |
77 | checkbox docky_on = 0; |
75 | 78 | ||
76 | int tbAttachment; |
79 | int tbAttachment; |
77 | checkbox tbSoftenUp = { SOFTEN_UP }; |
80 | checkbox tbSoftenUp = { SOFTEN_UP }; |
78 | checkbox tbClock = { CLOCK }; |
81 | checkbox tbClock = { CLOCK }; |
Line 102... | Line 105... | ||
102 | loop() switch(WaitEvent()) |
105 | loop() switch(WaitEvent()) |
103 | { |
106 | { |
104 | case evButton: |
107 | case evButton: |
105 | id=GetButtonID(); |
108 | id=GetButtonID(); |
106 | if (1==id) ExitProcess(); |
109 | if (1==id) ExitProcess(); |
107 | //taskbar buttons |
- | |
108 | if (BTN_TB_ATTACHEMENT == id) { |
- | |
109 | tbAttachment ^= 1; |
- | |
110 | DrawWindowContent(); |
- | |
111 | SaveSettingsAndRestartProcess(TASKBAR); |
- | |
112 | } |
- | |
Line 113... | Line 110... | ||
113 | 110 | ||
114 | if (tbSoftenUp.click(id)) || (tbSoftenDown.click(id)) |
- | |
115 | || (tbMinLeftButton.click(id)) || (tbMinRightButton.click(id)) |
111 | if (taskbar_on.checked) EventTaskbarProcessButton(id); |
116 | || (tbRunApplButton.click(id)) || (tbClnDeskButton.click(id)) { |
- | |
117 | SaveSettingsAndRestartProcess(TASKBAR); |
- | |
Line -... | Line 112... | ||
- | 112 | if (docky_on.checked) EventDockyProcessButton(id); |
|
118 | } |
113 | |
- | 114 | if (taskbar_on.click(id)) { |
|
- | 115 | IF (taskbar_on.checked == true) RunProgram("/sys/@taskbar", 0); |
|
- | 116 | ELSE KillProcessByName("@TASKBAR", SINGLE); |
|
- | 117 | EAX = taskbar_on.checked ^ 1; |
|
- | 118 | tbSoftenUp.disabled = EAX; |
|
- | 119 | tbSoftenDown.disabled = EAX; |
|
- | 120 | tbMinLeftButton.disabled = EAX; |
|
- | 121 | tbMinRightButton.disabled = EAX; |
|
- | 122 | tbRunApplButton.disabled = EAX; |
|
- | 123 | tbClnDeskButton.disabled = EAX; |
|
119 | 124 | tbClock.disabled = EAX; |
|
- | 125 | tbCpuUsage.disabled = EAX; |
|
120 | if (tbClock.click(id)) || (tbCpuUsage.click(id)) |
126 | tbChangeLang.disabled = EAX; |
- | 127 | tbMenuButton.disabled = EAX; |
|
121 | || (tbChangeLang.click(id)) || (tbMenuButton.click(id)) |
128 | tbPanelHeight.disabled = EAX; |
122 | || (tbPanelHeight.click(id)) || (tbSoftenHeight.click(id)) |
129 | tbSoftenHeight.disabled = EAX; |
- | 130 | tbButtonOffset.disabled = EAX; |
|
123 | || (tbButtonOffset.click(id)) { |
131 | tbButtonOffset.disabled = EAX; |
124 | SaveSettingsAndRestartProcess(TASKBAR); |
132 | DrawWindowContent(); |
- | 133 | } |
|
125 | } |
134 | if (docky_on.click(id)) { |
126 | //docky buttons |
135 | IF (docky_on.checked == true) RunProgram("/sys/@docky", 0); |
127 | if (id==200) { |
136 | ELSE KillProcessByName("@DOCKY", SINGLE); |
128 | dkLocation++; |
137 | dkFsize.disabled = docky_on.checked ^ 1; |
129 | if (dkLocation>3) dkLocation=1; |
- | |
130 | DrawWindowContent(); |
138 | dkAshow.disabled = docky_on.checked ^ 1; |
131 | SaveSettingsAndRestartProcess(DOCKY); |
- | |
132 | } |
- | |
133 | if (dkFsize.click(id)) SaveSettingsAndRestartProcess(DOCKY); |
139 | DrawWindowContent(); |
Line 134... | Line 140... | ||
134 | if (dkAshow.click(id)) SaveSettingsAndRestartProcess(DOCKY); |
140 | } |
135 | break; |
141 | break; |
136 | 142 | ||
Line 162... | Line 168... | ||
162 | 168 | ||
163 | frame_y = 15; |
169 | frame_y = 15; |
164 | y.n = frame_y; |
170 | y.n = frame_y; |
165 | DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0); |
171 | DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0); |
166 | DrawPanelsImage(y.n, tbAttachment); |
172 | DrawPanelsImage(y.n, tbAttachment); |
167 | WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS); |
173 | WriteTextWithBg(68, y.inc(7), 0xD0, system.color.work_text, CHANGE_POS, system.color.work); |
168 | tbSoftenUp.draw(22, y.inc(35)); |
174 | tbSoftenUp.draw(22, y.inc(35)); |
169 | tbClock.draw(win_center_x, y.n); |
175 | tbClock.draw(win_center_x, y.n); |
170 | tbSoftenDown.draw(22, y.inc(24)); |
176 | tbSoftenDown.draw(22, y.inc(24)); |
171 | tbCpuUsage.draw(win_center_x, y.n); |
177 | tbCpuUsage.draw(win_center_x, y.n); |
Line 175... | Line 181... | ||
175 | tbMenuButton.draw(win_center_x, y.n); |
181 | tbMenuButton.draw(win_center_x, y.n); |
176 | tbPanelHeight.draw(22, y.inc(28)); |
182 | tbPanelHeight.draw(22, y.inc(28)); |
177 | tbSoftenHeight.draw(22, y.inc(32)); |
183 | tbSoftenHeight.draw(22, y.inc(32)); |
178 | tbButtonOffset.draw(22, y.inc(32)); |
184 | tbButtonOffset.draw(22, y.inc(32)); |
179 | DrawFrame(PD, frame_y, Form.cwidth-PD-PD, y.inc(32)-frame_y, TASK_FRAME_T); |
185 | DrawFrame(PD, frame_y, Form.cwidth-PD-PD, y.inc(32)-frame_y, TASK_FRAME_T); |
- | 186 | taskbar_on.draw(22, frame_y-7); |
|
180 | //DOCKY |
187 | //DOCKY |
181 | frame_y = calc(y.inc(20)); |
188 | frame_y = calc(y.inc(20)); |
182 | DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0); |
189 | DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0); |
183 | DrawPanelsImage(y.n, dkLocation+1); |
190 | DrawPanelsImage(y.n, dkLocation+1); |
184 | WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS); |
191 | WriteTextWithBg(68, y.inc(7), 0xD0, system.color.work_text, CHANGE_POS, system.color.work); |
185 | dkFsize.draw(22, y.inc(35)); |
192 | dkFsize.draw(22, y.inc(35)); |
186 | dkAshow.draw(win_center_x, y.n); |
193 | dkAshow.draw(win_center_x, y.n); |
187 | DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T); |
194 | DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T); |
- | 195 | docky_on.draw(22, frame_y-7); |
|
188 | } |
196 | } |
Line 189... | Line 197... | ||
189 | 197 | ||
190 | void LoadCfg() |
198 | void LoadCfg() |
191 | { |
199 | { |
Line 204... | Line 212... | ||
204 | tbButtonOffset.value = taskbar_vars_ini.GetInt("ButtonBotOffset", 3); |
212 | tbButtonOffset.value = taskbar_vars_ini.GetInt("ButtonBotOffset", 3); |
Line 205... | Line 213... | ||
205 | 213 | ||
206 | dkLocation = docky_ini.GetInt("location", 0); |
214 | dkLocation = docky_ini.GetInt("location", 0); |
207 | dkFsize.checked = docky_ini.GetInt("fsize", 0); |
215 | dkFsize.checked = docky_ini.GetInt("fsize", 0); |
- | 216 | dkAshow.checked = docky_ini.GetInt("ashow", 0); |
|
- | 217 | ||
- | 218 | taskbar_on.checked = CheckProcessExists("@TASKBAR"); |
|
208 | dkAshow.checked = docky_ini.GetInt("ashow", 0); |
219 | docky_on.checked = CheckProcessExists("@DOCKY"); |
Line 209... | Line 220... | ||
209 | } |
220 | } |
210 | 221 | ||
211 | void SaveSettingsAndRestartProcess(byte panel_type) |
222 | void SaveSettingsAndRestartProcess(byte panel_type) |
Line 250... | Line 261... | ||
250 | } |
261 | } |
251 | GetProcessInfo(#Form, SelfInfo); |
262 | GetProcessInfo(#Form, SelfInfo); |
252 | ActivateWindow(GetProcessSlot(Form.ID)); |
263 | ActivateWindow(GetProcessSlot(Form.ID)); |
253 | } |
264 | } |
Line -... | Line 265... | ||
- | 265 | ||
- | 266 | void EventTaskbarProcessButton(dword id) |
|
- | 267 | { |
|
- | 268 | if (BTN_TB_ATTACHEMENT == id) { |
|
- | 269 | tbAttachment ^= 1; |
|
- | 270 | DrawWindowContent(); |
|
- | 271 | SaveSettingsAndRestartProcess(TASKBAR); |
|
- | 272 | } |
|
- | 273 | if (tbSoftenUp.click(id)) || (tbSoftenDown.click(id)) |
|
- | 274 | || (tbMinLeftButton.click(id)) || (tbMinRightButton.click(id)) |
|
- | 275 | || (tbRunApplButton.click(id)) || (tbClnDeskButton.click(id)) { |
|
- | 276 | SaveSettingsAndRestartProcess(TASKBAR); |
|
- | 277 | } |
|
- | 278 | if (tbClock.click(id)) || (tbCpuUsage.click(id)) |
|
- | 279 | || (tbChangeLang.click(id)) || (tbMenuButton.click(id)) |
|
- | 280 | || (tbPanelHeight.click(id)) || (tbSoftenHeight.click(id)) |
|
- | 281 | || (tbButtonOffset.click(id)) { |
|
- | 282 | SaveSettingsAndRestartProcess(TASKBAR); |
|
- | 283 | } |
|
- | 284 | } |
|
- | 285 | ||
- | 286 | void EventDockyProcessButton(dword id) |
|
- | 287 | { |
|
- | 288 | if (BTN_DOCKY_ATTACHEMENT == id) { |
|
- | 289 | dkLocation++; |
|
- | 290 | if (dkLocation>3) dkLocation=1; |
|
- | 291 | DrawWindowContent(); |
|
- | 292 | SaveSettingsAndRestartProcess(DOCKY); |
|
- | 293 | } |
|
- | 294 | if (dkFsize.click(id)) || (dkAshow.click(id)) { |
|
- | 295 | SaveSettingsAndRestartProcess(DOCKY); |
|
- | 296 | } |
|
Line 254... | Line 297... | ||
254 | 297 | } |
|
255 | 298 |