Rev 7049 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7049 | Rev 7051 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | 57 | ||
58 | frame taskbar_frame = { 0, NULL, 10, NULL, 16, NULL, 0xFFFfff, 1, TASK_FRAME_T, 0, 1, 12, 0x000111, 0xCCCccc }; |
58 | frame taskbar_frame = { 0, NULL, 10, NULL, 16, NULL, 0xFFFfff, 1, TASK_FRAME_T, 0, 1, 12, 0x000111, 0xCCCccc }; |
Line 59... | Line 59... | ||
59 | frame docky_frame = { 0, NULL, 10, NULL, NULL, NULL, 0xFFFfff, 1, DOCK_FRAME_T, 0, 1, 12, 0x000111, 0xCCCccc }; |
59 | frame docky_frame = { 0, NULL, 10, NULL, NULL, NULL, 0xFFFfff, 1, DOCK_FRAME_T, 0, 1, 12, 0x000111, 0xCCCccc }; |
60 | 60 | ||
61 | char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; |
61 | char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; |
- | 62 | _ini taskbar_flags_ini = { #taskbar_ini_path, "Flags" }; |
|
62 | char taskbar_c_flags[] = "Flags"; |
63 | _ini taskbar_vars_ini = { #taskbar_ini_path, "Variables" }; |
Line 63... | Line 64... | ||
63 | char taskbar_c_variables[] = "Variables"; |
64 | |
64 | char docky_ini_path[] = "/sys/settings/docky.ini"; |
65 | _ini docky_ini = { "/sys/settings/docky.ini", "@" }; |
Line 65... | Line 66... | ||
65 | 66 | ||
Line 141... | Line 142... | ||
141 | if (key==27) ExitProcess(); |
142 | if (key==27) ExitProcess(); |
142 | break; |
143 | break; |
Line 143... | Line 144... | ||
143 | 144 | ||
144 | case evReDraw: |
145 | case evReDraw: |
145 | system.color.get(); |
146 | system.color.get(); |
146 | DefineAndDrawWindow(130, 150, 465, 398+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE,0); |
147 | DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, system.color.work, WINDOW_TITLE, 0); |
147 | GetProcessInfo(#Form, SelfInfo); |
148 | GetProcessInfo(#Form, SelfInfo); |
148 | if (Form.status_window>2) break; |
149 | if (Form.status_window>2) break; |
149 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
150 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
150 | taskbar_frame.font_color = docky_frame.font_color = system.color.work_text; |
151 | taskbar_frame.font_color = docky_frame.font_color = system.color.work_text; |
Line 196... | Line 197... | ||
196 | } |
197 | } |
197 | } |
198 | } |
Line 198... | Line 199... | ||
198 | 199 | ||
199 | void LoadCfg() |
200 | void LoadCfg() |
200 | { |
201 | { |
201 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1); tbAttachment = EAX; |
202 | tbAttachment = taskbar_flags_ini.GetInt("Attachment", 1); |
202 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1); tbSoftenUp = EAX; |
203 | tbSoftenUp = taskbar_flags_ini.GetInt("SoftenUp", 1); |
203 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1); tbSoftenDown = EAX; |
204 | tbSoftenDown = taskbar_flags_ini.GetInt("SoftenDown", 1); |
204 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1); tbMinLeftButton = EAX; |
205 | tbMinLeftButton = taskbar_flags_ini.GetInt("MinLeftButton", 1); |
205 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); tbMinRightButton = EAX; |
206 | tbMinRightButton = taskbar_flags_ini.GetInt("MinRightButton", 1); |
206 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1); tbClock = EAX; |
207 | tbClock = taskbar_flags_ini.GetInt("Clock", 1); |
207 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1); tbCpuUsage = EAX; |
208 | tbCpuUsage = taskbar_flags_ini.GetInt("CpuUsage", 1); |
208 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1); tbChangeLang = EAX; |
209 | tbChangeLang = taskbar_flags_ini.GetInt("ChangeLang", 1); |
209 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1); tbMenuButton = EAX; |
210 | tbMenuButton = taskbar_flags_ini.GetInt("MenuButton", 1); |
210 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18); tbPanelHeight = EAX; |
211 | tbPanelHeight = taskbar_vars_ini.GetInt("PanelHeight", 18); |
211 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4); tbSoftenHeight = EAX; |
212 | tbSoftenHeight = taskbar_vars_ini.GetInt("SoftenHeight", 4); |
212 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); tbButtonOffset = EAX; |
213 | tbButtonOffset = taskbar_vars_ini.GetInt("ButtonTopOffset", 3); |
213 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); tbButtonOffset = EAX; |
214 | tbButtonOffset = taskbar_vars_ini.GetInt("ButtonBotOffset", 3); |
214 | 215 | ||
215 | ini_get_int stdcall (#docky_ini_path, "@", "location", 0); dkLocation = EAX; |
216 | dkLocation = docky_ini.GetInt("location", 0); |
216 | ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); dkFsize = EAX; |
217 | dkFsize = docky_ini.GetInt("fsize", 0); |
217 | ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); dkAshow = EAX; |
218 | dkAshow = docky_ini.GetInt("ashow", 0); |
Line 218... | Line 219... | ||
218 | } |
219 | } |
219 | 220 | ||
220 | void SaveCfg(byte panel_type) |
221 | void SaveCfg(byte panel_type) |
221 | { |
222 | { |
222 | if (panel_type==TASKBAR) { |
223 | if (panel_type==TASKBAR) { |
223 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment); |
224 | taskbar_flags_ini.SetInt("Attachment", tbAttachment); |
224 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", tbSoftenUp); |
225 | taskbar_flags_ini.SetInt("SoftenUp", tbSoftenUp); |
225 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", tbSoftenDown); |
226 | taskbar_flags_ini.SetInt("SoftenDown", tbSoftenDown); |
226 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", tbMinLeftButton); |
227 | taskbar_flags_ini.SetInt("MinLeftButton", tbMinLeftButton); |
227 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", tbMinRightButton); |
228 | taskbar_flags_ini.SetInt("MinRightButton", tbMinRightButton); |
228 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", tbRunApplButton); |
229 | taskbar_flags_ini.SetInt("RunApplButton", tbRunApplButton); |
229 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", tbClnDeskButton); |
230 | taskbar_flags_ini.SetInt("ClnDeskButton", tbClnDeskButton); |
230 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", tbClock); |
231 | taskbar_flags_ini.SetInt("Clock", tbClock); |
231 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", tbCpuUsage); |
232 | taskbar_flags_ini.SetInt("CpuUsage", tbCpuUsage); |
232 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", tbChangeLang); |
233 | taskbar_flags_ini.SetInt("ChangeLang", tbChangeLang); |
233 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", tbMenuButton); |
234 | taskbar_flags_ini.SetInt("MenuButton", tbMenuButton); |
234 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", tbPanelHeight); |
235 | taskbar_vars_ini.SetInt("PanelHeight", tbPanelHeight); |
235 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", tbSoftenHeight); |
236 | taskbar_vars_ini.SetInt("SoftenHeight", tbSoftenHeight); |
236 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", tbButtonOffset); |
237 | taskbar_vars_ini.SetInt("ButtonTopOffset", tbButtonOffset); |
237 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", tbButtonOffset); |
238 | taskbar_vars_ini.SetInt("ButtonBottOffset", tbButtonOffset); |
238 | } |
- | |
239 | if (panel_type==DOCKY) { |
239 | } |
240 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment); |
240 | if (panel_type==DOCKY) { |
241 | ini_set_int stdcall (#docky_ini_path, "@", "location", dkLocation); |
241 | docky_ini.SetInt("location", dkLocation); |
242 | ini_set_int stdcall (#docky_ini_path, "@", "fsize", dkFsize); |
242 | docky_ini.SetInt("fsize", dkFsize); |
243 | ini_set_int stdcall (#docky_ini_path, "@", "ashow", dkAshow); |
243 | docky_ini.SetInt("ashow", dkAshow); |
Line 244... | Line 244... | ||
244 | } |
244 | } |
245 | } |
245 | } |