Rev 5472 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5472 | Rev 5477 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | #include "..\lib\dll.h" |
6 | #include "..\lib\dll.h" |
7 | #include "..\lib\figures.h" |
7 | #include "..\lib\figures.h" |
8 | 8 | ||
Line 9... | Line 9... | ||
9 | #include "..\lib\lib.obj\libio_lib.h" |
9 | #include "..\lib\lib.obj\libio_lib.h" |
10 | #include "..\lib\lib.obj\libimg_lib.h" |
- | |
11 | #include "..\lib\lib.obj\libini.h" |
10 | #include "..\lib\lib.obj\libini.h" |
12 | #include "..\lib\lib.obj\box_lib.h" |
11 | #include "..\lib\lib.obj\box_lib.h" |
Line 13... | Line 12... | ||
13 | 12 | ||
Line 14... | Line 13... | ||
14 | #include "..\lib\patterns\libimg_load_skin.h" |
13 | #include "..\lib\patterns\libimg_load_skin.h" |
Line 15... | Line 14... | ||
15 | 14 | ||
16 | #define WINDOW_TITLE "System panels configuration v0.8" |
15 | #define WINDOW_TITLE "System panels configuration" |
Line 17... | Line 16... | ||
17 | 16 | ||
18 | frame taskbar_frame = { 0, 100, 10, 152, 14, 0x000111, 0xFFFfff, 1, " Taskbar ", 0, 0, 6, 0x000111, 0xCCCccc }; |
17 | frame taskbar_frame = { 0, 000, 10, 188, 14, 0x000111, 0xFFFfff, 1, " Taskbar ", 0, 0, 6, 0x000111, 0xCCCccc }; |
- | 18 | frame docky_frame = { 0, 000, 10, 73, 217, 0x000111, 0xFFFfff, 1, " Docky ", 0, 0, 6, 0x000111, 0xCCCccc }; |
|
19 | frame docky_frame = { 0, 100, 10, 98, 183, 0x000111, 0xFFFfff, 1, " Docky ", 0, 0, 6, 0x000111, 0xCCCccc }; |
19 | |
Line -... | Line 20... | ||
- | 20 | char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; |
|
- | 21 | char taskbar_c_flags[] = "Flags"; |
|
Line 20... | Line 22... | ||
20 | 22 | char taskbar_c_variables[] = "Variables"; |
|
21 | char taskbar_ini_path[] = "/sys/settings/taskbar.ini"; |
23 | char docky_ini_path[] = "/sys/settings/docky.ini"; |
22 | char taskbar_category[] = "Flags"; |
- | |
23 | char docky_ini_path[] = "/sys/settings/docky.ini"; |
- | |
Line 24... | Line 24... | ||
24 | 24 | ||
25 | 25 | unsigned char panels_img_data[] = FROM "panels_image.raw"; |
|
26 | system_colors sc; |
26 | raw_image panels_img = { 37, 27, #panels_img_data }; |
27 | proc_info Form; |
27 | |
Line 28... | Line 28... | ||
28 | mouse m; |
28 | system_colors sc; |
29 | libimg_image panels_image; |
29 | proc_info Form; |
30 | 30 | ||
31 | struct docky_cfg { |
31 | struct docky_cfg { |
32 | word fsize; |
32 | word fsize; |
33 | byte location, ashow; |
33 | byte location, ashow; |
Line -... | Line 34... | ||
- | 34 | } docky_cfg; |
|
- | 35 | ||
- | 36 | struct taskbar_cfg { |
|
- | 37 | byte Attachment; |
|
Line 34... | Line 38... | ||
34 | } docky_cfg; |
38 | byte PanelHeight, SoftenHeight, ButtonOffset; |
35 | 39 | byte SoftenUp, SoftenDown, MinLeftButton, MinRightButton, MenuButton, |
|
36 | struct taskbar_cfg { |
40 | RunApplButton, ClnDeskButton, Clock, CpuUsage, ChangeLang; |
Line 37... | Line 41... | ||
37 | byte Attachment; |
41 | } taskbar_cfg; |
38 | byte PanelHeigh; |
- | |
39 | byte SoftenUp, SoftenDown, MinLeftButton, MinRightButton, MenuButton, |
- | |
40 | RunApplButton, ClnDeskButton, Clock, CpuUsage, ChangeLang; |
42 | |
41 | } taskbar_cfg; |
43 | enum { |
Line 42... | Line -... | ||
42 | - | ||
43 | - | ||
44 | 44 | TASKBAR, |
|
Line 45... | Line 45... | ||
45 | void main() |
45 | DOCKY |
46 | { |
46 | }; |
47 | dword id, key; |
47 | |
Line 74... | Line 74... | ||
74 | if (id==111) taskbar_cfg.Clock ^= 1; |
74 | if (id==111) taskbar_cfg.Clock ^= 1; |
75 | if (id==112) taskbar_cfg.CpuUsage ^= 1; |
75 | if (id==112) taskbar_cfg.CpuUsage ^= 1; |
76 | if (id==113) taskbar_cfg.ChangeLang ^= 1; |
76 | if (id==113) taskbar_cfg.ChangeLang ^= 1; |
77 | if (id==114) taskbar_cfg.MenuButton ^= 1; |
77 | if (id==114) taskbar_cfg.MenuButton ^= 1; |
78 | DrawWindowContent(); |
78 | if (id==120) taskbar_cfg.PanelHeight++; |
- | 79 | if (id==121) && (taskbar_cfg.PanelHeight>6) taskbar_cfg.PanelHeight--; |
|
- | 80 | if (id==122) taskbar_cfg.SoftenHeight++; |
|
- | 81 | if (id==123) && (taskbar_cfg.SoftenHeight>0) taskbar_cfg.SoftenHeight--; |
|
- | 82 | if (id==124) taskbar_cfg.ButtonOffset++; |
|
- | 83 | if (id==125) && (taskbar_cfg.ButtonOffset>0) taskbar_cfg.ButtonOffset--; |
|
- | 84 | DrawWindowContent(TASKBAR); |
|
79 | SaveCfg(); |
85 | SaveCfg(TASKBAR); |
80 | RestartProcess("@taskbar"); |
86 | RestartProcess(TASKBAR); |
81 | } |
87 | } |
82 | //docky buttons |
88 | //docky buttons |
83 | if (id>=200) |
89 | if (id>=200) |
84 | { |
90 | { |
85 | if (id==200) |
91 | if (id==200) |
86 | { |
92 | { |
Line 89... | Line 95... | ||
89 | else if (docky_cfg.location==3) docky_cfg.location = 1; |
95 | else if (docky_cfg.location==3) docky_cfg.location = 1; |
90 | } |
96 | } |
91 | if (id==201) docky_cfg.fsize ^= 1; |
97 | if (id==201) docky_cfg.fsize ^= 1; |
92 | if (id==202) docky_cfg.ashow ^= 1; |
98 | if (id==202) docky_cfg.ashow ^= 1; |
93 | DrawWindowContent(); |
99 | DrawWindowContent(DOCKY); |
94 | SaveCfg(); |
100 | SaveCfg(DOCKY); |
95 | RestartProcess("@docky"); |
101 | RestartProcess(DOCKY); |
96 | } |
102 | } |
97 | break; |
103 | break; |
98 | 104 | ||
Line 99... | Line 105... | ||
99 | case evKey: |
105 | case evKey: |
100 | key = GetKey(); |
106 | key = GetKey(); |
101 | if (key==27) ExitProcess(); |
107 | if (key==27) ExitProcess(); |
102 | break; |
108 | break; |
Line 103... | Line 109... | ||
103 | 109 | ||
104 | case evReDraw: |
110 | case evReDraw: |
105 | sc.get(); |
111 | sc.get(); |
106 | DefineAndDrawWindow(130, 150, 400, 300+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE); |
112 | DefineAndDrawWindow(130, 150, 390, 300+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE); |
107 | GetProcessInfo(#Form, SelfInfo); |
113 | GetProcessInfo(#Form, SelfInfo); |
108 | if (Form.status_window>2) break; |
114 | if (Form.status_window>2) break; |
109 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
115 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
110 | taskbar_frame.font_color = docky_frame.font_color = sc.work_text; |
116 | taskbar_frame.font_color = docky_frame.font_color = sc.work_text; |
- | 117 | taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = sc.work; |
|
111 | taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = sc.work; |
118 | taskbar_frame.ext_col = docky_frame.ext_col = sc.work_graph; |
112 | DrawWindowContent(); |
119 | DrawWindowContent(); |
113 | } |
120 | } |
Line 114... | Line 121... | ||
114 | } |
121 | } |
115 | 122 | ||
116 | 123 | ||
Line 117... | Line 124... | ||
117 | void DrawWindowContent() |
124 | void DrawWindowContent() |
118 | { |
125 | { |
119 | word win_center_x; |
126 | word win_center_x; |
120 | 127 | ||
121 | frame_draw stdcall (#taskbar_frame); |
128 | frame_draw stdcall (#taskbar_frame); |
122 | DefineButton(22, taskbar_frame.start_y + 12, panels_image.w-1, 27-1, 100 + BT_HIDE, 0); |
129 | DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0); |
123 | img_draw stdcall(panels_image.image, 22, taskbar_frame.start_y + 12, panels_image.w, 27, 0, taskbar_cfg.Attachment * 27); |
130 | _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data); |
124 | WriteText(68, taskbar_frame.start_y + 20, 0x80, 0x333222, "Click on image to change position"); |
131 | WriteText(68, taskbar_frame.start_y + 20, 0x80, 0x333222, "Click on image to change position"); |
125 | PanelCfgCheckBox(22, taskbar_frame.start_y + 48, 105, "Soften Up", taskbar_cfg.SoftenUp); |
- | |
126 | PanelCfgCheckBox(22, taskbar_frame.start_y + 68, 106, "Soften Down", taskbar_cfg.SoftenDown); |
132 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, "Soften Up", taskbar_cfg.SoftenUp); |
127 | PanelCfgCheckBox(22, taskbar_frame.start_y + 88, 107, "Min Left Button", taskbar_cfg.MinLeftButton); |
133 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, "Soften Down", taskbar_cfg.SoftenDown); |
128 | PanelCfgCheckBox(22, taskbar_frame.start_y + 108, 108, "Min Right Button", taskbar_cfg.MinRightButton); |
134 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, "Min Left Button", taskbar_cfg.MinLeftButton); |
129 | PanelCfgCheckBox(22, taskbar_frame.start_y + 128, 109, "Run Application Button", taskbar_cfg.RunApplButton); |
135 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, "Min Right Button", taskbar_cfg.MinRightButton); |
130 | win_center_x = Form.cwidth * 55 / 100; |
136 | win_center_x = Form.cwidth / 2; |
- | 137 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, "Clock", taskbar_cfg.Clock); |
|
131 | PanelCfgCheckBox(win_center_x, taskbar_frame.start_y + 48, 110, "ClnDeskButton - wtf?", taskbar_cfg.ClnDeskButton); |
138 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, "Cpu Usage", taskbar_cfg.CpuUsage); |
132 | PanelCfgCheckBox(win_center_x, taskbar_frame.start_y + 68, 111, "Clock", taskbar_cfg.Clock); |
139 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, "Change Language", taskbar_cfg.ChangeLang); |
Line 133... | Line 140... | ||
133 | PanelCfgCheckBox(win_center_x, taskbar_frame.start_y + 88, 112, "Cpu Usage", taskbar_cfg.CpuUsage); |
140 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, "Menu Button", taskbar_cfg.MenuButton); |
134 | PanelCfgCheckBox(win_center_x, taskbar_frame.start_y + 108, 113, "Change Language", taskbar_cfg.ChangeLang); |
141 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, "Panel Height"); |
135 | PanelCfgCheckBox(win_center_x, taskbar_frame.start_y + 128, 114, "Menu Button", taskbar_cfg.MenuButton); |
142 | PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, "Soften Height"); |
136 | //PanelCfgCheckBox(22, taskbar_frame.start_y + 64, 204, "111", taskbar_cfg.PanelHeigh); |
143 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, "Button Offset"); |
Line 137... | Line 144... | ||
137 | 144 | ||
138 | frame_draw stdcall (#docky_frame); |
145 | frame_draw stdcall (#docky_frame); |
139 | DefineButton(22, docky_frame.start_y + 12, panels_image.w-1, 27-1, 200 + BT_HIDE, 0); |
146 | DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); |
Line 140... | Line 147... | ||
140 | img_draw stdcall(panels_image.image, 22, docky_frame.start_y + 12, panels_image.w, 27, 0, docky_cfg.location * 27 + 27); |
147 | _PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); |
141 | WriteText(68, docky_frame.start_y + 20, 0x80, 0x333222, "Click on image to change position"); |
148 | WriteText(68, docky_frame.start_y + 20, 0x80, 0x333222, "Click on image to change position"); |
142 | 149 | ||
143 | PanelCfgCheckBox(22, docky_frame.start_y + 48, 201, "Full width", docky_cfg.fsize); |
150 | PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, "Full width", docky_cfg.fsize); |
144 | PanelCfgCheckBox(22, docky_frame.start_y + 70, 202, "Always show", docky_cfg.ashow); |
151 | PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, "Always show", docky_cfg.ashow); |
145 | } |
152 | } |
146 | 153 | ||
147 | void LoadCfg() |
154 | void LoadCfg() |
148 | { |
155 | { |
149 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "Attachment", 1); taskbar_cfg.Attachment = EAX; |
156 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1); taskbar_cfg.Attachment = EAX; |
150 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "PanelHeigh", 18); taskbar_cfg.PanelHeigh = EAX; |
157 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1); taskbar_cfg.SoftenUp = EAX; |
151 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "SoftenUp", 1); taskbar_cfg.SoftenUp = EAX; |
158 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1); taskbar_cfg.SoftenDown = EAX; |
152 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "SoftenDown", 1); taskbar_cfg.SoftenDown = EAX; |
159 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1); taskbar_cfg.MinLeftButton = EAX; |
- | 160 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); taskbar_cfg.MinRightButton = EAX; |
|
153 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "MinLeftButton", 1); taskbar_cfg.MinLeftButton = EAX; |
161 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1); taskbar_cfg.Clock = EAX; |
Line 154... | Line 162... | ||
154 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "MinRightButton", 1); taskbar_cfg.MinRightButton = EAX; |
162 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1); taskbar_cfg.CpuUsage = EAX; |
155 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "RunApplButton", 1); taskbar_cfg.RunApplButton = EAX; |
163 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1); taskbar_cfg.ChangeLang = EAX; |
156 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "ClnDeskButton", 1); taskbar_cfg.ClnDeskButton = EAX; |
164 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1); taskbar_cfg.MenuButton = EAX; |
157 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "Clock", 1); taskbar_cfg.Clock = EAX; |
165 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18); taskbar_cfg.PanelHeight = EAX; |
Line 158... | Line 166... | ||
158 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "CpuUsage", 1); taskbar_cfg.CpuUsage = EAX; |
166 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4); taskbar_cfg.SoftenHeight = EAX; |
159 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "ChangeLang", 1); taskbar_cfg.ChangeLang = EAX; |
167 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); taskbar_cfg.ButtonOffset = EAX; |
160 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_category, "MenuButton", 1); taskbar_cfg.MenuButton = EAX; |
168 | ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); taskbar_cfg.ButtonOffset = EAX; |
161 | 169 | ||
162 | ini_get_int stdcall (#docky_ini_path, "@", "location", 0); docky_cfg.location = EAX; |
170 | ini_get_int stdcall (#docky_ini_path, "@", "location", 0); docky_cfg.location = EAX; |
163 | ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); docky_cfg.fsize = EAX; |
171 | ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0); docky_cfg.fsize = EAX; |
164 | ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); docky_cfg.ashow = EAX; |
172 | ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0); docky_cfg.ashow = EAX; |
165 | } |
173 | } |
166 | 174 | ||
167 | void SaveCfg() |
175 | void SaveCfg(byte panel_type) |
168 | { |
176 | { |
169 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "Attachment", taskbar_cfg.Attachment); |
177 | if (panel_type==TASKBAR) { |
170 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "PanelHeigh", taskbar_cfg.PanelHeigh); |
178 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); |
171 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "SoftenUp", taskbar_cfg.SoftenUp); |
179 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", taskbar_cfg.SoftenUp); |
- | 180 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", taskbar_cfg.SoftenDown); |
|
- | 181 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", taskbar_cfg.MinLeftButton); |
|
- | 182 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", taskbar_cfg.MinRightButton); |
|
- | 183 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", taskbar_cfg.RunApplButton); |
|
172 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "SoftenDown", taskbar_cfg.SoftenDown); |
184 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", taskbar_cfg.ClnDeskButton); |
- | 185 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", taskbar_cfg.Clock); |
|
173 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "MinLeftButton", taskbar_cfg.MinLeftButton); |
186 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", taskbar_cfg.CpuUsage); |
174 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "MinRightButton", taskbar_cfg.MinRightButton); |
187 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", taskbar_cfg.ChangeLang); |
175 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "RunApplButton", taskbar_cfg.RunApplButton); |
188 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", taskbar_cfg.MenuButton); |
176 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "ClnDeskButton", taskbar_cfg.ClnDeskButton); |
189 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", taskbar_cfg.PanelHeight); |
177 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "Clock", taskbar_cfg.Clock); |
190 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", taskbar_cfg.SoftenHeight); |
- | 191 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", taskbar_cfg.ButtonOffset); |
|
Line 178... | Line 192... | ||
178 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "CpuUsage", taskbar_cfg.CpuUsage); |
192 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", taskbar_cfg.ButtonOffset); |
179 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "ChangeLang", taskbar_cfg.ChangeLang); |
193 | } |
180 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "MenuButton", taskbar_cfg.MenuButton); |
194 | if (panel_type==DOCKY) { |
- | 195 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", taskbar_cfg.Attachment); |
|
181 | 196 | ini_set_int stdcall (#docky_ini_path, "@", "location", docky_cfg.location); |
|
- | 197 | ini_set_int stdcall (#docky_ini_path, "@", "fsize", docky_cfg.fsize); |
|
- | 198 | ini_set_int stdcall (#docky_ini_path, "@", "ashow", docky_cfg.ashow); |
|
182 | ini_set_int stdcall (#taskbar_ini_path, #taskbar_category, "Attachment", taskbar_cfg.Attachment); |
199 | } |
183 | ini_set_int stdcall (#docky_ini_path, "@", "location", docky_cfg.location); |
200 | } |
184 | ini_set_int stdcall (#docky_ini_path, "@", "fsize", docky_cfg.fsize); |
201 | |
185 | ini_set_int stdcall (#docky_ini_path, "@", "ashow", docky_cfg.ashow); |
202 | void RestartProcess(byte panel_type) |
186 | } |
203 | { |
187 | 204 | int i; |
|
Line -... | Line 205... | ||
- | 205 | dword proc_name; |
|
188 | void RestartProcess(dword proc_name) |
206 | proc_info Process; |
189 | { |
207 | if (panel_type == TASKBAR) proc_name = "@taskbar"; |
190 | int i, slot; |
208 | if (panel_type == DOCKY) proc_name = "@docky"; |
191 | proc_info Process; |
- | |
192 | for (i=0; i<1000; i++;) |
209 | for (i=0; i<1000; i++;) |
Line -... | Line 210... | ||
- | 210 | { |
|
- | 211 | GetProcessInfo(#Process, i); |
|
193 | { |
212 | if (strcmpi(#Process.name, proc_name)==0) { KillProcess(Process.ID); break; } |
194 | GetProcessInfo(#Process, i); |
213 | } |
195 | if (strcmpi(#Process.name, proc_name)==0) { KillProcess(Process.ID); break; } |
214 | RunProgram(proc_name, ""); |
Line -... | Line 215... | ||
- | 215 | ||
- | 216 | if (panel_type == TASKBAR) pause(50); |
|
- | 217 | if (panel_type == DOCKY) pause(120); |
|
- | 218 | GetProcessInfo(#Form, SelfInfo); |
|
- | 219 | ActivateWindow(GetProcessSlot(Form.ID)); |
|
196 | } |
220 | } |
197 | RunProgram(proc_name, ""); |
221 |