Rev 5651 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5651 | Rev 5674 | ||
---|---|---|---|
1 | #ifndef AUTOBUILD |
1 | #ifndef AUTOBUILD |
2 | #include "lang.h--" |
2 | #include "lang.h--" |
3 | #endif |
3 | #endif |
4 | 4 | ||
5 | #define MEMSIZE 0x23E80 |
5 | #define MEMSIZE 0x23E80 |
6 | #include "..\lib\kolibri.h" |
6 | #include "..\lib\kolibri.h" |
7 | #include "..\lib\strings.h" |
7 | #include "..\lib\strings.h" |
8 | #include "..\lib\mem.h" |
8 | #include "..\lib\mem.h" |
9 | #include "..\lib\file_system.h" |
9 | #include "..\lib\file_system.h" |
10 | #include "..\lib\dll.h" |
10 | #include "..\lib\dll.h" |
11 | #include "..\lib\gui.h" |
11 | #include "..\lib\gui.h" |
12 | 12 | ||
13 | #include "..\lib\obj\libio_lib.h" |
13 | #include "..\lib\obj\libio_lib.h" |
14 | #include "..\lib\obj\libini.h" |
14 | #include "..\lib\obj\libini.h" |
15 | #include "..\lib\obj\box_lib.h" |
15 | #include "..\lib\obj\box_lib.h" |
16 | 16 | ||
17 | #include "..\lib\patterns\restart_process.h" |
17 | #include "..\lib\patterns\restart_process.h" |
18 | 18 | ||
19 | #ifdef LANG_RUS |
19 | #ifdef LANG_RUS |
20 | ?define WINDOW_TITLE " áâனª¨ ¯ ¥«¨ § ¤ ç ¨ ®ª " |
20 | ?define WINDOW_TITLE " áâனª¨ ¯ ¥«¨ § ¤ ç ¨ ®ª " |
21 | ?define TASK_FRAME_T " ¥«ì § ¤ ç " |
21 | ?define TASK_FRAME_T " ¥«ì § ¤ ç " |
22 | ?define DOCK_FRAME_T " ®ª " |
22 | ?define DOCK_FRAME_T " ®ª " |
23 | ?define MIN_LEFT_BUTTON "®¯ª áªàëâ¨ï á«¥¢ " |
23 | ?define MIN_LEFT_BUTTON "®¯ª áªàëâ¨ï á«¥¢ " |
24 | ?define MIN_RIGHT_BUTTON "®¯ª áªàëâ¨ï á¯à ¢ " |
24 | ?define MIN_RIGHT_BUTTON "®¯ª áªàëâ¨ï á¯à ¢ " |
25 | ?define SOFTEN_UP "£« ¦¨¢ ¨¥ ᢥàåã" |
25 | ?define SOFTEN_UP "£« ¦¨¢ ¨¥ ᢥàåã" |
26 | ?define SOFTEN_DOWN "£« ¦¨¢ ¨¥ ᨧã" |
26 | ?define SOFTEN_DOWN "£« ¦¨¢ ¨¥ ᨧã" |
27 | ?define CLOCK " áë" |
27 | ?define CLOCK " áë" |
28 | ?define CPU_USAGE " £à㧪 " |
28 | ?define CPU_USAGE " £à㧪 " |
29 | ?define CHANGE_LANG "§ëª ¢¢®¤ " |
29 | ?define CHANGE_LANG "§ëª ¢¢®¤ " |
30 | ?define MENU_BUTTON "®¯ª ¬¥î" |
30 | ?define MENU_BUTTON "®¯ª ¬¥î" |
31 | ?define PANEL_HEIGHT "ëá®â ¯ ¥«¨" |
31 | ?define PANEL_HEIGHT "ëá®â ¯ ¥«¨" |
32 | ?define SOFTEN_HEIGHT "ëá®â ᣫ ¦¨¢ ¨ï" |
32 | ?define SOFTEN_HEIGHT "ëá®â ᣫ ¦¨¢ ¨ï" |
33 | ?define BUTTON_OFFSET "®«¥ ¢®ªà㣠ª®¯®ª" |
33 | ?define BUTTON_OFFSET "®«¥ ¢®ªà㣠ª®¯®ª" |
34 | ?define FSIZE "¥¦¨¬ ¯ ¥«¨" |
34 | ?define FSIZE "¥¦¨¬ ¯ ¥«¨" |
35 | ?define ASHOW "¥ áªàë¢ âì" |
35 | ?define ASHOW "¥ áªàë¢ âì" |
36 | ?define CHANGE_POS " ¦¬¨â¥ ¨§®¡à ¦¥¨¥ ¤«ï á¬¥ë ¯®§¨æ¨¨" |
36 | ?define CHANGE_POS " ¦¬¨â¥ ¨§®¡à ¦¥¨¥ ¤«ï á¬¥ë ¯®§¨æ¨¨" |
37 | #else |
37 | #else |
38 | ?define WINDOW_TITLE "Taskbar and Docky configuration" |
38 | ?define WINDOW_TITLE "Taskbar and Docky configuration" |
39 | ?define TASK_FRAME_T " Taskbar " |
39 | ?define TASK_FRAME_T " Taskbar " |
40 | ?define DOCK_FRAME_T " Docky " |
40 | ?define DOCK_FRAME_T " Docky " |
41 | ?define MIN_LEFT_BUTTON "Min Left Button" |
41 | ?define MIN_LEFT_BUTTON "Min Left Button" |
42 | ?define MIN_RIGHT_BUTTON "Min Right Button" |
42 | ?define MIN_RIGHT_BUTTON "Min Right Button" |
43 | ?define SOFTEN_UP "Soften Up" |
43 | ?define SOFTEN_UP "Soften Up" |
44 | ?define SOFTEN_DOWN "Soften Down" |
44 | ?define SOFTEN_DOWN "Soften Down" |
45 | ?define CLOCK "Clock" |
45 | ?define CLOCK "Clock" |
46 | ?define CPU_USAGE "Cpu Usage" |
46 | ?define CPU_USAGE "Cpu Usage" |
47 | ?define CHANGE_LANG "Change Language" |
47 | ?define CHANGE_LANG "Change Language" |
48 | ?define MENU_BUTTON "Menu Button" |
48 | ?define MENU_BUTTON "Menu Button" |
49 | ?define PANEL_HEIGHT "Panel Height" |
49 | ?define PANEL_HEIGHT "Panel Height" |
50 | ?define SOFTEN_HEIGHT "Soften Height" |
50 | ?define SOFTEN_HEIGHT "Soften Height" |
51 | ?define BUTTON_OFFSET "Button Offset" |
51 | ?define BUTTON_OFFSET "Button Offset" |
52 | ?define FSIZE "Full width" |
52 | ?define FSIZE "Full width" |
53 | ?define ASHOW "Always show" |
53 | ?define ASHOW "Always show" |
54 | ?define CHANGE_POS "Click on image to change position" |
54 | ?define CHANGE_POS "Click on image to change position" |
55 | #endif |
55 | #endif |
56 | 56 | ||
57 | 57 | ||
58 | frame taskbar_frame = { 0, 000, 10, 188, 14, 0x000111, 0xFFFfff, 1, TASK_FRAME_T, 0, 0, 6, 0x000111, 0xCCCccc }; |
58 | frame taskbar_frame = { 0, 000, 10, 188, 14, 0x000111, 0xFFFfff, 1, TASK_FRAME_T, 0, 0, 6, 0x000111, 0xCCCccc }; |
59 | frame docky_frame = { 0, 000, 10, 73, 217, 0x000111, 0xFFFfff, 1, DOCK_FRAME_T, 0, 0, 6, 0x000111, 0xCCCccc }; |
59 | frame docky_frame = { 0, 000, 10, 73, 217, 0x000111, 0xFFFfff, 1, DOCK_FRAME_T, 0, 0, 6, 0x000111, 0xCCCccc }; |
60 | 60 | ||
61 | char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; |
61 | char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; |
62 | char taskbar_c_flags[] = "Flags"; |
62 | char taskbar_c_flags[] = "Flags"; |
63 | char taskbar_c_variables[] = "Variables"; |
63 | char taskbar_c_variables[] = "Variables"; |
64 | char docky_ini_path[] = "/sys/settings/docky.ini"; |
64 | char docky_ini_path[] = "/sys/settings/docky.ini"; |
65 | 65 | ||
66 | unsigned char panels_img_data[] = FROM "panels_image.raw"; |
66 | unsigned char panels_img_data[] = FROM "panels_image.raw"; |
67 | raw_image panels_img = { 37, 27, #panels_img_data }; |
67 | raw_image panels_img = { 37, 27, #panels_img_data }; |
68 | - | ||
69 | system_colors sc; |
68 | |
70 | proc_info Form; |
69 | proc_info Form; |
71 | 70 | ||
72 | struct docky_cfg { |
71 | struct docky_cfg { |
73 | word fsize; |
72 | word fsize; |
74 | byte location, ashow; |
73 | byte location, ashow; |
75 | } docky_cfg; |
74 | } docky_cfg; |
76 | 75 | ||
77 | struct taskbar_cfg { |
76 | struct taskbar_cfg { |
78 | byte Attachment; |
77 | byte Attachment; |
79 | byte PanelHeight, SoftenHeight, ButtonOffset; |
78 | byte PanelHeight, SoftenHeight, ButtonOffset; |
80 | byte SoftenUp, SoftenDown, MinLeftButton, MinRightButton, MenuButton, |
79 | byte SoftenUp, SoftenDown, MinLeftButton, MinRightButton, MenuButton, |
81 | RunApplButton, ClnDeskButton, Clock, CpuUsage, ChangeLang; |
80 | RunApplButton, ClnDeskButton, Clock, CpuUsage, ChangeLang; |
82 | } taskbar_cfg; |
81 | } taskbar_cfg; |
83 | 82 | ||
84 | enum { |
83 | enum { |
85 | TASKBAR, |
84 | TASKBAR, |
86 | DOCKY, |
85 | DOCKY, |
87 | ALL |
86 | ALL |
88 | }; |
87 | }; |
89 | 88 | ||
90 | 89 | ||
91 | void main() |
90 | void main() |
92 | { |
91 | { |
93 | dword id, key; |
92 | dword id, key; |
94 | 93 | ||
95 | load_dll(libini, #lib_init,1); |
94 | load_dll(libini, #lib_init,1); |
96 | load_dll(boxlib, #box_lib_init,0); |
95 | load_dll(boxlib, #box_lib_init,0); |
97 | 96 | ||
98 | LoadCfg(); |
97 | LoadCfg(); |
99 | 98 | ||
100 | loop() switch(WaitEvent()) |
99 | loop() switch(WaitEvent()) |
101 | { |
100 | { |
102 | case evButton: |
101 | case evButton: |
103 | id=GetButtonID(); |
102 | id=GetButtonID(); |
104 | if (id==1) ExitProcess(); |
103 | if (id==1) ExitProcess(); |
105 | //taskbar buttons |
104 | //taskbar buttons |
106 | if (id>=100) && (id<200) |
105 | if (id>=100) && (id<200) |
107 | { |
106 | { |
108 | if (id==100) taskbar_cfg.Attachment ^= 1; |
107 | if (id==100) taskbar_cfg.Attachment ^= 1; |
109 | if (id==105) taskbar_cfg.SoftenUp ^= 1; |
108 | if (id==105) taskbar_cfg.SoftenUp ^= 1; |
110 | if (id==106) taskbar_cfg.SoftenDown ^= 1; |
109 | if (id==106) taskbar_cfg.SoftenDown ^= 1; |
111 | if (id==107) taskbar_cfg.MinLeftButton ^= 1; |
110 | if (id==107) taskbar_cfg.MinLeftButton ^= 1; |
112 | if (id==108) taskbar_cfg.MinRightButton ^= 1; |
111 | if (id==108) taskbar_cfg.MinRightButton ^= 1; |
113 | if (id==109) taskbar_cfg.RunApplButton ^= 1; |
112 | if (id==109) taskbar_cfg.RunApplButton ^= 1; |
114 | if (id==110) taskbar_cfg.ClnDeskButton ^= 1; |
113 | if (id==110) taskbar_cfg.ClnDeskButton ^= 1; |
115 | if (id==111) taskbar_cfg.Clock ^= 1; |
114 | if (id==111) taskbar_cfg.Clock ^= 1; |
116 | if (id==112) taskbar_cfg.CpuUsage ^= 1; |
115 | if (id==112) taskbar_cfg.CpuUsage ^= 1; |
117 | if (id==113) taskbar_cfg.ChangeLang ^= 1; |
116 | if (id==113) taskbar_cfg.ChangeLang ^= 1; |
118 | if (id==114) taskbar_cfg.MenuButton ^= 1; |
117 | if (id==114) taskbar_cfg.MenuButton ^= 1; |
119 | if (id==120) taskbar_cfg.PanelHeight++; |
118 | if (id==120) taskbar_cfg.PanelHeight++; |
120 | if (id==121) && (taskbar_cfg.PanelHeight>6) taskbar_cfg.PanelHeight--; |
119 | if (id==121) && (taskbar_cfg.PanelHeight>6) taskbar_cfg.PanelHeight--; |
121 | if (id==122) taskbar_cfg.SoftenHeight++; |
120 | if (id==122) taskbar_cfg.SoftenHeight++; |
122 | if (id==123) && (taskbar_cfg.SoftenHeight>0) taskbar_cfg.SoftenHeight--; |
121 | if (id==123) && (taskbar_cfg.SoftenHeight>0) taskbar_cfg.SoftenHeight--; |
123 | if (id==124) taskbar_cfg.ButtonOffset++; |
122 | if (id==124) taskbar_cfg.ButtonOffset++; |
124 | if (id==125) && (taskbar_cfg.ButtonOffset>0) taskbar_cfg.ButtonOffset--; |
123 | if (id==125) && (taskbar_cfg.ButtonOffset>0) taskbar_cfg.ButtonOffset--; |
125 | DrawWindowContent(TASKBAR); |
124 | DrawWindowContent(TASKBAR); |
126 | SaveCfg(TASKBAR); |
125 | SaveCfg(TASKBAR); |
127 | RestartProcess(TASKBAR); |
126 | RestartProcess(TASKBAR); |
128 | } |
127 | } |
129 | //docky buttons |
128 | //docky buttons |
130 | if (id>=200) |
129 | if (id>=200) |
131 | { |
130 | { |
132 | if (id==200) |
131 | if (id==200) |
133 | { |
132 | { |
134 | if (docky_cfg.location==1) docky_cfg.location = 2; |
133 | if (docky_cfg.location==1) docky_cfg.location = 2; |
135 | else if (docky_cfg.location==2) docky_cfg.location = 3; |
134 | else if (docky_cfg.location==2) docky_cfg.location = 3; |
136 | else if (docky_cfg.location==3) docky_cfg.location = 1; |
135 | else if (docky_cfg.location==3) docky_cfg.location = 1; |
137 | } |
136 | } |
138 | if (id==201) docky_cfg.fsize ^= 1; |
137 | if (id==201) docky_cfg.fsize ^= 1; |
139 | if (id==202) docky_cfg.ashow ^= 1; |
138 | if (id==202) docky_cfg.ashow ^= 1; |
140 | DrawWindowContent(DOCKY); |
139 | DrawWindowContent(DOCKY); |
141 | SaveCfg(DOCKY); |
140 | SaveCfg(DOCKY); |
142 | RestartProcess(DOCKY); |
141 | RestartProcess(DOCKY); |
143 | } |
142 | } |
144 | break; |
143 | break; |
145 | 144 | ||
146 | case evKey: |
145 | case evKey: |
147 | key = GetKey(); |
146 | key = GetKey(); |
148 | if (key==27) ExitProcess(); |
147 | if (key==27) ExitProcess(); |
149 | break; |
148 | break; |
150 | 149 | ||
151 | case evReDraw: |
150 | case evReDraw: |
152 | sc.get(); |
151 | system.color.get(); |
153 | DefineAndDrawWindow(130, 150, 400, 300+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE); |
152 | DefineAndDrawWindow(130, 150, 400, 300+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE); |
154 | GetProcessInfo(#Form, SelfInfo); |
153 | GetProcessInfo(#Form, SelfInfo); |
155 | if (Form.status_window>2) break; |
154 | if (Form.status_window>2) break; |
156 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
155 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
157 | taskbar_frame.font_color = docky_frame.font_color = sc.work_text; |
156 | taskbar_frame.font_color = docky_frame.font_color = system.color.work_text; |
158 | taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = sc.work; |
157 | taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = system.color.work; |
159 | taskbar_frame.ext_col = docky_frame.ext_col = sc.work_graph; |
158 | taskbar_frame.ext_col = docky_frame.ext_col = system.color.work_graph; |
160 | DrawWindowContent(ALL); |
159 | DrawWindowContent(ALL); |
161 | } |
160 | } |
162 | } |
161 | } |
163 | 162 | ||
164 | 163 | ||
165 | void DrawWindowContent(byte panel_type) |
164 | void DrawWindowContent(byte panel_type) |
166 | { |
165 | { |
167 | word win_center_x; |
166 | word win_center_x; |
168 | 167 | ||
169 | if (panel_type==ALL) |
168 | if (panel_type==ALL) |
170 | { |
169 | { |
171 | frame_draw stdcall (#taskbar_frame); |
170 | frame_draw stdcall (#taskbar_frame); |
172 | frame_draw stdcall (#docky_frame); |
171 | frame_draw stdcall (#docky_frame); |
173 | } |
172 | } |
174 | if (panel_type==ALL) || (panel_type==TASKBAR) |
173 | if (panel_type==ALL) || (panel_type==TASKBAR) |
175 | { |
174 | { |
176 | DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0); |
175 | DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0); |
177 | _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data); |
176 | _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data); |
178 | WriteText(68, taskbar_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS); |
177 | WriteText(68, taskbar_frame.start_y + 20, 0x80, system.color.work_text, CHANGE_POS); |
179 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, SOFTEN_UP, taskbar_cfg.SoftenUp); |
178 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, SOFTEN_UP, taskbar_cfg.SoftenUp); |
180 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, SOFTEN_DOWN, taskbar_cfg.SoftenDown); |
179 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, SOFTEN_DOWN, taskbar_cfg.SoftenDown); |
181 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, MIN_LEFT_BUTTON, taskbar_cfg.MinLeftButton); |
180 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, MIN_LEFT_BUTTON, taskbar_cfg.MinLeftButton); |
182 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, MIN_RIGHT_BUTTON, taskbar_cfg.MinRightButton); |
181 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, MIN_RIGHT_BUTTON, taskbar_cfg.MinRightButton); |
183 | win_center_x = Form.cwidth / 2; |
182 | win_center_x = Form.cwidth / 2; |
184 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, CLOCK, taskbar_cfg.Clock); |
183 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, CLOCK, taskbar_cfg.Clock); |
185 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, CPU_USAGE, taskbar_cfg.CpuUsage); |
184 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, CPU_USAGE, taskbar_cfg.CpuUsage); |
186 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, CHANGE_LANG, taskbar_cfg.ChangeLang); |
185 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, CHANGE_LANG, taskbar_cfg.ChangeLang); |
187 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, MENU_BUTTON, taskbar_cfg.MenuButton); |
186 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, MENU_BUTTON, taskbar_cfg.MenuButton); |
188 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT); |
187 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT); |
189 | PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT); |
188 | PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT); |
190 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET); |
189 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET); |
191 | } |
190 | } |
192 | if (panel_type==ALL) || (panel_type==DOCKY) |
191 | if (panel_type==ALL) || (panel_type==DOCKY) |
193 | { |
192 | { |
194 | DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); |
193 | DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); |
195 | _PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); |
194 | _PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); |
196 | WriteText(68, docky_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS); |
195 | WriteText(68, docky_frame.start_y + 20, 0x80, system.color.work_text, CHANGE_POS); |
197 | PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, FSIZE, docky_cfg.fsize); |
196 | PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, FSIZE, docky_cfg.fsize); |
198 | PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow); |
197 | PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow); |
199 | } |
198 | } |
200 | } |
199 | } |
201 | 200 | ||
202 | void LoadCfg() |
201 | void LoadCfg() |
203 | { |
202 | { |
204 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1); taskbar_cfg.Attachment = EAX; |
203 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1); taskbar_cfg.Attachment = EAX; |
205 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1); taskbar_cfg.SoftenUp = EAX; |
204 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1); taskbar_cfg.SoftenUp = EAX; |
206 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1); taskbar_cfg.SoftenDown = EAX; |
205 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1); taskbar_cfg.SoftenDown = EAX; |
207 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1); taskbar_cfg.MinLeftButton = EAX; |
206 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1); taskbar_cfg.MinLeftButton = EAX; |
208 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); taskbar_cfg.MinRightButton = EAX; |
207 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); taskbar_cfg.MinRightButton = EAX; |
209 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1); taskbar_cfg.Clock = EAX; |
208 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1); taskbar_cfg.Clock = EAX; |
210 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1); taskbar_cfg.CpuUsage = EAX; |
209 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1); taskbar_cfg.CpuUsage = EAX; |
211 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1); taskbar_cfg.ChangeLang = EAX; |
210 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1); taskbar_cfg.ChangeLang = EAX; |
212 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1); taskbar_cfg.MenuButton = EAX; |
211 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1); taskbar_cfg.MenuButton = EAX; |
213 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18); taskbar_cfg.PanelHeight = EAX; |
212 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18); taskbar_cfg.PanelHeight = EAX; |
214 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4); taskbar_cfg.SoftenHeight = EAX; |
213 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4); taskbar_cfg.SoftenHeight = EAX; |
215 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); taskbar_cfg.ButtonOffset = EAX; |
214 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); taskbar_cfg.ButtonOffset = EAX; |
216 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); taskbar_cfg.ButtonOffset = EAX; |
215 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); taskbar_cfg.ButtonOffset = EAX; |
217 | 216 | ||
218 | ini_get_int stdcall (#docky_ini_path, "@", "location", 0); docky_cfg.location = EAX; |
217 | ini_get_int stdcall (#docky_ini_path, "@", "location", 0); docky_cfg.location = EAX; |
219 | ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); docky_cfg.fsize = EAX; |
218 | ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); docky_cfg.fsize = EAX; |
220 | ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); docky_cfg.ashow = EAX; |
219 | ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); docky_cfg.ashow = EAX; |
221 | } |
220 | } |
222 | 221 | ||
223 | void SaveCfg(byte panel_type) |
222 | void SaveCfg(byte panel_type) |
224 | { |
223 | { |
225 | if (panel_type==TASKBAR) { |
224 | if (panel_type==TASKBAR) { |
226 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); |
225 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); |
227 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", taskbar_cfg.SoftenUp); |
226 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", taskbar_cfg.SoftenUp); |
228 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", taskbar_cfg.SoftenDown); |
227 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", taskbar_cfg.SoftenDown); |
229 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", taskbar_cfg.MinLeftButton); |
228 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", taskbar_cfg.MinLeftButton); |
230 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", taskbar_cfg.MinRightButton); |
229 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", taskbar_cfg.MinRightButton); |
231 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", taskbar_cfg.RunApplButton); |
230 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", taskbar_cfg.RunApplButton); |
232 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", taskbar_cfg.ClnDeskButton); |
231 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", taskbar_cfg.ClnDeskButton); |
233 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", taskbar_cfg.Clock); |
232 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", taskbar_cfg.Clock); |
234 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", taskbar_cfg.CpuUsage); |
233 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", taskbar_cfg.CpuUsage); |
235 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", taskbar_cfg.ChangeLang); |
234 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", taskbar_cfg.ChangeLang); |
236 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", taskbar_cfg.MenuButton); |
235 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", taskbar_cfg.MenuButton); |
237 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", taskbar_cfg.PanelHeight); |
236 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", taskbar_cfg.PanelHeight); |
238 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", taskbar_cfg.SoftenHeight); |
237 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", taskbar_cfg.SoftenHeight); |
239 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", taskbar_cfg.ButtonOffset); |
238 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", taskbar_cfg.ButtonOffset); |
240 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", taskbar_cfg.ButtonOffset); |
239 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", taskbar_cfg.ButtonOffset); |
241 | } |
240 | } |
242 | if (panel_type==DOCKY) { |
241 | if (panel_type==DOCKY) { |
243 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); |
242 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); |
244 | ini_set_int stdcall (#docky_ini_path, "@", "location", docky_cfg.location); |
243 | ini_set_int stdcall (#docky_ini_path, "@", "location", docky_cfg.location); |
245 | ini_set_int stdcall (#docky_ini_path, "@", "fsize", docky_cfg.fsize); |
244 | ini_set_int stdcall (#docky_ini_path, "@", "fsize", docky_cfg.fsize); |
246 | ini_set_int stdcall (#docky_ini_path, "@", "ashow", docky_cfg.ashow); |
245 | ini_set_int stdcall (#docky_ini_path, "@", "ashow", docky_cfg.ashow); |
247 | } |
246 | } |
248 | } |
247 | } |
249 | 248 | ||
250 | void RestartProcess(byte panel_type) |
249 | void RestartProcess(byte panel_type) |
251 | { |
250 | { |
252 | dword proc_name1; |
251 | dword proc_name1; |
253 | if (panel_type == TASKBAR) |
252 | if (panel_type == TASKBAR) |
254 | { |
253 | { |
255 | RestartProcessByName("@taskbar", SINGLE); |
254 | RestartProcessByName("@taskbar", SINGLE); |
256 | pause(50); |
255 | pause(50); |
257 | } |
256 | } |
258 | else |
257 | else |
259 | { |
258 | { |
260 | RestartProcessByName("@docky", SINGLE); |
259 | RestartProcessByName("@docky", SINGLE); |
261 | pause(120); |
260 | pause(120); |
262 | } |
261 | } |
263 | GetProcessInfo(#Form, SelfInfo); |
262 | GetProcessInfo(#Form, SelfInfo); |
264 | ActivateWindow(GetProcessSlot(Form.ID)); |
263 | ActivateWindow(GetProcessSlot(Form.ID)); |
265 | } |
264 | } |
266 | 265 | ||
267 | 266 | ||
268 | 267 | ||
269 | void PanelCfg_CheckBox(dword x, y, id, text, byte value) { |
268 | void PanelCfg_CheckBox(dword x, y, id, text, byte value) { |
270 | CheckBox(x, y, 14, 14, id, text, sc.work_graph, sc.work_text, value); |
269 | CheckBox(x, y, 14, 14, id, text, system.color.work_graph, system.color.work_text, value); |
271 | } |
270 | } |
272 | 271 | ||
273 | void PanelCfg_MoreLessBox(dword x, y, id_more, id_less; byte value; dword text) { |
272 | void PanelCfg_MoreLessBox(dword x, y, id_more, id_less; byte value; dword text) { |
274 | MoreLessBox(x, y, 18, id_more, id_less, #sc, value, text); |
273 | MoreLessBox(x, y, 18, id_more, id_less, #system.color, value, text); |
275 | } |
274 | } |
276 | 275 | ||
277 | 276 | ||
278 | stop:200) |
277 | stop:200) |
279 | > |
278 | > |