Subversion Repositories Kolibri OS

Rev

Rev 7227 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7227 Rev 7243
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\fs.h"
9
#include "..\lib\fs.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.h"
13
#include "..\lib\obj\libio.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
char taskbar_ini_path[] = "/sys/settings/taskbar.ini";
57
char taskbar_ini_path[] = "/sys/settings/taskbar.ini";
58
_ini taskbar_flags_ini = { #taskbar_ini_path, "Flags" };
58
_ini taskbar_flags_ini = { #taskbar_ini_path, "Flags" };
59
_ini taskbar_vars_ini = { #taskbar_ini_path, "Variables" };
59
_ini taskbar_vars_ini = { #taskbar_ini_path, "Variables" };
60
 
60
 
61
_ini docky_ini = { "/sys/settings/docky.ini", "@" };
61
_ini docky_ini = { "/sys/settings/docky.ini", "@" };
62
 
62
 
63
unsigned char panels_img_data[] = FROM "panels_image.raw";
63
unsigned char panels_img_data[] = FROM "panels_image.raw";
64
raw_image panels_img = { 37, 27, #panels_img_data };
64
raw_image panels_img = { 37, 27, #panels_img_data };
65
 
65
 
66
proc_info Form;
66
proc_info Form;
67
 
67
 
68
word dkFsize;
68
word dkFsize;
69
byte dkLocation, dkAshow;
69
byte dkLocation, dkAshow;
70
 
-
 
71
byte tbAttachment, tbPanelHeight, tbSoftenHeight, tbButtonOffset,
70
 
72
     tbSoftenUp, tbSoftenDown, tbMinLeftButton, tbMinRightButton, tbMenuButton,
71
byte tbAttachment, tbSoftenUp, tbSoftenDown, tbMinLeftButton, tbMinRightButton,
73
     tbRunApplButton, tbClnDeskButton, tbClock, tbCpuUsage, tbChangeLang;
72
tbMenuButton, tbRunApplButton, tbClnDeskButton, tbClock, tbCpuUsage, tbChangeLang;
74
 
73
 
75
enum {
74
enum {
76
	TASKBAR,
75
	TASKBAR,
77
	DOCKY,
76
	DOCKY,
78
	ALL
77
	ALL
79
};
78
};
-
 
79
 
-
 
80
more_less_box tbPanelHeight  = { NULL, 6, 99, PANEL_HEIGHT };
-
 
81
more_less_box tbSoftenHeight = { NULL, 0, 99, SOFTEN_HEIGHT };
80
 
82
more_less_box tbButtonOffset = { NULL, 0, 99, BUTTON_OFFSET };
81
 
83
 
82
void main()
84
void main()
83
{
85
{
84
	dword id, key;
86
	dword id, key;
85
 
87
 
86
	load_dll(libini, #lib_init,1);
88
	load_dll(libini, #lib_init,1);
87
	load_dll(boxlib, #box_lib_init,0);
89
	load_dll(boxlib, #box_lib_init,0);
88
 
90
 
89
	LoadCfg();
91
	LoadCfg();
90
 
92
 
91
	loop() switch(WaitEvent())
93
	loop() switch(WaitEvent())
92
	{
94
	{
93
		case evButton: 
95
		case evButton: 
94
				id=GetButtonID();
96
				id=GetButtonID();
95
				if (id==1) ExitProcess();
97
				if (id==1) ExitProcess();
96
				//taskbar buttons
98
				//taskbar buttons
97
				if (id>=100) && (id<200)
99
				if (id>=100) && (id<200)
98
				{
100
				{
99
					if (id==100) tbAttachment ^= 1;
101
					if (id==100) tbAttachment ^= 1;
100
					if (id==105) tbSoftenUp ^= 1;
102
					if (id==105) tbSoftenUp ^= 1;
101
					if (id==106) tbSoftenDown ^= 1;
103
					if (id==106) tbSoftenDown ^= 1;
102
					if (id==107) tbMinLeftButton ^= 1;
104
					if (id==107) tbMinLeftButton ^= 1;
103
					if (id==108) tbMinRightButton ^= 1;
105
					if (id==108) tbMinRightButton ^= 1;
104
					if (id==109) tbRunApplButton ^= 1;
106
					if (id==109) tbRunApplButton ^= 1;
105
					if (id==110) tbClnDeskButton ^= 1;
107
					if (id==110) tbClnDeskButton ^= 1;
106
					if (id==111) tbClock ^= 1;
108
					if (id==111) tbClock ^= 1;
107
					if (id==112) tbCpuUsage ^= 1;
109
					if (id==112) tbCpuUsage ^= 1;
108
					if (id==113) tbChangeLang ^= 1;
110
					if (id==113) tbChangeLang ^= 1;
109
					if (id==114) tbMenuButton ^= 1;
111
					if (id==114) tbMenuButton ^= 1;
110
					if (id==120) tbPanelHeight++;
112
					tbPanelHeight.click(id);
111
					if (id==121) && (tbPanelHeight>6) tbPanelHeight--;
-
 
112
					if (id==122) tbSoftenHeight++;
113
					tbSoftenHeight.click(id);
113
					if (id==123) && (tbSoftenHeight>0) tbSoftenHeight--;
-
 
114
					if (id==124) tbButtonOffset++;
114
					tbButtonOffset.click(id);
115
					if (id==125) && (tbButtonOffset>0) tbButtonOffset--;
-
 
116
					DrawWindowContent(TASKBAR);
115
					DrawWindowContent(TASKBAR);
117
					SaveCfg(TASKBAR);
116
					SaveCfg(TASKBAR);
118
					RestartProcess(TASKBAR);
117
					RestartProcess(TASKBAR);
119
				}
118
				}
120
				//docky buttons			
119
				//docky buttons			
121
				if (id>=200)
120
				if (id>=200)
122
				{
121
				{
123
					if (id==200)
122
					if (id==200)
124
					{
123
					{
125
						dkLocation++;
124
						dkLocation++;
126
						if (dkLocation>3) dkLocation=1;
125
						if (dkLocation>3) dkLocation=1;
127
					}
126
					}
128
					if (id==201) dkFsize ^= 1;
127
					if (id==201) dkFsize ^= 1;
129
					if (id==202) dkAshow ^= 1;
128
					if (id==202) dkAshow ^= 1;
130
					DrawWindowContent(DOCKY);
129
					DrawWindowContent(DOCKY);
131
					SaveCfg(DOCKY);
130
					SaveCfg(DOCKY);
132
					RestartProcess(DOCKY);
131
					RestartProcess(DOCKY);
133
				}
132
				}
134
				break;
133
				break;
135
				
134
				
136
		case evKey:
135
		case evKey:
137
				key = GetKey();
136
				key = GetKey();
138
				if (key==27) ExitProcess();
137
				if (key==27) ExitProcess();
139
				break;
138
				break;
140
			
139
			
141
		case evReDraw:
140
		case evReDraw:
142
				system.color.get();
141
				system.color.get();
143
				DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, system.color.work, WINDOW_TITLE, 0);
142
				DefineAndDrawWindow(130, 150, 465, 398 + skin_height, 0x34, system.color.work, WINDOW_TITLE, 0);
144
				GetProcessInfo(#Form, SelfInfo);
143
				GetProcessInfo(#Form, SelfInfo);
145
				if (Form.status_window>2) break;
144
				if (Form.status_window>2) break;
146
				DrawWindowContent(ALL);
145
				DrawWindowContent(ALL);
147
	}
146
	}
148
}
147
}
149
 
-
 
150
 
148
 
151
void DrawWindowContent(byte panel_type)
149
void DrawWindowContent(byte panel_type)
152
{
150
{
153
	#define PD 10
151
	#define PD 10
154
	dword frame_y;
152
	dword frame_y;
155
	word win_center_x = Form.cwidth / 2 + 20;
153
	word win_center_x = Form.cwidth / 2 + 20;
156
	incn y;
154
	incn y;
157
 
155
 
158
	if (panel_type==ALL) || (panel_type==TASKBAR)
156
	if (panel_type==ALL) || (panel_type==TASKBAR)
159
	{
157
	{
160
		frame_y = 15;
158
		frame_y = 15;
161
		y.n = frame_y;
159
		y.n = frame_y;
162
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
160
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
163
		_PutImage(22, y.n, 37, 27, tbAttachment * 37 * 27 * 3 + panels_img.data);
161
		_PutImage(22, y.n, 37, 27, tbAttachment * 37 * 27 * 3 + panels_img.data);
164
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
162
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
165
		CheckBox(22, y.inc(35), 105, SOFTEN_UP, tbSoftenUp);
163
		CheckBox(22, y.inc(35), 105, SOFTEN_UP, tbSoftenUp);
166
		CheckBox(win_center_x, y.n, 111, CLOCK, tbClock);
164
		CheckBox(win_center_x, y.n, 111, CLOCK, tbClock);
167
		CheckBox(22, y.inc(24), 106, SOFTEN_DOWN, tbSoftenDown);
165
		CheckBox(22, y.inc(24), 106, SOFTEN_DOWN, tbSoftenDown);
168
		CheckBox(win_center_x, y.n, 112, CPU_USAGE, tbCpuUsage);
166
		CheckBox(win_center_x, y.n, 112, CPU_USAGE, tbCpuUsage);
169
		CheckBox(22, y.inc(24), 107, MIN_LEFT_BUTTON, tbMinLeftButton);
167
		CheckBox(22, y.inc(24), 107, MIN_LEFT_BUTTON, tbMinLeftButton);
170
		CheckBox(win_center_x, y.n, 113, CHANGE_LANG, tbChangeLang);
168
		CheckBox(win_center_x, y.n, 113, CHANGE_LANG, tbChangeLang);
171
		CheckBox(22, y.inc(24), 108, MIN_RIGHT_BUTTON, tbMinRightButton);
169
		CheckBox(22, y.inc(24), 108, MIN_RIGHT_BUTTON, tbMinRightButton);
172
		CheckBox(win_center_x, y.n, 114, MENU_BUTTON, tbMenuButton);	
170
		CheckBox(win_center_x, y.n, 114, MENU_BUTTON, tbMenuButton);	
173
		MoreLessBox(22, y.inc(28), 120, 121, tbPanelHeight, PANEL_HEIGHT);
171
		tbPanelHeight.draw(22, y.inc(28));
174
		MoreLessBox(22, y.inc(32), 122, 123, tbSoftenHeight, SOFTEN_HEIGHT);
172
		tbSoftenHeight.draw(22, y.inc(32));
175
		MoreLessBox(22, y.inc(32), 124, 125, tbButtonOffset, BUTTON_OFFSET);
173
		tbButtonOffset.draw(22, y.inc(32));
176
		DrawFrame(PD, frame_y, Form.cwidth-PD-PD, y.inc(32)-frame_y, TASK_FRAME_T);
174
		DrawFrame(PD, frame_y, Form.cwidth-PD-PD, y.inc(32)-frame_y, TASK_FRAME_T);
177
	}
175
	}
178
	if (panel_type==ALL) || (panel_type==DOCKY)
176
	if (panel_type==ALL) || (panel_type==DOCKY)
179
	{
177
	{
180
		frame_y = calc(y.inc(20));
178
		frame_y = calc(y.inc(20));
181
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
179
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
182
		_PutImage(22, y.n,  37, 27, dkLocation + 1 * 37 * 27 * 3 + panels_img.data);
180
		_PutImage(22, y.n,  37, 27, dkLocation + 1 * 37 * 27 * 3 + panels_img.data);
183
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
181
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
184
		CheckBox(22, y.inc(35), 201, FSIZE,  dkFsize);
182
		CheckBox(22, y.inc(35), 201, FSIZE,  dkFsize);
185
		CheckBox(win_center_x, y.n, 202, ASHOW, dkAshow);
183
		CheckBox(win_center_x, y.n, 202, ASHOW, dkAshow);
186
		DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T);
184
		DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T);
187
	}
185
	}
188
}
186
}
189
 
187
 
190
void LoadCfg()
188
void LoadCfg()
191
{ 
189
{ 
192
	tbAttachment     = taskbar_flags_ini.GetInt("Attachment", 1);    
190
	tbAttachment     = taskbar_flags_ini.GetInt("Attachment", 1);    
193
	tbSoftenUp       = taskbar_flags_ini.GetInt("SoftenUp", 1);      
191
	tbSoftenUp       = taskbar_flags_ini.GetInt("SoftenUp", 1);      
194
	tbSoftenDown     = taskbar_flags_ini.GetInt("SoftenDown", 1);    
192
	tbSoftenDown     = taskbar_flags_ini.GetInt("SoftenDown", 1);    
195
	tbMinLeftButton  = taskbar_flags_ini.GetInt("MinLeftButton", 1); 
193
	tbMinLeftButton  = taskbar_flags_ini.GetInt("MinLeftButton", 1); 
196
	tbMinRightButton = taskbar_flags_ini.GetInt("MinRightButton", 1);
194
	tbMinRightButton = taskbar_flags_ini.GetInt("MinRightButton", 1);
197
	tbClock          = taskbar_flags_ini.GetInt("Clock", 1);         
195
	tbClock          = taskbar_flags_ini.GetInt("Clock", 1);         
198
	tbCpuUsage       = taskbar_flags_ini.GetInt("CpuUsage", 1);      
196
	tbCpuUsage       = taskbar_flags_ini.GetInt("CpuUsage", 1);      
199
	tbChangeLang     = taskbar_flags_ini.GetInt("ChangeLang", 1);    
197
	tbChangeLang     = taskbar_flags_ini.GetInt("ChangeLang", 1);    
200
	tbMenuButton     = taskbar_flags_ini.GetInt("MenuButton", 1);    
198
	tbMenuButton     = taskbar_flags_ini.GetInt("MenuButton", 1);    
201
	tbPanelHeight  = taskbar_vars_ini.GetInt("PanelHeight", 18);   
199
	tbPanelHeight.value  = taskbar_vars_ini.GetInt("PanelHeight", 28);
202
	tbSoftenHeight = taskbar_vars_ini.GetInt("SoftenHeight", 4);   
200
	tbSoftenHeight.value = taskbar_vars_ini.GetInt("SoftenHeight", 4);   
203
	tbButtonOffset = taskbar_vars_ini.GetInt("ButtonTopOffset", 3);
201
	tbButtonOffset.value = taskbar_vars_ini.GetInt("ButtonTopOffset", 3);
204
	tbButtonOffset = taskbar_vars_ini.GetInt("ButtonBotOffset", 3);
202
	tbButtonOffset.value = taskbar_vars_ini.GetInt("ButtonBotOffset", 3);
205
 
203
 
206
	dkLocation = docky_ini.GetInt("location", 0);
204
	dkLocation = docky_ini.GetInt("location", 0);
207
	dkFsize = docky_ini.GetInt("fsize", 0);   
205
	dkFsize = docky_ini.GetInt("fsize", 0);   
208
	dkAshow = docky_ini.GetInt("ashow", 0);   
206
	dkAshow = docky_ini.GetInt("ashow", 0);   
209
}
207
}
210
 
208
 
211
void SaveCfg(byte panel_type)
209
void SaveCfg(byte panel_type)
212
{
210
{
213
	if (panel_type==TASKBAR) {
211
	if (panel_type==TASKBAR) {
214
		taskbar_flags_ini.SetInt("Attachment", tbAttachment);
212
		taskbar_flags_ini.SetInt("Attachment", tbAttachment);
215
		taskbar_flags_ini.SetInt("SoftenUp", tbSoftenUp);
213
		taskbar_flags_ini.SetInt("SoftenUp", tbSoftenUp);
216
		taskbar_flags_ini.SetInt("SoftenDown", tbSoftenDown);
214
		taskbar_flags_ini.SetInt("SoftenDown", tbSoftenDown);
217
		taskbar_flags_ini.SetInt("MinLeftButton", tbMinLeftButton);
215
		taskbar_flags_ini.SetInt("MinLeftButton", tbMinLeftButton);
218
		taskbar_flags_ini.SetInt("MinRightButton", tbMinRightButton);
216
		taskbar_flags_ini.SetInt("MinRightButton", tbMinRightButton);
219
		taskbar_flags_ini.SetInt("RunApplButton", tbRunApplButton);
217
		taskbar_flags_ini.SetInt("RunApplButton", tbRunApplButton);
220
		taskbar_flags_ini.SetInt("ClnDeskButton", tbClnDeskButton);
218
		taskbar_flags_ini.SetInt("ClnDeskButton", tbClnDeskButton);
221
		taskbar_flags_ini.SetInt("Clock", tbClock);
219
		taskbar_flags_ini.SetInt("Clock", tbClock);
222
		taskbar_flags_ini.SetInt("CpuUsage", tbCpuUsage);
220
		taskbar_flags_ini.SetInt("CpuUsage", tbCpuUsage);
223
		taskbar_flags_ini.SetInt("ChangeLang", tbChangeLang);
221
		taskbar_flags_ini.SetInt("ChangeLang", tbChangeLang);
224
		taskbar_flags_ini.SetInt("MenuButton", tbMenuButton);
222
		taskbar_flags_ini.SetInt("MenuButton", tbMenuButton);
225
		taskbar_vars_ini.SetInt("PanelHeight", tbPanelHeight);
223
		taskbar_vars_ini.SetInt("PanelHeight", tbPanelHeight.value);
226
		taskbar_vars_ini.SetInt("SoftenHeight", tbSoftenHeight);
224
		taskbar_vars_ini.SetInt("SoftenHeight", tbSoftenHeight.value);
227
		taskbar_vars_ini.SetInt("ButtonTopOffset", tbButtonOffset);
225
		taskbar_vars_ini.SetInt("ButtonTopOffset", tbButtonOffset.value);
228
		taskbar_vars_ini.SetInt("ButtonBottOffset", tbButtonOffset);
226
		taskbar_vars_ini.SetInt("ButtonBottOffset", tbButtonOffset.value);
229
	}
227
	}
230
	if (panel_type==DOCKY) {
228
	if (panel_type==DOCKY) {
231
		docky_ini.SetInt("location", dkLocation);
229
		docky_ini.SetInt("location", dkLocation);
232
		docky_ini.SetInt("fsize", dkFsize);
230
		docky_ini.SetInt("fsize", dkFsize);
233
		docky_ini.SetInt("ashow", dkAshow);
231
		docky_ini.SetInt("ashow", dkAshow);
234
	}
232
	}
235
}
233
}
236
 
234
 
237
void RestartProcess(byte panel_type)
235
void RestartProcess(byte panel_type)
238
{
236
{
239
	dword proc_name1;
237
	dword proc_name1;
240
	if (panel_type == TASKBAR)
238
	if (panel_type == TASKBAR)
241
	{
239
	{
242
		RestartProcessByName("@taskbar", SINGLE);
240
		RestartProcessByName("@taskbar", SINGLE);
243
		pause(50);
241
		pause(50);
244
	}
242
	}
245
	else
243
	else
246
	{
244
	{
247
		RestartProcessByName("@docky", SINGLE);
245
		RestartProcessByName("@docky", SINGLE);
248
		pause(120);
246
		pause(120);
249
	}
247
	}
250
	GetProcessInfo(#Form, SelfInfo);
248
	GetProcessInfo(#Form, SelfInfo);
251
	ActivateWindow(GetProcessSlot(Form.ID));
249
	ActivateWindow(GetProcessSlot(Form.ID));
252
}
250
}
253
 
251
 
254
 
252
 
255
 
253
 
256
stop:
254
stop:
257
>
255
>