Subversion Repositories Kolibri OS

Rev

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

Rev 2630 Rev 5452
1
;-----------------------------------------------------------------------------
1
;-----------------------------------------------------------------------------
2
Get_ini:
2
Get_ini:
3
	stdcall dll.Init,[lib_init]	
3
	stdcall dll.Init,[lib_init]	
4
	
4
	
5
	mov	ebx,ini_file_name
5
	mov	ebx,ini_file_name
6
	mov	esi,path
6
	mov	esi,path
7
	mov	edi,library_path
7
	mov	edi,library_path
8
	call	copy_file_path
8
	call	copy_file_path
9
;------------------------------------------------------------------------------	
9
;------------------------------------------------------------------------------	
10
; Get panel variables
10
; Get taskbar variables
11
;------------------------------------------------------------------------------
11
;------------------------------------------------------------------------------
12
	invoke	ini_get_int,library_path,aVariables,aPanelHeight,20
12
	invoke	ini_get_int,library_path,aVariables,aPanelHeight,20
13
	cmp     eax,100
13
	cmp     eax,100
14
	ja      @f
14
	ja      @f
15
 
15
 
16
	cmp     eax,10
16
	cmp     eax,10
17
	ja      .height
17
	ja      .height
18
@@:
18
@@:
19
	mov     eax,20
19
	mov     eax,20
20
.height:
20
.height:
21
	mov	[height],eax
21
	mov	[height],eax
22
;--------------------------------------
22
;--------------------------------------
23
	invoke	ini_get_int,library_path,aVariables,aPanelWidth,0
23
	invoke	ini_get_int,library_path,aVariables,aPanelWidth,0
24
	cmp     eax,200
24
	cmp     eax,200
25
	ja      @f
25
	ja      @f
26
 
26
 
27
	mov     eax,0
27
	mov     eax,0
28
@@:
28
@@:
29
	mov	[width],eax
29
	mov	[width],eax
30
;--------------------------------------
30
;--------------------------------------
31
	invoke	ini_get_int,library_path,aVariables,aSoftenHeight,3
31
	invoke	ini_get_int,library_path,aVariables,aSoftenHeight,3
32
	cmp     eax,10
32
	cmp     eax,10
33
	ja      @f
33
	ja      @f
34
 
34
 
35
	cmp     eax,1
35
	cmp     eax,1
36
	ja      .soften_height
36
	ja      .soften_height
37
@@:
37
@@:
38
	mov     eax,3
38
	mov     eax,3
39
.soften_height:
39
.soften_height:
40
	mov	[soften_height],eax
40
	mov	[soften_height],eax
41
;--------------------------------------
41
;--------------------------------------
42
	invoke	ini_get_int,library_path,aVariables,aButtonTopOffset,3
42
	invoke	ini_get_int,library_path,aVariables,aButtonTopOffset,3
43
	cmp     eax,10
43
	cmp     eax,10
44
	ja      @f
44
	ja      @f
45
 
45
 
46
	cmp     eax,1
46
	cmp     eax,1
47
	ja      .button_top_offset
47
	ja      .button_top_offset
48
@@:
48
@@:
49
	mov     eax,3
49
	mov     eax,3
50
.button_top_offset:
50
.button_top_offset:
51
	mov	[button_top_offset],eax
51
	mov	[button_top_offset],eax
52
;--------------------------------------
52
;--------------------------------------
53
	invoke	ini_get_int,library_path,aVariables,aButtonBottomOffset,3
53
	invoke	ini_get_int,library_path,aVariables,aButtonBottomOffset,3
54
	cmp     eax,10
54
	cmp     eax,10
55
	ja      @f
55
	ja      @f
56
 
56
 
57
	cmp     eax,1
57
	cmp     eax,1
58
	ja      .button_bottom_offset
58
	ja      .button_bottom_offset
59
@@:
59
@@:
60
	mov     eax,3
60
	mov     eax,3
61
.button_bottom_offset:
61
.button_bottom_offset:
62
	mov	[button_bottom_offset],eax
62
	mov	[button_bottom_offset],eax
63
;------------------------------------------------------------------------------
63
;------------------------------------------------------------------------------
64
; Get panel flags
64
; Get taskbar flags
65
;------------------------------------------------------------------------------
65
;------------------------------------------------------------------------------
66
	invoke	ini_get_int,library_path,aFlags,aSoftenUp,1
66
	invoke	ini_get_int,library_path,aFlags,aSoftenUp,1
67
	cmp     eax,2
67
	cmp     eax,2
68
	jb      @f
68
	jb      @f
69
 
69
 
70
	mov     eax,1
70
	mov     eax,1
71
@@:
71
@@:
72
	mov	[soften_up],eax
72
	mov	[soften_up],eax
73
;--------------------------------------
73
;--------------------------------------
74
	invoke	ini_get_int,library_path,aFlags,aSoftenDown,1
74
	invoke	ini_get_int,library_path,aFlags,aSoftenDown,1
75
	cmp     eax,2
75
	cmp     eax,2
76
	jb      @f
76
	jb      @f
77
 
77
 
78
	mov     eax,1
78
	mov     eax,1
79
@@:
79
@@:
80
	mov	[soften_down],eax
80
	mov	[soften_down],eax
81
;--------------------------------------
81
;--------------------------------------
82
	invoke	ini_get_int,library_path,aFlags,aMinimizeLeftButton,1
82
	invoke	ini_get_int,library_path,aFlags,aMinimizeLeftButton,1
83
	cmp     eax,2
83
	cmp     eax,2
84
	jb      @f
84
	jb      @f
85
 
85
 
86
	mov     eax,1
86
	mov     eax,1
87
@@:
87
@@:
88
	mov	[minimize_left],eax
88
	mov	[minimize_left],eax
89
;--------------------------------------
89
;--------------------------------------
90
	invoke	ini_get_int,library_path,aFlags,aMinimizeRightButton,1
90
	invoke	ini_get_int,library_path,aFlags,aMinimizeRightButton,1
91
	cmp     eax,2
91
	cmp     eax,2
92
	jb      @f
92
	jb      @f
93
 
93
 
94
	mov     eax,1
94
	mov     eax,1
95
@@:
95
@@:
96
	mov	[minimize_right],eax
96
	mov	[minimize_right],eax
97
;--------------------------------------	
97
;--------------------------------------	
98
	invoke	ini_get_int,library_path,aFlags,aMenuButton,1
98
	invoke	ini_get_int,library_path,aFlags,aMenuButton,1
99
	cmp     eax,2
99
	cmp     eax,2
100
	jb      @f
100
	jb      @f
101
 
101
 
102
	mov     eax,1
102
	mov     eax,1
103
@@:
103
@@:
104
	mov	[menu_enable],eax
104
	mov	[menu_enable],eax
105
;--------------------------------------	
105
;--------------------------------------	
106
	invoke	ini_get_int,library_path,aFlags,aRunApplButtons,1
106
	invoke	ini_get_int,library_path,aFlags,aRunApplButtons,1
107
	cmp     eax,2
107
	cmp     eax,2
108
	jb      @f
108
	jb      @f
109
 
109
 
110
	mov     eax,1
110
	mov     eax,1
111
@@:
111
@@:
112
	mov	[run_appl],eax
112
	mov	[run_appl],eax
113
;--------------------------------------	
113
;--------------------------------------	
114
	invoke	ini_get_int,library_path,aFlags,aCleanDesktopButton,1
114
	invoke	ini_get_int,library_path,aFlags,aCleanDesktopButton,1
115
	cmp     eax,2
115
	cmp     eax,2
116
	jb      @f
116
	jb      @f
117
 
117
 
118
	mov     eax,1
118
	mov     eax,1
119
@@:
119
@@:
120
	mov	[clean_desktop_enable],eax
120
	mov	[clean_desktop_enable],eax
121
;--------------------------------------	
121
;--------------------------------------	
122
	invoke	ini_get_int,library_path,aFlags,aClock,1
122
	invoke	ini_get_int,library_path,aFlags,aClock,1
123
	cmp     eax,2
123
	cmp     eax,2
124
	jb      @f
124
	jb      @f
125
 
125
 
126
	mov     eax,1
126
	mov     eax,1
127
@@:
127
@@:
128
	mov	[clock_enable],eax
128
	mov	[clock_enable],eax
129
;--------------------------------------	
129
;--------------------------------------	
130
	invoke	ini_get_int,library_path,aFlags,aCpuUsage,1
130
	invoke	ini_get_int,library_path,aFlags,aCpuUsage,1
131
	cmp     eax,2
131
	cmp     eax,2
132
	jb      @f
132
	jb      @f
133
 
133
 
134
	mov     eax,1
134
	mov     eax,1
135
@@:
135
@@:
136
	mov	[cpu_usage_enable],eax
136
	mov	[cpu_usage_enable],eax
137
;--------------------------------------	
137
;--------------------------------------	
138
	invoke	ini_get_int,library_path,aFlags,aChangeLang,1
138
	invoke	ini_get_int,library_path,aFlags,aChangeLang,1
139
	cmp     eax,2
139
	cmp     eax,2
140
	jb      @f
140
	jb      @f
141
 
141
 
142
	mov     eax,1
142
	mov     eax,1
143
@@:
143
@@:
144
	mov	[chlang_enable],eax
144
	mov	[chlang_enable],eax
145
;--------------------------------------
145
;--------------------------------------
146
	invoke	ini_get_int,library_path,aFlags,aAttachment,1
146
	invoke	ini_get_int,library_path,aFlags,aAttachment,1
147
	cmp     eax,2
147
	cmp     eax,2
148
	jb      @f
148
	jb      @f
149
 
149
 
150
	mov     eax,1
150
	mov     eax,1
151
@@:
151
@@:
152
	mov	[place_attachment],eax
152
	mov	[place_attachment],eax
153
;--------------------------------------
153
;--------------------------------------
154
	invoke	ini_get_int,library_path,aFlags,aButtonsStyle,1
154
	invoke	ini_get_int,library_path,aFlags,aButtonsStyle,1
155
	cmp     eax,2
155
	cmp     eax,2
156
	jb      @f
156
	jb      @f
157
 
157
 
158
	mov     eax,1
158
	mov     eax,1
159
@@:
159
@@:
160
	mov	[button_style],eax
160
	mov	[button_style],eax
161
;--------------------------------------
161
;--------------------------------------
162
	invoke	ini_get_color,library_path,aColors,aMenuButton,0x44aa44
162
	invoke	ini_get_color,library_path,aColors,aMenuButton,0x44aa44
163
	mov	[MenuButton_color],eax
163
	mov	[MenuButton_color],eax
164
;--------------------------------------
164
;--------------------------------------
165
	invoke	ini_get_color,library_path,aColors,aCleanDesktopButton,0x66cc
165
	invoke	ini_get_color,library_path,aColors,aCleanDesktopButton,0x66cc
166
	mov	[CleanDesktopButton_color],eax
166
	mov	[CleanDesktopButton_color],eax
167
;--------------------------------------
167
;--------------------------------------
168
	invoke	ini_get_color,library_path,aColors,aClock,0x66cc
168
	invoke	ini_get_color,library_path,aColors,aClock,0x66cc
169
	mov	[Clock_color],eax
169
	mov	[Clock_color],eax
170
;--------------------------------------
170
;--------------------------------------
171
	invoke	ini_get_color,library_path,aColors,aCpuUsage,0x44aa44
171
	invoke	ini_get_color,library_path,aColors,aCpuUsage,0x44aa44
172
	mov	[CpuUsage_color],eax
172
	mov	[CpuUsage_color],eax
173
;--------------------------------------
173
;--------------------------------------
174
	invoke	ini_get_color,library_path,aColors,aCpuUsageBckgr,0xdd2222
174
	invoke	ini_get_color,library_path,aColors,aCpuUsageBckgr,0xdd2222
175
	mov	[CpuUsageBckgr_color],eax
175
	mov	[CpuUsageBckgr_color],eax
176
;--------------------------------------
176
;--------------------------------------
177
	invoke	ini_get_color,library_path,aColors,aChangeLang,0x66cc
177
	invoke	ini_get_color,library_path,aColors,aChangeLang,0x66cc
178
	mov	[ChangeLang_color],eax
178
	mov	[ChangeLang_color],eax
179
;--------------------------------------
179
;--------------------------------------
180
	invoke	ini_get_color,library_path,aColors,aPageList,0xffffff
180
	invoke	ini_get_color,library_path,aColors,aPageList,0xffffff
181
	mov	[PageList_color],eax
181
	mov	[PageList_color],eax
182
;--------------------------------------
182
;--------------------------------------
183
	invoke	ini_get_color,library_path,aColors,aPanelText,0xffffff
183
	invoke	ini_get_color,library_path,aColors,aPanelText,0xffffff
184
	mov	[PanelText_color],eax
184
	mov	[PanelText_color],eax
185
;--------------------------------------
185
;--------------------------------------
186
	invoke	ini_get_color,library_path,aColors,aAltTab,0xff8000
186
	invoke	ini_get_color,library_path,aColors,aAltTab,0xff8000
187
	mov	[AltTab_color],eax
187
	mov	[AltTab_color],eax
188
;--------------------------------------
188
;--------------------------------------
189
	invoke ini_get_str,library_path,aApplicationsPaths,aEnd,end_name,63,Path_def_val
189
	invoke ini_get_str,library_path,aApplicationsPaths,aEnd,end_name,63,Path_def_val
190
;--------------------------------------
190
;--------------------------------------
191
	invoke ini_get_str,library_path,aApplicationsPaths,aMenu,menu_name,63,Path_def_val
191
	invoke ini_get_str,library_path,aApplicationsPaths,aMenu,menu_name,63,Path_def_val
192
;--------------------------------------
192
;--------------------------------------
193
	invoke ini_get_str,library_path,aApplicationsPaths,aRun,run_name,63,Path_def_val
193
	invoke ini_get_str,library_path,aApplicationsPaths,aRun,run_name,63,Path_def_val
194
;--------------------------------------
194
;--------------------------------------
195
	invoke ini_get_str,library_path,aApplicationsPaths,aPrnScr,printscreen_name,63,Path_def_val
195
	invoke ini_get_str,library_path,aApplicationsPaths,aPrnScr,printscreen_name,63,Path_def_val
196
;--------------------------------------
196
;--------------------------------------
197
	invoke ini_get_str,library_path,aApplicationsPaths,aClock,calendar_name,63,Path_def_val
197
	invoke ini_get_str,library_path,aApplicationsPaths,aClock,calendar_name,63,Path_def_val
198
;--------------------------------------
198
;--------------------------------------
199
	invoke ini_get_str,library_path,aApplicationsPaths,aCpuUsage,sysmeter_name,63,Path_def_val
199
	invoke ini_get_str,library_path,aApplicationsPaths,aCpuUsage,sysmeter_name,63,Path_def_val
200
;--------------------------------------
200
;--------------------------------------
201
	invoke ini_get_str,library_path,aApplicationsPaths,aMouseEmul,mousemul_name,63,Path_def_val	
201
	invoke ini_get_str,library_path,aApplicationsPaths,aMouseEmul,mousemul_name,63,Path_def_val	
202
	
202
	
203
	ret
203
	ret
204
;-----------------------------------------------------------------------------
204
;-----------------------------------------------------------------------------
205
copy_file_path:
205
copy_file_path:
206
	xor	eax,eax
206
	xor	eax,eax
207
@@:
207
@@:
208
	cld
208
	cld
209
	lodsb
209
	lodsb
210
	stosb
210
	stosb
211
	test	eax,eax
211
	test	eax,eax
212
	jnz	@b
212
	jnz	@b
213
	mov	esi,edi
213
	mov	esi,edi
214
	dec	esi
214
	dec	esi
215
@@:
215
@@:
216
	std
216
	std
217
	lodsb
217
	lodsb
218
	cmp	al,'/'
218
	cmp	al,'/'
219
	jnz	@b
219
	jnz	@b
220
	mov	edi,esi
220
	mov	edi,esi
221
	add	edi,2
221
	add	edi,2
222
	mov	esi,ebx
222
	mov	esi,ebx
223
@@:
223
@@:
224
	cld
224
	cld
225
	lodsb
225
	lodsb
226
	stosb
226
	stosb
227
	test	eax,eax
227
	test	eax,eax
228
	jnz	@b
228
	jnz	@b
229
	ret
229
	ret
230
;-----------------------------------------------------------------------------
230
;-----------------------------------------------------------------------------