CMM: use disabled flag for editbox

git-svn-id: svn://kolibrios.org@5683 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-08-05 11:00:04 +00:00
parent bfe9e1d77d
commit a453f0c5c6
2 changed files with 21 additions and 13 deletions

View File

@ -67,11 +67,8 @@ void Downloader()
case evKey: case evKey:
key = GetKey(); key = GetKey();
if (DL_address_box.flags & 0b10)
{
EAX=key<<8; EAX=key<<8;
edit_box_key stdcall(#DL_address_box); edit_box_key stdcall(#DL_address_box);
}
if (key==13) DL_Scan(301); if (key==13) DL_Scan(301);
break; break;
@ -208,7 +205,8 @@ void StopDownloading()
DL_bufpointer = mem_Free(DL_bufpointer); DL_bufpointer = mem_Free(DL_bufpointer);
downloaded_size = full_size = 0; downloaded_size = full_size = 0;
} }
DL_address_box.color = DL_address_box.blur_border_color = DL_address_box.focus_border_color = 0xFFFfff; DL_address_box.color = DL_address_box.blur_border_color = 0xFFFfff;
DL_address_box.flags = 10b;
DL_Draw_Window(); DL_Draw_Window();
} }
@ -218,7 +216,8 @@ void StartDownloading()
if (strncmp(#DL_URL,"http:",5)==0) if (strncmp(#DL_URL,"http:",5)==0)
{ {
download_state = STATE_IN_PROGRESS; download_state = STATE_IN_PROGRESS;
DL_address_box.color = DL_address_box.blur_border_color = DL_address_box.focus_border_color = 0xdddDDD; DL_address_box.color = DL_address_box.blur_border_color = 0xCACACA;
DL_address_box.flags = 100000000000b;
http_get stdcall (#DL_URL, 0, 0, #accept_language); http_get stdcall (#DL_URL, 0, 0, #accept_language);
DL_http_transfer = EAX; DL_http_transfer = EAX;
DL_progress_bar.value = 0; DL_progress_bar.value = 0;

View File

@ -12,10 +12,10 @@ unsigned char POP_server1[128]="pop.server.com";
unsigned char POP_server_port1[5]="110"; unsigned char POP_server_port1[5]="110";
unsigned char SMTP_server1[128]="smtp.server.com"; unsigned char SMTP_server1[128]="smtp.server.com";
unsigned char SMTP_server_port1[5]="25"; unsigned char SMTP_server_port1[5]="25";
edit_box POP_server_box = {210,190,90 ,0xffffff,0x94AECE,0xffc90E,0xffffff,0,sizeof(POP_server1),#POP_server1,#mouse_opt,0}; edit_box POP_server_box = {210,190,90 ,0xffffff,0x94AECE,0xffc90E,0xCACACA,0,sizeof(POP_server1),#POP_server1,#mouse_opt,100000000000b};
edit_box POP_server_port_box = {210,190,115,0xffffff,0x94AECE,0xffc90E,0xffffff,0,5,#POP_server_port1,#mouse_opt,0b1000000000000000}; edit_box POP_server_port_box = {210,190,115,0xffffff,0x94AECE,0xffc90E,0xCACACA,0,5,#POP_server_port1,#mouse_opt,100000000000b};
edit_box SMTP_server_box = {210,190,140,0xffffff,0x94AECE,0xffc90E,0xffffff,0,sizeof(SMTP_server1),#SMTP_server1,#mouse_opt,0}; edit_box SMTP_server_box = {210,190,140,0xffffff,0x94AECE,0xffc90E,0xCACACA,0,sizeof(SMTP_server1),#SMTP_server1,#mouse_opt,100000000000b};
edit_box SMTP_server_port_box = {210,190,165,0xffffff,0x94AECE,0xffc90E,0xffffff,0,5,#SMTP_server_port1,#mouse_opt,0b1000000000000000}; edit_box SMTP_server_port_box = {210,190,165,0xffffff,0x94AECE,0xffc90E,0xCACACA,0,5,#SMTP_server_port1,#mouse_opt,100000000000b};
void SettingsDialog() void SettingsDialog()
@ -35,7 +35,6 @@ void SettingsDialog()
{ {
case evMouse: case evMouse:
IF (GetProcessSlot(Form.ID)-GetActiveProcess()!=0) break; IF (GetProcessSlot(Form.ID)-GetActiveProcess()!=0) break;
if (checked[1]==0) break;
edit_box_mouse stdcall(#POP_server_box); edit_box_mouse stdcall(#POP_server_box);
edit_box_mouse stdcall(#POP_server_port_box); edit_box_mouse stdcall(#POP_server_port_box);
edit_box_mouse stdcall(#SMTP_server_box); edit_box_mouse stdcall(#SMTP_server_box);
@ -50,7 +49,17 @@ void SettingsDialog()
{ {
if (checked[id-17]==1) break; if (checked[id-17]==1) break;
checked[0]><checked[1]; checked[0]><checked[1];
if (checked[1]) POP_server_box.flags = 0b10; if (checked[1]) {
POP_server_box.flags = 0b10;
POP_server_port_box.flags = SMTP_server_box.flags = SMTP_server_port_box.flags = 0b;
POP_server_box.blur_border_color = POP_server_box.blur_border_color = POP_server_port_box.blur_border_color =
SMTP_server_box.blur_border_color = SMTP_server_port_box.blur_border_color = 0xFFFfff;
}
else {
POP_server_box.flags = POP_server_box.flags = POP_server_port_box.flags = SMTP_server_box.flags = SMTP_server_port_box.flags = 100000000000b;
POP_server_box.blur_border_color = POP_server_box.blur_border_color = POP_server_port_box.blur_border_color =
SMTP_server_box.blur_border_color = SMTP_server_port_box.blur_border_color = 0xCACACA;
}
OptionsWindow(); OptionsWindow();
} }
if (id==20) if (id==20)