Netstat: disable textboxes properly.

git-svn-id: svn://kolibrios.org@5686 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2015-08-05 15:57:33 +00:00
parent 507d835895
commit ec666fa4f4

View File

@ -152,17 +152,10 @@ ipcfg:
dec eax dec eax
jz .btn jz .btn
cmp [edit_ip.color], 0xcacaca
je @f
invoke edit_box_mouse, edit_ip invoke edit_box_mouse, edit_ip
invoke edit_box_mouse, edit_subnet invoke edit_box_mouse, edit_subnet
invoke edit_box_mouse, edit_gateway invoke edit_box_mouse, edit_gateway
@@:
cmp [edit_dns.color], 0xcacaca
je @f
invoke edit_box_mouse, edit_dns invoke edit_box_mouse, edit_dns
@@:
push [option_ip] [option_dns] push [option_ip] [option_dns]
invoke option_box_mouse, Option_boxs1 invoke option_box_mouse, Option_boxs1
@ -189,8 +182,8 @@ ipcfg:
.apply: .apply:
xor edi, edi xor edi, edi
cmp [edit_ip.color], 0xcacaca cmp [option_ip], op_ip_static
je .skip_ip jne .skip_ip
mov [edit_ip.color], 0xffffff mov [edit_ip.color], 0xffffff
mov esi, str_edit_ip mov esi, str_edit_ip
call validate_ip call validate_ip
@ -219,8 +212,8 @@ ipcfg:
@@: @@:
.skip_ip: .skip_ip:
cmp [edit_dns.color], 0xcacaca cmp [option_dns], op_dns_static
je .skip_dns jne .skip_dns
mov [edit_dns.color], 0xffffff mov [edit_dns.color], 0xffffff
mov esi, str_edit_dns mov esi, str_edit_dns
call validate_ip call validate_ip
@ -272,7 +265,7 @@ ipcfg:
.key: .key:
mcall 2 mcall 2
; Stupid editbox doesnt allow us to disable edit boxes nor filter input decently, so we do it here. ; Editbox doesnt allow us to filter input decently, so we do it here.
cmp ah, 13 cmp ah, 13
je .apply je .apply
cmp ah, 8 cmp ah, 8
@ -284,38 +277,31 @@ ipcfg:
cmp ah, '9' cmp ah, '9'
ja .loop ja .loop
@@: @@:
cmp [edit_ip.color], 0xffffff
jne @f
invoke edit_box_key, edit_ip invoke edit_box_key, edit_ip
invoke edit_box_key, edit_subnet invoke edit_box_key, edit_subnet
invoke edit_box_key, edit_gateway invoke edit_box_key, edit_gateway
@@:
cmp [edit_dns.color], 0xffffff
jne @f
invoke edit_box_key, edit_dns invoke edit_box_key, edit_dns
@@:
jmp .loop jmp .loop
toggle_editboxes: toggle_editboxes:
mov [edit_ip.color], 0xffffff and [edit_ip.flags], not ed_disabled
mov [edit_subnet.color], 0xffffff and [edit_subnet.flags], not ed_disabled
mov [edit_gateway.color], 0xffffff and [edit_gateway.flags], not ed_disabled
cmp [option_ip], op_ip_static cmp [option_ip], op_ip_static
je @f je @f
mov [edit_ip.color], 0xcacaca or [edit_ip.flags], ed_disabled
mov [edit_subnet.color], 0xcacaca or [edit_subnet.flags], ed_disabled
mov [edit_gateway.color], 0xcacaca or [edit_gateway.flags], ed_disabled
@@: @@:
mov [edit_dns.color], 0xcacaca or [edit_dns.flags], ed_disabled
cmp [option_ip], op_ip_disabled cmp [option_ip], op_ip_disabled
je @f je @f
cmp [option_dns], op_dns_static cmp [option_dns], op_dns_static
jne @f jne @f
mov [edit_dns.color], 0xffffff and [edit_dns.flags], not ed_disabled
@@: @@:
ret ret