Subversion Repositories Kolibri OS

Rev

Rev 2626 | Go to most recent revision | Details | 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
;------------------------------------------------------------------------------
10
; Get panel variables
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
;------------------------------------------------------------------------------
64
; Get panel flags
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,aPageList,1
147
	cmp     eax,2
148
	jb      @f
149
 
150
	mov     eax,1
151
@@:
152
	mov	[page_list_enable],eax
153
;--------------------------------------
154
	invoke	ini_get_int,library_path,aFlags,aAttachment,1
155
	cmp     eax,2
156
	jb      @f
157
 
158
	mov     eax,1
159
@@:
160
	mov	[place_attachment],eax
161
;--------------------------------------
162
	invoke	ini_get_int,library_path,aFlags,aButtonsStyle,1
163
	cmp     eax,2
164
	jb      @f
165
 
166
	mov     eax,1
167
@@:
168
	mov	[button_style],eax
169
;--------------------------------------
170
	invoke	ini_get_color,library_path,aColors,aMenuButton,0x44aa44
171
	mov	[MenuButton_color],eax
172
;--------------------------------------
173
	invoke	ini_get_color,library_path,aColors,aCleanDesktopButton,0x66cc
174
	mov	[CleanDesktopButton_color],eax
175
;--------------------------------------
176
	invoke	ini_get_color,library_path,aColors,aClock,0x66cc
177
	mov	[Clock_color],eax
178
;--------------------------------------
179
	invoke	ini_get_color,library_path,aColors,aCpuUsage,0x44aa44
180
	mov	[CpuUsage_color],eax
181
;--------------------------------------
182
	invoke	ini_get_color,library_path,aColors,aCpuUsageBckgr,0xdd2222
183
	mov	[CpuUsageBckgr_color],eax
184
;--------------------------------------
185
	invoke	ini_get_color,library_path,aColors,aChangeLang,0x66cc
186
	mov	[ChangeLang_color],eax
187
;--------------------------------------
188
	invoke	ini_get_color,library_path,aColors,aPageList,0xffffff
189
	mov	[PageList_color],eax
190
;--------------------------------------
191
;	invoke	ini_get_str,library_path,aConvertPlugins,aCP0,plugin_0_name,127,ConvertPlugins_no_key
192
 
193
	ret
194
;-----------------------------------------------------------------------------
195
copy_file_path:
196
    xor   eax,eax
197
@@:
198
    cld
199
    lodsb
200
    stosb
201
    test  eax,eax
202
    jnz   @b
203
    mov   esi,edi
204
    dec   esi
205
@@:
206
    std
207
    lodsb
208
    cmp   al,'/'
209
    jnz   @b
210
    mov   edi,esi
211
    add   edi,2
212
    mov   esi,ebx
213
@@:
214
    cld
215
    lodsb
216
    stosb
217
    test  eax,eax
218
    jnz   @b
219
    ret
220
;-----------------------------------------------------------------------------