/programs/cmm/eolite/include/about.h |
---|
4,7 → 4,7 |
void about_dialog() |
{ |
byte id; |
int id; |
proc_info about_form; |
int about_x; |
/programs/cmm/eolite/include/copy.h |
---|
117,7 → 117,7 |
path_offset += strlen(path_offset) + 1; |
} |
cut_active=false; |
if (info_after_copy) notify(INFO_AFTER_COPY); |
if (info_after_copy.checked) notify(INFO_AFTER_COPY); |
DialogExit(); |
} |
/programs/cmm/eolite/include/icons.h |
---|
9,7 → 9,7 |
dword selected_image; |
dword default_image; |
if (big_icons) { |
if (big_icons.checked) { |
icons_ini.section = "icons32"; |
selected_image = icons32_selected.image; |
default_image = icons32_default.image; |
35,7 → 35,7 |
if (fairing_color==col_selec) |
{ |
img_draw stdcall(selected_image, xx, yy, icon_size, icon_size, 0, icon_n*icon_size); |
if (!big_icons) IconFairing(icon_n, xx, yy, fairing_color); |
if (big_icons.checked==false) IconFairing(icon_n, xx, yy, fairing_color); |
} |
else |
{ |
/programs/cmm/eolite/include/left_panel.h |
---|
128,8 → 128,8 |
for (i=0; i<30; i++) DeleteButton(100+i); |
if ( two_panels) { draw_y = 41; draw_x = 2; draw_h = 21; } |
if (!two_panels) { draw_y = 74; draw_x = 17; draw_h = 16; } |
if ( two_panels.checked) { draw_y = 41; draw_x = 2; draw_h = 21; } |
if (!two_panels.checked) { draw_y = 74; draw_x = 17; draw_h = 16; } |
for (i=0;i<list.count;i++) |
{ |
136,7 → 136,7 |
strcpy(#dev_name, list.get(i)); |
GetDiskIconAndName(dev_name[1], #dev_icon, #disc_name); |
if (strstr(#path, #dev_name)-#path==0) is_active=true; else is_active=false; |
if (two_panels) |
if (two_panels.checked) |
{ |
name_len = strlen(#dev_name)-1*8; |
DrawBar(draw_x, draw_y, name_len + 31, draw_h, 0xFFFFFF); |
155,12 → 155,11 |
DrawBar(draw_x,draw_y,6,draw_h+1,0xFFFFFF); |
DrawBar(draw_x+6+18,draw_y,160-6-18,draw_h+1,0xFFFFFF); |
DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF); |
if (show_dev_name) |
if (show_dev_name.checked) |
{ |
strcat(#disc_name, #dev_name); |
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name); |
WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); |
} |
WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); } |
else |
{ |
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name); |
170,7 → 169,7 |
draw_y += draw_h; |
} |
} |
if (two_panels) |
if (two_panels.checked) |
{ |
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF); |
DefineButton(Form.cwidth - 23, draw_y+2, 17,16, 60+BT_HIDE, 0xCCCccc); |
/programs/cmm/eolite/include/properties.h |
---|
50,8 → 50,22 |
BDVK file_info_dirsize; |
proc_info settings_form; |
bool quest_active, atr_readonly, atr_hidden, atr_system; |
bool quest_active; |
checkbox ch_read_only = { PR_T_ONLY_READ, NULL }; |
checkbox ch_hidden = { PR_T_HIDDEN, NULL }; |
checkbox ch_system = { PR_T_SYSTEM, NULL }; |
void SetPropertiesFile(dword cur_file, bdvk_pointer) |
{ |
GetFileInfo(cur_file, bdvk_pointer); |
ESI = bdvk_pointer; |
ESI.BDVK.readonly = ch_read_only.checked; |
ESI.BDVK.hidden = ch_hidden.checked; |
ESI.BDVK.system = ch_system.checked; |
SetFileInfo(cur_file, bdvk_pointer); |
} |
void SetPropertiesDir(dword way) |
{ |
dword dirbuf, fcount, i, filename; |
70,11 → 84,7 |
{ |
SetPropertiesDir(cur_file); |
} |
GetFileInfo(cur_file, #file_info_dirsize); |
file_info_dirsize.readonly = atr_readonly; |
file_info_dirsize.hidden = atr_hidden; |
file_info_dirsize.system = atr_system; |
SetFileInfo(cur_file, #file_info_dirsize); |
SetPropertiesFile(cur_file, #file_info_dirsize); |
} |
free(cur_file); |
} |
95,11 → 105,7 |
{ |
strcpy(cur_file, #path); |
strcat(cur_file, file_mas[i]*304+buf+72); |
GetFileInfo(cur_file, #file_info_general); |
file_info_general.readonly = atr_readonly; |
file_info_general.hidden = atr_hidden; |
file_info_general.system = atr_system; |
SetFileInfo(cur_file, #file_info_general); |
SetPropertiesDir(cur_file); |
if (prop==2) |
{ |
if (dir_exists(cur_file)) |
113,11 → 119,7 |
} |
else |
{ |
GetFileInfo(#file_path, #file_info_general); |
file_info_general.readonly = atr_readonly; |
file_info_general.hidden = atr_hidden; |
file_info_general.system = atr_system; |
SetFileInfo(#file_path, #file_info_general); |
SetPropertiesFile(#file_path, #file_info_general); |
if (prop==2) SetPropertiesDir(#file_path); |
} |
quest_active = 0; |
125,11 → 127,7 |
} |
else |
{ |
GetFileInfo(#file_path, #file_info_general); |
file_info_general.readonly = atr_readonly; |
file_info_general.hidden = atr_hidden; |
file_info_general.system = atr_system; |
SetFileInfo(#file_path, #file_info_general); |
SetPropertiesFile(#file_path, #file_info_general); |
} |
cmd_free=3; |
_not_draw = true; |
206,7 → 204,7 |
void properties_dialog() |
{ |
byte id; |
int id; |
DSBYTE[#folder_info]=0; |
file_count = 0; |
216,9 → 214,9 |
if (selected_count) |
{ |
GetSizeMoreFiles(#path); |
atr_readonly = 0; |
atr_hidden = 0; |
atr_system = 0; |
ch_read_only.checked = 0; |
ch_hidden.checked = 0; |
ch_system.checked = 0; |
} |
else |
{ |
226,9 → 224,9 |
strcpy(#file_name2, #file_name); |
file_name_ed.size = strlen(#file_name2); |
if(itdir) GetSizeDir(#file_path); |
atr_readonly = file_info_general.readonly; |
atr_hidden = file_info_general.hidden; |
atr_system = file_info_general.system; |
ch_read_only.checked = file_info_general.readonly; |
ch_hidden.checked = file_info_general.hidden; |
ch_system.checked = file_info_general.system; |
} |
strcpy(#path_to_file, #path); |
path_to_file_ed.size = strlen(#path_to_file); |
238,6 → 236,9 |
{ |
case evButton: |
id=GetButtonID(); |
ch_read_only.click(id); |
ch_hidden.click(id); |
ch_system.click(id); |
if (quest_active) |
{ |
IF (id==301) SetProperties(2); |
262,21 → 263,6 |
} |
break; |
} |
if (id==20) |
{ |
atr_readonly ^= 1; |
DrawPropertiesCheckBoxes(); |
} |
if (id==21) |
{ |
atr_hidden ^= 1; |
DrawPropertiesCheckBoxes(); |
} |
if (id==22) |
{ |
atr_system ^= 1; |
DrawPropertiesCheckBoxes(); |
} |
break; |
case evMouse: |
323,6 → 309,7 |
void DrawPropertiesWindow() |
{ |
dword ext1; |
incn y; |
char temp_path[sizeof(file_path)]; |
DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0); |
GetProcessInfo(#settings_form, SelfInfo); |
373,7 → 360,10 |
WriteText(120, 99, 0x90, system.color.work_text, #element_size_label); |
} |
DrawFrame(10, 212, -10*2 + settings_form.cwidth - 2, 92, FLAGS); |
DrawPropertiesCheckBoxes(); |
y.n = 212; //212 => attributes_frame.y |
ch_read_only.draw(24, y.inc(18)); |
ch_hidden.draw(24, y.inc(24)); |
ch_system.draw(24, y.inc(24)); |
} |
void PropertiesDrawIcon(dword file_path, extension) |
382,12 → 372,3 |
DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff); |
DrawIconByExtension(file_path, extension, 20, 30, system.color.work_light); |
} |
void DrawPropertiesCheckBoxes() |
{ |
incn y; |
y.n = 212; //212 => attributes_frame.y |
CheckBox(24, y.inc(18), 20, PR_T_ONLY_READ, atr_readonly); |
CheckBox(24, y.inc(24), 21, PR_T_HIDDEN, atr_hidden); |
CheckBox(24, y.inc(24), 22, PR_T_SYSTEM, atr_system); |
} |
/programs/cmm/eolite/include/settings.h |
---|
40,11 → 40,18 |
more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; |
more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; |
checkbox show_dev_name = { SHOW_DEVICE_CLASS }; |
checkbox show_real_names = { SHOW_REAL_NAMES }; |
checkbox show_status_bar = { SHOW_STATUS_BAR }; |
checkbox info_after_copy = { NOTIFY_COPY_END }; |
checkbox show_breadcrumb = { SHOW_BREADCRUMBS }; |
checkbox big_icons = { BIG_ICONS }; |
checkbox two_panels = { USE_TWO_PANELS }; |
void settings_dialog() |
{ |
byte id; |
int id; |
active_settings=1; |
font_size.value = kfont.size.pt; |
line_height.value = files.item_h; |
58,7 → 65,7 |
case evButton: |
id=GetButtonID(); |
if (id==1) { ExitSettings(); break; } |
if (1==id) { ExitSettings(); break; } |
else if (id==5) |
{ |
RunProgram("tinypad", "/sys/settings/assoc.ini"); |
78,40 → 85,19 |
ini.SetString("DefaultPath", #path_start,strlen(#path_start)); |
break; |
} |
else if (id==20) show_dev_name ^= 1; |
else if (id==21) { action_buf=109; real_files_names_case ^= 1; } |
else if (id==22) info_after_copy ^= 1; |
else if (id==24) two_panels ^= true; |
else if (id==32) show_breadcrumb ^= true; |
else if (id==27) show_status_bar ^= 1; |
else if (font_size.click(id)) { |
show_dev_name.click(id); |
if (show_real_names.click(id)) action_buf=109; |
info_after_copy.click(id); |
two_panels.click(id); |
show_breadcrumb.click(id); |
show_status_bar.click(id); |
if (font_size.click(id)) { |
kfont.size.pt = font_size.value; |
kfont.changeSIZE(); |
BigFontsChange(); |
} |
else if (line_height.click(id)) { |
files.item_h = line_height.value; |
} |
else if (id==33) { |
big_icons ^= 1; |
if (big_icons) { |
icon_size=32; |
files.item_h = line_height.value = 34; |
if (!icons32_default.image) |
{ |
Libimg_LoadImage(#icons32_default, "/sys/icons32.png"); |
Libimg_LoadImage(#icons32_selected, "/sys/icons32.png"); |
Libimg_ReplaceColor(icons32_default.image, icons32_selected.w, |
icons32_selected.h, 0x00000000, 0xffFFFfff); |
Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w, |
icons32_selected.h, 0x00000000, col_selec); |
} |
} |
else { |
icon_size=16; |
files.item_h = line_height.value = 18; |
} |
} |
if (line_height.click(id)) files.item_h = line_height.value; |
if (big_icons.click(id)) BigIconsSwitch(); |
EventRedrawWindow(Form.left,Form.top); |
break; |
143,13 → 129,13 |
incn y; |
int x=11, frx=26, but_x; |
y.n = 0; |
CheckBox(x, y.inc(14), 20, SHOW_DEVICE_CLASS, show_dev_name); |
CheckBox(x, y.inc(25), 21, SHOW_REAL_NAMES, real_files_names_case); |
CheckBox(x, y.inc(25), 27, SHOW_STATUS_BAR, show_status_bar); |
CheckBox(x, y.inc(25), 22, NOTIFY_COPY_END, info_after_copy); |
CheckBox(x, y.inc(25), 32, SHOW_BREADCRUMBS, show_breadcrumb); |
CheckBox(x, y.inc(25), 33, BIG_ICONS, big_icons); |
CheckBox(x, y.inc(25), 24, USE_TWO_PANELS, two_panels); |
show_dev_name.draw(x, y.inc(14)); |
show_real_names.draw(x, y.inc(25)); |
show_status_bar.draw(x, y.inc(25)); |
info_after_copy.draw(x, y.inc(25)); |
show_breadcrumb.draw(x, y.inc(25)); |
big_icons.draw(x, y.inc(25)); |
two_panels.draw(x, y.inc(25)); |
font_size.draw(x, y.inc(31)); |
line_height.draw(x, y.inc(31)); |
172,12 → 158,12 |
ini.section = "Config"; |
files.SetFont(6, 9, 10000000b); |
real_files_names_case = ini.GetInt("RealFileNamesCase", 1); |
show_dev_name = ini.GetInt("ShowDeviceName", 1); |
show_status_bar = ini.GetInt("ShowStatusBar", 1); |
info_after_copy = ini.GetInt("InfoAfterCopy", 0); |
show_real_names.checked = ini.GetInt("RealFileNamesCase", true); |
show_dev_name.checked = ini.GetInt("ShowDeviceName", true); |
show_status_bar.checked = ini.GetInt("ShowStatusBar", true); |
info_after_copy.checked = ini.GetInt("InfoAfterCopy", false); |
two_panels.checked = ini.GetInt("TwoPanels", false); |
kfont.size.pt = ini.GetInt("FontSize", 13); |
two_panels = ini.GetInt("TwoPanels", 0); |
files.item_h = ini.GetInt("LineHeight", 19); |
WinX = ini.GetInt("WinX", 200); |
WinY = ini.GetInt("WinY", 50); |
197,12 → 183,12 |
void SaveIniSettings() |
{ |
ini.SetInt("ShowDeviceName", show_dev_name); |
ini.SetInt("ShowStatusBar", show_status_bar); |
ini.SetInt("RealFileNamesCase", real_files_names_case); |
ini.SetInt("InfoAfterCopy", info_after_copy); |
ini.SetInt("ShowDeviceName", show_dev_name.checked); |
ini.SetInt("ShowStatusBar", show_status_bar.checked); |
ini.SetInt("RealFileNamesCase", show_real_names.checked); |
ini.SetInt("InfoAfterCopy", info_after_copy.checked); |
ini.SetInt("FontSize", kfont.size.pt); |
ini.SetInt("TwoPanels", two_panels); |
ini.SetInt("TwoPanels", two_panels.checked); |
ini.SetInt("LineHeight", files.item_h); |
ini.SetInt("WinX", Form.left); |
ini.SetInt("WinY", Form.top); |
245,3 → 231,25 |
if (files.item_h<18) files.item_h = 18; |
files_active.item_h = files_inactive.item_h = files.item_h; |
} |
void BigIconsSwitch() |
{ |
if (big_icons.checked) |
{ |
icon_size=32; |
files.item_h = line_height.value = 34; |
if (!icons32_default.image) |
{ |
Libimg_LoadImage(#icons32_default, "/sys/icons32.png"); |
Libimg_LoadImage(#icons32_selected, "/sys/icons32.png"); |
Libimg_ReplaceColor(icons32_default.image, icons32_selected.w, |
icons32_selected.h, 0x00000000, 0xffFFFfff); |
Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w, |
icons32_selected.h, 0x00000000, col_selec); |
} |
} |
else { |
icon_size=16; |
files.item_h = line_height.value = 18; |
} |
} |