Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5462 → Rev 5463

/programs/cmm/eolite/include/settings.h
24,10 → 24,7
 
int mouse_ddd;
char lineh_s[30]="18\0";
edit_box LineHeight_ed = {52,10,90,0xffffff,0x94AECE,0xffc90E,0xffffff,2,4,#lineh_s,#mouse_ddd, 1000000000000000b,2,2};
checkbox2 ShowDeviceName_chb = {10*65536+15, 10*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_1, CH_FLAG_MIDDLE, 0};
checkbox2 RealFileNamesCase_chb = {10*65536+15, 30*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_2, CH_FLAG_MIDDLE, 0};
checkbox2 InfoAfterCopy_chb = {10*65536+15, 50*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_4, CH_FLAG_MIDDLE, 0};
edit_box LineHeight_ed = {52,10,97,0xffffff,0x94AECE,0xffc90E,0xffffff,2,4,#lineh_s,#mouse_ddd, 1000000000000000b,2,2};
 
void settings_dialog()
{
38,10 → 35,6
if (active_settings) ExitProcess();
active_settings=1;
 
ShowDeviceName_chb.size_of_str = strlen(SET_1) * 6;
RealFileNamesCase_chb.size_of_str = strlen(SET_2) * 6;
InfoAfterCopy_chb.size_of_str = strlen(SET_4) * 6;
 
SetEventMask(0x27);
loop() switch(WaitEvent())
{
62,7 → 55,12
if (id==5)
{
RunProgram("tinypad", "/sys/settings/assoc.ini");
break;
}
if (id==20) show_dev_name ^= 1;
if (id==21) real_files_names_case ^= 1;
if (id==22) info_after_copy ^= 1;
DrawSettingsCheckBoxes();
break;
case evKey:
78,36 → 76,36
break;
case evMouse:
check_box_mouse stdcall (#ShowDeviceName_chb);
check_box_mouse stdcall (#RealFileNamesCase_chb);
check_box_mouse stdcall (#InfoAfterCopy_chb);
edit_box_mouse stdcall (#LineHeight_ed);
break;
case evReDraw:
DefineAndDrawWindow(Form.left + 100, 150, 300, 200+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
DefineAndDrawWindow(Form.left + 100, 150, 300, 210+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
GetProcessInfo(#settings_form, SelfInfo);
 
ShowDeviceName_chb.flags |= 1 << show_dev_name;
RealFileNamesCase_chb.flags |= 1 << real_files_names_case;
InfoAfterCopy_chb.flags |= 1 << info_after_copy;
DrawSettingsCheckBoxes();
 
WriteText(10, 84, 0x80, 0x000000, SET_3);
key = itoa(files.line_h);
strcpy(#lineh_s, key);
check_box_draw stdcall (#ShowDeviceName_chb);
check_box_draw stdcall (#RealFileNamesCase_chb);
check_box_draw stdcall (#InfoAfterCopy_chb);
edit_box_draw stdcall (#LineHeight_ed);
DrawRectangle(LineHeight_ed.left-1, LineHeight_ed.top-1, LineHeight_ed.width+2, 16, sc.work_graph);
WriteText(10, 77, 0x80, 0x000000, SET_3);
DrawFlatButton(9, 120, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
 
DrawFlatButton(9, 127, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
 
DrawFlatButton(128, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, APPLY_T);
DrawFlatButton(208, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, CANCEL_T);
}
}
 
void DrawSettingsCheckBoxes()
{
CheckBox2(10, 11, 20, SET_1, show_dev_name);
CheckBox2(10, 33, 21, SET_2, real_files_names_case);
CheckBox2(10, 55, 22, SET_3, info_after_copy);
}
 
 
void LoadIniSettings()
{
ini_get_color stdcall (eolite_ini_path, "Config", "SelectionColor", 0x94AECE);
125,9 → 123,6
 
void SaveIniSettings()
{
show_dev_name = TestBit(ShowDeviceName_chb.flags, 1);
real_files_names_case = TestBit(RealFileNamesCase_chb.flags, 1);
info_after_copy = TestBit(InfoAfterCopy_chb.flags, 1);
ini_set_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", show_dev_name);
ini_set_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", real_files_names_case);
ini_set_int stdcall (eolite_ini_path, "Config", "InfoAfterCopy", info_after_copy);
159,4 → 154,9
col_padding = 0xC8C9C9;
//col_selec = 0x94AECE;
col_lpanel = 0x00699C;
}
 
 
void CheckBox2(dword x, y, id, text, byte value) {
CheckBox(x, y, 14, 14, id, text, sc.work_graph, sc.work_text, value);
}