Subversion Repositories Kolibri OS

Rev

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

Rev 5610 Rev 5686
Line 150... Line 150...
150
        dec     eax
150
        dec     eax
151
        jz      .key
151
        jz      .key
152
        dec     eax
152
        dec     eax
153
        jz      .btn
153
        jz      .btn
Line 154... Line -...
154
 
-
 
155
        cmp     [edit_ip.color], 0xcacaca
-
 
156
        je      @f
154
 
157
        invoke  edit_box_mouse, edit_ip
155
        invoke  edit_box_mouse, edit_ip
158
        invoke  edit_box_mouse, edit_subnet
156
        invoke  edit_box_mouse, edit_subnet
159
        invoke  edit_box_mouse, edit_gateway
-
 
160
  @@:
-
 
161
 
-
 
162
        cmp     [edit_dns.color], 0xcacaca
-
 
163
        je      @f
157
        invoke  edit_box_mouse, edit_gateway
164
        invoke  edit_box_mouse, edit_dns
-
 
Line 165... Line 158...
165
  @@:
158
        invoke  edit_box_mouse, edit_dns
166
 
159
 
167
        push    [option_ip] [option_dns]
160
        push    [option_ip] [option_dns]
168
        invoke  option_box_mouse, Option_boxs1
161
        invoke  option_box_mouse, Option_boxs1
Line 187... Line 180...
187
 
180
 
188
; Apply settings!
181
; Apply settings!
189
  .apply:
182
  .apply:
Line 190... Line 183...
190
        xor     edi, edi
183
        xor     edi, edi
191
 
184
 
192
        cmp     [edit_ip.color], 0xcacaca
185
        cmp     [option_ip], op_ip_static
193
        je      .skip_ip
186
        jne     .skip_ip
194
        mov     [edit_ip.color], 0xffffff
187
        mov     [edit_ip.color], 0xffffff
195
        mov     esi, str_edit_ip
188
        mov     esi, str_edit_ip
196
        call    validate_ip
189
        call    validate_ip
Line 217... Line 210...
217
        mov     [edit_gateway.color], 0xff4444
210
        mov     [edit_gateway.color], 0xff4444
218
        inc     edi
211
        inc     edi
219
  @@:
212
  @@:
220
  .skip_ip:
213
  .skip_ip:
Line 221... Line 214...
221
 
214
 
222
        cmp     [edit_dns.color], 0xcacaca
215
        cmp     [option_dns], op_dns_static
223
        je      .skip_dns
216
        jne     .skip_dns
224
        mov     [edit_dns.color], 0xffffff
217
        mov     [edit_dns.color], 0xffffff
225
        mov     esi, str_edit_dns
218
        mov     esi, str_edit_dns
226
        call    validate_ip
219
        call    validate_ip
227
        test    eax, eax
220
        test    eax, eax
Line 270... Line 263...
270
        mcall   -1
263
        mcall   -1
Line 271... Line 264...
271
 
264
 
272
  .key:
265
  .key:
Line 273... Line 266...
273
        mcall   2
266
        mcall   2
274
 
267
 
275
; Stupid editbox doesnt allow us to disable edit boxes nor filter input decently, so we do it here.
268
; Editbox doesnt allow us to filter input decently, so we do it here.
276
        cmp     ah, 13
269
        cmp     ah, 13
277
        je      .apply
270
        je      .apply
278
        cmp     ah, 8
271
        cmp     ah, 8
Line 282... Line 275...
282
        cmp     ah, '0'
275
        cmp     ah, '0'
283
        jb      .loop
276
        jb      .loop
284
        cmp     ah, '9'
277
        cmp     ah, '9'
285
        ja      .loop
278
        ja      .loop
286
  @@:
279
  @@:
287
        cmp     [edit_ip.color], 0xffffff
-
 
288
        jne     @f
-
 
289
        invoke  edit_box_key, edit_ip
280
        invoke  edit_box_key, edit_ip
290
        invoke  edit_box_key, edit_subnet
281
        invoke  edit_box_key, edit_subnet
291
        invoke  edit_box_key, edit_gateway
282
        invoke  edit_box_key, edit_gateway
292
  @@:
-
 
293
 
-
 
294
        cmp     [edit_dns.color], 0xffffff
-
 
295
        jne     @f
-
 
296
        invoke  edit_box_key, edit_dns
283
        invoke  edit_box_key, edit_dns
297
  @@:
-
 
Line 298... Line 284...
298
 
284
 
Line 299... Line 285...
299
        jmp     .loop
285
        jmp     .loop
Line 300... Line 286...
300
 
286
 
301
toggle_editboxes:
287
toggle_editboxes:
302
 
288
 
303
        mov     [edit_ip.color], 0xffffff
289
        and     [edit_ip.flags], not ed_disabled
304
        mov     [edit_subnet.color], 0xffffff
290
        and     [edit_subnet.flags], not ed_disabled
305
        mov     [edit_gateway.color], 0xffffff
291
        and     [edit_gateway.flags], not ed_disabled
306
        cmp     [option_ip], op_ip_static
292
        cmp     [option_ip], op_ip_static
307
        je      @f
293
        je      @f
308
        mov     [edit_ip.color], 0xcacaca
294
        or      [edit_ip.flags], ed_disabled
Line 309... Line 295...
309
        mov     [edit_subnet.color], 0xcacaca
295
        or      [edit_subnet.flags], ed_disabled
310
        mov     [edit_gateway.color], 0xcacaca
296
        or      [edit_gateway.flags], ed_disabled
311
  @@:
297
  @@:
312
 
298
 
313
        mov     [edit_dns.color], 0xcacaca
299
        or      [edit_dns.flags], ed_disabled
314
        cmp     [option_ip], op_ip_disabled
300
        cmp     [option_ip], op_ip_disabled
315
        je      @f
301
        je      @f
Line 316... Line 302...
316
        cmp     [option_dns], op_dns_static
302
        cmp     [option_dns], op_dns_static