Subversion Repositories Kolibri OS

Rev

Rev 7928 | Rev 7995 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7928 Rev 7984
Line 93... Line 93...
93
checkbox tbClnDeskButton;
93
checkbox tbClnDeskButton;
Line 94... Line 94...
94
 
94
 
95
 
95
 
96
void main()
96
void main()
Line 97... Line 97...
97
{
97
{
98
	dword id, key;
98
	dword id;
Line 99... Line 99...
99
 
99
 
Line 100... Line 100...
100
	load_dll(libini, #lib_init,1);
100
	load_dll(libini, #lib_init,1);
101
	load_dll(boxlib, #box_lib_init,0);
101
	load_dll(boxlib, #box_lib_init,0);
102
 
102
 
103
	LoadCfg();
103
	LoadCfg();
104
 
104
 
Line 105... Line 105...
105
	loop() switch(WaitEvent())
105
	loop() switch(@WaitEvent())
106
	{
106
	{
Line 107... Line 107...
107
		case evButton: 
107
		case evButton: 
108
				id=GetButtonID();
108
				id = @GetButtonID();
109
				if (1==id) ExitProcess();
109
				if (1==id) @ExitProcess();
110
 
-
 
111
				if (taskbar_on.checked) EventTaskbarProcessButton(id);
-
 
112
				if (docky_on.checked) EventDockyProcessButton(id);
-
 
113
 
-
 
114
				if (taskbar_on.click(id)) {
-
 
115
					IF (taskbar_on.checked == true) RunProgram("/sys/@taskbar", 0);
-
 
116
					ELSE KillProcessByName("@TASKBAR", SINGLE);
-
 
117
					EAX = taskbar_on.checked ^ 1;
-
 
118
					tbSoftenUp.disabled = EAX;
-
 
119
					tbSoftenDown.disabled = EAX;
-
 
120
					tbMinLeftButton.disabled = EAX;
-
 
121
					tbMinRightButton.disabled = EAX;
-
 
122
					tbRunApplButton.disabled = EAX;
-
 
123
					tbClnDeskButton.disabled = EAX;
-
 
124
					tbClock.disabled = EAX;
-
 
125
					tbCpuUsage.disabled = EAX;
110
 
126
					tbChangeLang.disabled = EAX;
111
				if (taskbar_on.checked) EventTaskbarProcessButton(id);
127
					tbMenuButton.disabled = EAX;
112
				if (docky_on.checked) EventDockyProcessButton(id);
128
					tbPanelHeight.disabled = EAX;
113
 
129
					tbSoftenHeight.disabled = EAX;
114
				if (taskbar_on.click(id)) {
130
					tbButtonOffset.disabled = EAX;
-
 
131
					tbButtonOffset.disabled = EAX;
-
 
132
					DrawWindowContent();
115
					IF (taskbar_on.checked == true) RunProgram("/sys/@taskbar", 0);
133
				}
116
					ELSE KillProcessByName("@TASKBAR", SINGLE);
134
				if (docky_on.click(id)) {
117
					DrawWindowContent();
Line 135... Line 118...
135
					IF (docky_on.checked == true) RunProgram("/sys/@docky", 0);
118
				}
136
					ELSE KillProcessByName("@DOCKY", SINGLE);
-
 
137
					dkFsize.disabled = docky_on.checked ^ 1;
119
				if (docky_on.click(id)) {
138
					dkAshow.disabled = docky_on.checked ^ 1;
120
					IF (docky_on.checked == true) RunProgram("/sys/@docky", 0);
Line 139... Line 121...
139
					DrawWindowContent();
121
					ELSE KillProcessByName("@DOCKY", SINGLE);
140
				}
122
					DrawWindowContent();
141
				break;
123
				}
Line 157... Line 139...
157
void DrawPanelsImage(dword y, n)
139
void DrawPanelsImage(dword y, n)
158
{
140
{
159
	_PutImage(22, y, PIMG_W, PIMG_H, n * PIMG_W * PIMG_H * 3 + #panels_img_data);
141
	_PutImage(22, y, PIMG_W, PIMG_H, n * PIMG_W * PIMG_H * 3 + #panels_img_data);
160
}
142
}
Line -... Line 143...
-
 
143
 
-
 
144
void SetDisabledMode()
-
 
145
{
-
 
146
	EAX = taskbar_on.checked ^ 1;
-
 
147
	tbSoftenUp.disabled = 
-
 
148
	tbSoftenDown.disabled = 
-
 
149
	tbMinLeftButton.disabled = 
-
 
150
	tbMinRightButton.disabled = 
-
 
151
	tbRunApplButton.disabled = 
-
 
152
	tbClnDeskButton.disabled = 
-
 
153
	tbClock.disabled = 
-
 
154
	tbCpuUsage.disabled = 
-
 
155
	tbChangeLang.disabled = 
-
 
156
	tbMenuButton.disabled = 
-
 
157
	tbPanelHeight.disabled = 
-
 
158
	tbSoftenHeight.disabled = 
-
 
159
	tbButtonOffset.disabled = 
-
 
160
	tbButtonOffset.disabled = EAX;
-
 
161
	//
-
 
162
	dkFsize.disabled = 
-
 
163
	dkAshow.disabled = docky_on.checked ^ 1;	
-
 
164
}
161
 
165
 
162
void DrawWindowContent()
166
void DrawWindowContent()
163
{
167
{
164
	#define PD 10
168
	#define PD 10
165
	dword frame_y;
169
	dword frame_y;
166
	word win_center_x = Form.cwidth / 2 + 20;
170
	word win_center_x = Form.cwidth / 2 + 20;
Line -... Line 171...
-
 
171
	incn y;
-
 
172
 
167
	incn y;
173
	SetDisabledMode();
168
 
174
 
169
	frame_y = 15;
175
	frame_y = 15;
170
	y.n = frame_y;
176
	y.n = frame_y;
171
	DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0);
177
	DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0);