Subversion Repositories Kolibri OS

Rev

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

Rev 6746 Rev 7049
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.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, 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 };
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
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
 
68
 
69
proc_info Form;
69
proc_info Form;
70
 
70
 
71
word dkFsize;
71
word dkFsize;
72
byte dkLocation, dkAshow;
72
byte dkLocation, dkAshow;
73
 
73
 
74
byte tbAttachment, tbPanelHeight, tbSoftenHeight, tbButtonOffset,
74
byte tbAttachment, tbPanelHeight, tbSoftenHeight, tbButtonOffset,
75
     tbSoftenUp, tbSoftenDown, tbMinLeftButton, tbMinRightButton, tbMenuButton,
75
     tbSoftenUp, tbSoftenDown, tbMinLeftButton, tbMinRightButton, tbMenuButton,
76
     tbRunApplButton, tbClnDeskButton, tbClock, tbCpuUsage, tbChangeLang;
76
     tbRunApplButton, tbClnDeskButton, tbClock, tbCpuUsage, tbChangeLang;
77
 
77
 
78
enum {
78
enum {
79
	TASKBAR,
79
	TASKBAR,
80
	DOCKY,
80
	DOCKY,
81
	ALL
81
	ALL
82
};
82
};
83
 
83
 
84
 
84
 
85
void main()
85
void main()
86
{
86
{
87
	dword id, key;
87
	dword id, key;
88
 
88
 
89
	load_dll(libini, #lib_init,1);
89
	load_dll(libini, #lib_init,1);
90
	load_dll(boxlib, #box_lib_init,0);
90
	load_dll(boxlib, #box_lib_init,0);
91
 
91
 
92
	LoadCfg();
92
	LoadCfg();
93
 
93
 
94
	loop() switch(WaitEvent())
94
	loop() switch(WaitEvent())
95
	{
95
	{
96
		case evButton: 
96
		case evButton: 
97
				id=GetButtonID();
97
				id=GetButtonID();
98
				if (id==1) ExitProcess();
98
				if (id==1) ExitProcess();
99
				//taskbar buttons
99
				//taskbar buttons
100
				if (id>=100) && (id<200)
100
				if (id>=100) && (id<200)
101
				{
101
				{
102
					if (id==100) tbAttachment ^= 1;
102
					if (id==100) tbAttachment ^= 1;
103
					if (id==105) tbSoftenUp ^= 1;
103
					if (id==105) tbSoftenUp ^= 1;
104
					if (id==106) tbSoftenDown ^= 1;
104
					if (id==106) tbSoftenDown ^= 1;
105
					if (id==107) tbMinLeftButton ^= 1;
105
					if (id==107) tbMinLeftButton ^= 1;
106
					if (id==108) tbMinRightButton ^= 1;
106
					if (id==108) tbMinRightButton ^= 1;
107
					if (id==109) tbRunApplButton ^= 1;
107
					if (id==109) tbRunApplButton ^= 1;
108
					if (id==110) tbClnDeskButton ^= 1;
108
					if (id==110) tbClnDeskButton ^= 1;
109
					if (id==111) tbClock ^= 1;
109
					if (id==111) tbClock ^= 1;
110
					if (id==112) tbCpuUsage ^= 1;
110
					if (id==112) tbCpuUsage ^= 1;
111
					if (id==113) tbChangeLang ^= 1;
111
					if (id==113) tbChangeLang ^= 1;
112
					if (id==114) tbMenuButton ^= 1;
112
					if (id==114) tbMenuButton ^= 1;
113
					if (id==120) tbPanelHeight++;
113
					if (id==120) tbPanelHeight++;
114
					if (id==121) && (tbPanelHeight>6) tbPanelHeight--;
114
					if (id==121) && (tbPanelHeight>6) tbPanelHeight--;
115
					if (id==122) tbSoftenHeight++;
115
					if (id==122) tbSoftenHeight++;
116
					if (id==123) && (tbSoftenHeight>0) tbSoftenHeight--;
116
					if (id==123) && (tbSoftenHeight>0) tbSoftenHeight--;
117
					if (id==124) tbButtonOffset++;
117
					if (id==124) tbButtonOffset++;
118
					if (id==125) && (tbButtonOffset>0) tbButtonOffset--;
118
					if (id==125) && (tbButtonOffset>0) tbButtonOffset--;
119
					DrawWindowContent(TASKBAR);
119
					DrawWindowContent(TASKBAR);
120
					SaveCfg(TASKBAR);
120
					SaveCfg(TASKBAR);
121
					RestartProcess(TASKBAR);
121
					RestartProcess(TASKBAR);
122
				}
122
				}
123
				//docky buttons			
123
				//docky buttons			
124
				if (id>=200)
124
				if (id>=200)
125
				{
125
				{
126
					if (id==200)
126
					if (id==200)
127
					{
127
					{
128
						dkLocation++;
128
						dkLocation++;
129
						if (dkLocation>3) dkLocation=1;
129
						if (dkLocation>3) dkLocation=1;
130
					}
130
					}
131
					if (id==201) dkFsize ^= 1;
131
					if (id==201) dkFsize ^= 1;
132
					if (id==202) dkAshow ^= 1;
132
					if (id==202) dkAshow ^= 1;
133
					DrawWindowContent(DOCKY);
133
					DrawWindowContent(DOCKY);
134
					SaveCfg(DOCKY);
134
					SaveCfg(DOCKY);
135
					RestartProcess(DOCKY);
135
					RestartProcess(DOCKY);
136
				}
136
				}
137
				break;
137
				break;
138
				
138
				
139
		case evKey:
139
		case evKey:
140
				key = GetKey();
140
				key = GetKey();
141
				if (key==27) ExitProcess();
141
				if (key==27) ExitProcess();
142
				break;
142
				break;
143
			
143
			
144
		case evReDraw:
144
		case evReDraw:
145
				system.color.get();
145
				system.color.get();
146
				DefineAndDrawWindow(130, 150, 465, 398+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE,0);
146
				DefineAndDrawWindow(130, 150, 465, 398+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE,0);
147
				GetProcessInfo(#Form, SelfInfo);
147
				GetProcessInfo(#Form, SelfInfo);
148
				if (Form.status_window>2) break;
148
				if (Form.status_window>2) break;
149
				taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth;
149
				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;
150
				taskbar_frame.font_color = docky_frame.font_color = system.color.work_text;
151
				taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = system.color.work;
151
				taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = system.color.work;
152
				taskbar_frame.ext_col = docky_frame.ext_col = system.color.work_graph;
152
				taskbar_frame.ext_col = docky_frame.ext_col = system.color.work_graph;
153
				DrawWindowContent(ALL);
153
				DrawWindowContent(ALL);
154
	}
154
	}
155
}
155
}
156
 
156
 
157
 
157
 
158
void DrawWindowContent(byte panel_type)
158
void DrawWindowContent(byte panel_type)
159
{
159
{
160
	word win_center_x = Form.cwidth / 2 + 20;
160
	word win_center_x = Form.cwidth / 2 + 20;
161
	incn y;
161
	incn y;
162
 
162
 
163
	if (panel_type==ALL) || (panel_type==TASKBAR)
163
	if (panel_type==ALL) || (panel_type==TASKBAR)
164
	{
164
	{
165
		y.n = taskbar_frame.start_y;
165
		y.n = taskbar_frame.start_y;
166
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
166
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
167
		_PutImage(22, y.n, 37, 27, tbAttachment * 37 * 27 * 3 + panels_img.data);
167
		_PutImage(22, y.n, 37, 27, tbAttachment * 37 * 27 * 3 + panels_img.data);
168
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
168
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
169
		CheckBox(22, y.inc(35), 105, SOFTEN_UP, tbSoftenUp);
169
		CheckBox(22, y.inc(35), 105, SOFTEN_UP, tbSoftenUp);
170
		CheckBox(win_center_x, y.n, 111, CLOCK, tbClock);
170
		CheckBox(win_center_x, y.n, 111, CLOCK, tbClock);
171
		CheckBox(22, y.inc(24), 106, SOFTEN_DOWN, tbSoftenDown);
171
		CheckBox(22, y.inc(24), 106, SOFTEN_DOWN, tbSoftenDown);
172
		CheckBox(win_center_x, y.n, 112, CPU_USAGE, tbCpuUsage);
172
		CheckBox(win_center_x, y.n, 112, CPU_USAGE, tbCpuUsage);
173
		CheckBox(22, y.inc(24), 107, MIN_LEFT_BUTTON, tbMinLeftButton);
173
		CheckBox(22, y.inc(24), 107, MIN_LEFT_BUTTON, tbMinLeftButton);
174
		CheckBox(win_center_x, y.n, 113, CHANGE_LANG, tbChangeLang);
174
		CheckBox(win_center_x, y.n, 113, CHANGE_LANG, tbChangeLang);
175
		CheckBox(22, y.inc(24), 108, MIN_RIGHT_BUTTON, tbMinRightButton);
175
		CheckBox(22, y.inc(24), 108, MIN_RIGHT_BUTTON, tbMinRightButton);
176
		CheckBox(win_center_x, y.n, 114, MENU_BUTTON, tbMenuButton);	
176
		CheckBox(win_center_x, y.n, 114, MENU_BUTTON, tbMenuButton);	
177
		MoreLessBox(22, y.inc(28), 120, 121, tbPanelHeight, PANEL_HEIGHT);
177
		MoreLessBox(22, y.inc(28), 120, 121, tbPanelHeight, PANEL_HEIGHT);
178
		MoreLessBox(22, y.inc(32), 122, 123, tbSoftenHeight, SOFTEN_HEIGHT);
178
		MoreLessBox(22, y.inc(32), 122, 123, tbSoftenHeight, SOFTEN_HEIGHT);
179
		MoreLessBox(22, y.inc(32), 124, 125, tbButtonOffset, BUTTON_OFFSET);
179
		MoreLessBox(22, y.inc(32), 124, 125, tbButtonOffset, BUTTON_OFFSET);
180
		taskbar_frame.size_y = y.inc(32) - taskbar_frame.start_y;
180
		taskbar_frame.size_y = y.inc(32) - taskbar_frame.start_y;
181
	}
181
	}
182
	if (panel_type==ALL) || (panel_type==DOCKY)
182
	if (panel_type==ALL) || (panel_type==DOCKY)
183
	{
183
	{
184
		docky_frame.start_y = y.inc(20);
184
		docky_frame.start_y = y.inc(20);
185
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
185
		DefineButton(22, y.inc(18), panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
186
		_PutImage(22, y.n,  37, 27, dkLocation + 1 * 37 * 27 * 3 + panels_img.data);
186
		_PutImage(22, y.n,  37, 27, dkLocation + 1 * 37 * 27 * 3 + panels_img.data);
187
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
187
		WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS);
188
		CheckBox(22, y.inc(35), 201, FSIZE,  dkFsize);
188
		CheckBox(22, y.inc(35), 201, FSIZE,  dkFsize);
189
		CheckBox(win_center_x, y.n, 202, ASHOW, dkAshow);
189
		CheckBox(win_center_x, y.n, 202, ASHOW, dkAshow);
190
		docky_frame.size_y = y.inc(30) - docky_frame.start_y;
190
		docky_frame.size_y = y.inc(30) - docky_frame.start_y;
191
	}
191
	}
192
	if (panel_type==ALL)
192
	if (panel_type==ALL)
193
	{
193
	{
194
		frame_draw stdcall (#taskbar_frame);
194
		frame_draw stdcall (#taskbar_frame);
195
		frame_draw stdcall (#docky_frame);
195
		frame_draw stdcall (#docky_frame);
196
	}
196
	}
197
}
197
}
198
 
198
 
199
void LoadCfg()
199
void LoadCfg()
200
{ 
200
{ 
201
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1);     tbAttachment = EAX;
201
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", 1);     tbAttachment = EAX;
202
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1);       tbSoftenUp = EAX;
202
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", 1);       tbSoftenUp = EAX;
203
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1);     tbSoftenDown = EAX;
203
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", 1);     tbSoftenDown = EAX;
204
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1);  tbMinLeftButton = EAX;
204
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", 1);  tbMinLeftButton = EAX;
205
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); tbMinRightButton = EAX;
205
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", 1); tbMinRightButton = EAX;
206
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1);          tbClock = EAX;
206
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", 1);          tbClock = EAX;
207
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1);       tbCpuUsage = EAX;
207
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", 1);       tbCpuUsage = EAX;
208
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1);     tbChangeLang = EAX;
208
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", 1);     tbChangeLang = EAX;
209
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1);     tbMenuButton = EAX;
209
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", 1);     tbMenuButton = EAX;
210
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18);    tbPanelHeight = EAX;
210
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", 18);    tbPanelHeight = EAX;
211
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4);    tbSoftenHeight = EAX;
211
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", 4);    tbSoftenHeight = EAX;
212
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); tbButtonOffset = EAX;
212
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", 3); tbButtonOffset = EAX;
213
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); tbButtonOffset = EAX;
213
	ini_get_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBotOffset", 3); tbButtonOffset = EAX;
214
 
214
 
215
	ini_get_int stdcall (#docky_ini_path, "@", "location", 0);  dkLocation = EAX;
215
	ini_get_int stdcall (#docky_ini_path, "@", "location", 0);  dkLocation = EAX;
216
	ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0);     dkFsize = EAX;
216
	ini_get_int stdcall (#docky_ini_path, "@", "fsize", 0);     dkFsize = EAX;
217
	ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0);     dkAshow = EAX;
217
	ini_get_int stdcall (#docky_ini_path, "@", "ashow", 0);     dkAshow = EAX;
218
}
218
}
219
 
219
 
220
void SaveCfg(byte panel_type)
220
void SaveCfg(byte panel_type)
221
{
221
{
222
	if (panel_type==TASKBAR) {
222
	if (panel_type==TASKBAR) {
223
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment);
223
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment);
224
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", tbSoftenUp);
224
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenUp", tbSoftenUp);
225
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", tbSoftenDown);
225
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "SoftenDown", tbSoftenDown);
226
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", tbMinLeftButton);
226
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinLeftButton", tbMinLeftButton);
227
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", tbMinRightButton);
227
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MinRightButton", tbMinRightButton);
228
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", tbRunApplButton);
228
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "RunApplButton", tbRunApplButton);
229
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", tbClnDeskButton);
229
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ClnDeskButton", tbClnDeskButton);
230
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", tbClock);
230
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Clock", tbClock);
231
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", tbCpuUsage);
231
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "CpuUsage", tbCpuUsage);
232
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", tbChangeLang);
232
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "ChangeLang", tbChangeLang);
233
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", tbMenuButton);
233
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "MenuButton", tbMenuButton);
234
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", tbPanelHeight);
234
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "PanelHeight", tbPanelHeight);
235
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", tbSoftenHeight);
235
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "SoftenHeight", tbSoftenHeight);
236
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", tbButtonOffset);
236
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonTopOffset", tbButtonOffset);
237
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", tbButtonOffset);
237
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_variables, "ButtonBottOffset", tbButtonOffset);
238
	}
238
	}
239
	if (panel_type==DOCKY) {
239
	if (panel_type==DOCKY) {
240
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment);
240
		ini_set_int stdcall (#taskbar_ini_path, #taskbar_c_flags, "Attachment", tbAttachment);
241
		ini_set_int stdcall (#docky_ini_path, "@", "location", dkLocation);
241
		ini_set_int stdcall (#docky_ini_path, "@", "location", dkLocation);
242
		ini_set_int stdcall (#docky_ini_path, "@", "fsize", dkFsize);
242
		ini_set_int stdcall (#docky_ini_path, "@", "fsize", dkFsize);
243
		ini_set_int stdcall (#docky_ini_path, "@", "ashow", dkAshow);
243
		ini_set_int stdcall (#docky_ini_path, "@", "ashow", dkAshow);
244
	}
244
	}
245
}
245
}
246
 
246
 
247
void RestartProcess(byte panel_type)
247
void RestartProcess(byte panel_type)
248
{
248
{
249
	dword proc_name1;
249
	dword proc_name1;
250
	if (panel_type == TASKBAR)
250
	if (panel_type == TASKBAR)
251
	{
251
	{
252
		RestartProcessByName("@taskbar", SINGLE);
252
		RestartProcessByName("@taskbar", SINGLE);
253
		pause(50);
253
		pause(50);
254
	}
254
	}
255
	else
255
	else
256
	{
256
	{
257
		RestartProcessByName("@docky", SINGLE);
257
		RestartProcessByName("@docky", SINGLE);
258
		pause(120);
258
		pause(120);
259
	}
259
	}
260
	GetProcessInfo(#Form, SelfInfo);
260
	GetProcessInfo(#Form, SelfInfo);
261
	ActivateWindow(GetProcessSlot(Form.ID));
261
	ActivateWindow(GetProcessSlot(Form.ID));
262
}
262
}
263
 
263
 
264
 
264
 
265
 
265
 
266
stop:
266
stop:
267
>
267
>