Subversion Repositories Kolibri OS

Rev

Rev 5452 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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