Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7611 → Rev 7628

/programs/cmm/eolite/Eolite.c
54,13 → 54,15
 
int toolbar_buttons_x[7]={9,46,85,134,167,203};
 
byte active_about=0;
word about_window;
bool active_about = false;
bool active_settings = false;
bool _not_draw = false;
bool menu_call_mouse = false;
bool exif_load = false;
bool dir_at_fat16 = NULL;
 
word about_thread_id;
word settings_window;
byte active_settings=0;
dword _not_draw = false;
byte menu_call_mouse=0;
byte exif_load=0;
 
byte del_active=0;
byte new_element_active=0;
74,13 → 76,12
int selected_count;
int count_dir;
 
byte
path[4096],
file_path[4096],
file_name[256],
new_element_name[256],
temp[4096],
itdir;
byte path[4096];
byte file_path[4096];
byte file_name[256];
byte new_element_name[256];
byte temp[4096];
bool itdir;
 
char active_path[4096], inactive_path[4096];
 
132,7 → 133,6
 
void main()
{
char selected_filename[256];
dword id;
byte count_sl = 0;
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
341,7 → 341,7
switch(id)
{
case CLOSE_BTN:
KillProcess(about_window);
KillProcess(about_thread_id);
SaveIniSettings();
ExitProcess();
case PATH_BTN:
371,14 → 371,8
case 26:
Paste();
break;
case 31...33: //sorting
id -= 30;
if (sort_type == id) sort_desc ^= 1;
else sort_type = id;
strcpy(#selected_filename, #file_name);
DrawList();
Open_Dir(#path,WITH_REDRAW);
SelectFileByName(#selected_filename);
case 31...33:
EventSort(id-30);
break;
case 50...60: //Actions
FnProcess(id-50);
428,10 → 422,12
{
switch(key_scancode)
{
case 059...068:
key_scancode -= 59;
if (key_scancode < SystemDiscs.list.count)
{
case SCAN_CODE_F1...SCAN_CODE_F3:
EventSort(key_scancode - 58);
break;
case SCAN_CODE_1...SCAN_CODE_10:
key_scancode-=2;
if (key_scancode >= SystemDiscs.list.count) break;
if (!two_panels.checked)
{
DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
438,7 → 434,6
pause(7);
}
SystemDiscs.Click(key_scancode);
}
break;
case SCAN_CODE_KEY_X:
Copy(#file_path, CUT);
704,6 → 699,22
if (new_element_active) && (col_selec != 0xCCCccc) NewElement_Form(new_element_active, #new_element_name);
}
 
bool file_name_is_8_3(dword name)
{
int name_len = strlen(name);
int dot_pos = strrchr(name, '.');
if (name_len<=12)
{
if (dot_pos) {
if (name_len - dot_pos > 3) return false;
}
else {
if (name_len>8) return false;
}
return true;
}
return false;
}
 
void Line_ReDraw(dword bgcol, filenum){
dword text_col=0,
753,6 → 764,7
if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden?
if (bgcol==col_selec)
{
file_name_is_8_3(file_name_off);
itdir = TestBit(attr, 4);
strcpy(#file_name, file_name_off);
if (!strcmp(#path,"/")) sprintf(#file_path,"%s%s",#path,file_name_off);
815,6 → 827,8
SystemDiscs.Draw();
files.visible = files.h / files.item_h;
if (files.count < files.visible) files.visible = files.count;
if (!strncmp(dir_path, "/rd/1/",5))
dir_at_fat16 = true; else dir_at_fat16 = false;
if (redraw!=ONLY_SHOW) Sorting();
list_full_redraw = true;
if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
841,7 → 855,7
}
for (j=files.count-1, file_off=files.count-1*304+buf+32; j>=0; j--, file_off-=304;) //files | folders
{
if (!show_real_names.checked) strttl(file_off+40);
if (dir_at_fat16) && (file_name_is_8_3(file_off+40)) strttl(file_off+40);
if (TestBit(ESDWORD[file_off],4)) //directory?
{
file_mas[d]=j;
908,7 → 922,7
int ind;
files.KeyHome();
Open_Dir(#path,ONLY_OPEN);
if (!show_real_names.checked) strttl(that_file);
if (dir_at_fat16) && (file_name_is_8_3(that_file)) strttl(that_file);
for (ind=files.count-1; ind>=0; ind--;) { if (!strcmp(file_mas[ind]*304+buf+72,that_file)) break; }
files.cur_y = ind - 1;
files.KeyDown();
1075,12 → 1089,12
if (!active_about)
{
about_stak = malloc(4096);
about_window = CreateThread(#about_dialog,about_stak+4092);
about_thread_id = CreateThread(#about_dialog,about_stak+4092);
break;
}
else
{
ActivateWindow(GetProcessSlot(about_window));
ActivateWindow(GetProcessSlot(about_thread_id));
}
break;
case 2:
1208,4 → 1222,15
}
}
 
void EventSort(dword id)
{
char selected_filename[256];
if (sort_type == id) sort_desc ^= 1;
else sort_type = id;
strcpy(#selected_filename, #file_name);
DrawList();
Open_Dir(#path,WITH_REDRAW);
SelectFileByName(#selected_filename);
}
 
stop:
/programs/cmm/eolite/include/settings.h
2,7 → 2,6
#ifdef LANG_RUS
?define TITLE_SETT " áâனª¨"
?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
?define SHOW_REAL_NAMES "®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
?define SHOW_STATUS_BAR "®ª §ë¢ âì áâ âãá ¡ à"
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
?define SHOW_BREADCRUMBS "ˆá¯®«ì§®¢ âì 'å«¥¡­ë¥ ªà®èª¨'"
18,7 → 17,6
#else
?define TITLE_SETT "Settings"
?define SHOW_DEVICE_CLASS "Show device class name"
?define SHOW_REAL_NAMES "Show file names in original case"
?define SHOW_STATUS_BAR "Show status bar"
?define NOTIFY_COPY_END "Notify when copying finished"
?define SHOW_BREADCRUMBS "Show breadcrumbs"
40,7 → 38,6
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 };
86,7 → 83,6
break;
}
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);
133,7 → 129,6
int x=11, frx=26, but_x;
y.n = 0;
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));
160,7 → 155,6
ini.section = "Eolite";
 
files.SetFont(6, 9, 10000000b);
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);
188,7 → 182,6
{
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("BigIcons", big_icons.checked);
ini.SetInt("TwoPanels", two_panels.checked);
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager 4.07"
#define ABOUT_TITLE "EOLITE 4.07"
#define TITLE "Eolite File Manager 4.1"
#define ABOUT_TITLE "EOLITE 4.1"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"