Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5718 → Rev 5719

/programs/cmm/eolite/Eolite.c
6,7 → 6,7
#endif
 
//libraries
#define MEMSIZE 500000
#define MEMSIZE 510000
#include "..\lib\clipboard.h"
#include "..\lib\strings.h"
#include "..\lib\mem.h"
64,10 → 64,14
show_dev_name=true,
real_files_names_case=false,
info_after_copy=false,
two_panels=false;
two_panels=false,
active_panel=1;
//} settings;
 
int active_current, inactive_current, active_first, inactive_first;
char active_path[4096], inactive_path[4096];
 
 
dword eolite_ini_path;
 
char scroll_used=false;
128,6 → 132,8
{
strlcpy(#path, "/rd/1/", 6);
}
strcpy(#active_path, #path);
strcpy(#inactive_path, #path);
Open_Dir(#path,ONLY_OPEN);
SetEventMask(1100111b);
loop(){
255,7 → 261,7
 
//Scrooll
if (!mouse.lkm) && (scroll_used) { scroll_used=false; Scroll(); }
if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>56) && (mouse.y<Form.height) && (mouse.lkm) && (!scroll_used) {scroll_used=true; Scroll();}
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+18) && (mouse.y>files.y) && (mouse.y<files.y+files.y-18) && (mouse.lkm) && (!scroll_used) {scroll_used=true; Scroll();}
if (scroll_used)
{
266,7 → 272,39
files.first /= onTop(22,files.y);
if (files.visible+files.first>files.count) files.first=files.count-files.visible;
if (id!=files.first) List_ReDraw();
break;
}
 
if (two_panels) && (mouse.y > files.y) {
if (mouse.x<Form.cwidth/2)
{
if (active_panel!=1)
{
active_panel = 1;
active_current = inactive_current;
inactive_current = files.current;
active_first = inactive_first;
inactive_first = files.first;
strcpy(#active_path, #inactive_path);
strcpy(#inactive_path, #path);
draw_window();
}
}
else
{
if (active_panel!=2)
{
active_panel = 2;
active_current = inactive_current;
inactive_current = files.current;
active_first = inactive_first;
inactive_first = files.first;
strcpy(#active_path, #inactive_path);
strcpy(#inactive_path, #path);
draw_window();
}
}
}
break;
//Button pressed-----------------------------------------------------------------------------
case evButton:
312,9 → 350,9
Paste();
break;
case 31...33: //sort
if(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10);
if(sort_num==2) DrawFilledBar(sorting_arrow_x,42,6,10);
if(sort_num==3) DrawFilledBar(sorting_arrow_x,42,6,10);
if(sort_num==1) DrawFilledBar(sorting_arrow_x,files.y-12,6,10);
if(sort_num==2) DrawFilledBar(sorting_arrow_x,files.y-12,6,10);
if(sort_num==3) DrawFilledBar(sorting_arrow_x,files.y-12,6,10);
sort_num=id-30;
Open_Dir(#path,WITH_REDRAW);
break;
411,10 → 449,6
 
switch (key_scancode)
{
case 198:
two_panels ^= 1;
draw_window();
break;
case SCAN_CODE_BS:
//GoBack();
Dir_Up();
501,7 → 535,6
}
}
 
 
void draw_window()
{
DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0);
527,23 → 560,42
{
DrawLeftPanel();
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h);
DrawListColumns();
Open_Dir(#path,ONLY_SHOW);
DrawList();
}
else
{
if (active_panel==1)
{
files.current = inactive_current;
files.first = inactive_first;
strcpy(#path, #inactive_path);
files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
DrawList();
files.current = active_current;
files.first = active_first;
strcpy(#path, #active_path);
files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h);
DrawListColumns();
Open_Dir(#path,ONLY_SHOW);
DrawList();
}
if (active_panel==2)
{
files.current = inactive_current;
files.first = inactive_first;
strcpy(#path, #inactive_path);
files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h);
DrawList();
files.current = active_current;
files.first = active_first;
strcpy(#path, #active_path);
files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
DrawListColumns();
Open_Dir(#path,ONLY_SHOW);
DrawList();
}
}
if (del_active) Del_Form();
if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
}
 
void DrawListColumns()
void DrawList()
{
DrawFlatButton(files.x,files.y - 17, files.w - 141,16,31,system.color.work,T_FILE);
DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE);
551,12 → 603,13
DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18");
DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19");
DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
Open_Dir(#path,WITH_REDRAW);
}
 
 
void List_ReDraw()
{
int paint_y;
int all_lines_h;
static int old_current, old_first;
 
files.CheckDoesValuesOkey(); //prevent some shit
580,10 → 633,10
 
for (j=0; j<files.visible; j++) if (files.current-files.first!=j) Line_ReDraw(0xFFFFFF, j); else Line_ReDraw(col_selec, files.current-files.first);
//in the bottom
paint_y = j * files.line_h + files.y;
DrawBar(files.x,paint_y,files.w,onTop(paint_y,6),0xFFFFFF);
DrawBar(Form.cwidth-159,paint_y,1,onTop(paint_y,6),system.color.work);
DrawBar(Form.cwidth-86,paint_y,1,onTop(paint_y,6),system.color.work);
all_lines_h = j * files.line_h;
DrawBar(files.x,all_lines_h + files.y,files.w,files.h - all_lines_h,0xFFFFFF);
DrawBar(files.x+files.w-141,all_lines_h + files.y,1,files.h - all_lines_h,system.color.work);
DrawBar(files.x+files.w-68,all_lines_h + files.y,1,files.h - all_lines_h,system.color.work);
Scroll();
}
 
613,7 → 666,7
ext1 = strrchr(file_name_off,'.') + file_name_off;
if (ext1==file_name_off) ext1 = " \0"; //if no extension then show nothing
Put_icon(ext1, files.x+3, files.line_h/2-7+y, color, 0);
WriteText(7-strlen(ConvertSize(file.sizelo))*6+Form.cwidth - 76, files.text_y + y,files.font_type,0,ConvertSize(file.sizelo));
WriteText(7-strlen(ConvertSize(file.sizelo))*6+files.x+files.w - 58, files.text_y + y,files.font_type,0,ConvertSize(file.sizelo));
}
else
{
640,8 → 693,8
PathShow_prepare stdcall(#FileShow);
PathShow_draw stdcall(#FileShow);
}
DrawBar(Form.cwidth-159,y,1,files.line_h,system.color.work); //gray line 1
DrawBar(Form.cwidth-86,y,1,files.line_h,system.color.work); //gray line 2
DrawBar(files.x+files.w-141,y,1,files.line_h,system.color.work); //gray line 1
DrawBar(files.x+files.w-68,y,1,files.line_h,system.color.work); //gray line 2
}
 
 
680,7 → 733,7
if (sort_num==1) sorting_arrow_x = Form.width+60/2;
if (sort_num==2) sorting_arrow_x = Form.width-115;
if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
WriteText(sorting_arrow_x,45,0x80,system.color.work_graph,"\x19");
WriteText(sorting_arrow_x,files.y-12,0x80,system.color.work_graph,"\x19");
if (redraw!=ONLY_SHOW) Sorting();
list_full_redraw = true;
if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
1033,6 → 1086,12
if (!itdir) RunProgram("/sys/develop/heed", #file_path);
break;
case 5: //refresh cur dir & devs
if (two_panels)
{
draw_window();
}
else
{
Tip(56, T_DEVICES, 55, "-");
Open_Dir(#path,WITH_REDRAW);
pause(10);
1040,6 → 1099,7
GetSystemDiscs();
Open_Dir(#path,WITH_REDRAW);
DrawLeftPanel();
}
break;
case 6:
NewElement_Form(CREATE_FOLDER, T_NEW_FOLDER);
/programs/cmm/eolite/include/icons.h
44,7 → 44,7
PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
if (use_big_fonts) font_half_height=0; else font_half_height=4;
if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+Form.cwidth-121,yy+font_half_height,files.font_type,0,extension);
if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+files.x+files.w-103,yy+font_half_height,files.font_type,0,extension);
}
 
 
114,18 → 114,18
DrawBar(x+8,y,8,2,color);
IF (filenum==17) PutPixel(x+11,y+1,0x1A7B17); //green arrow part
DrawBar(x+1,y+13,15,2,color);
PutPixel(x+1,y,color); //.òî÷êè
PutPixel(x+1,y,color);
PutPixel(x+7,y,color);
PutPixel(x+15,y+2,color);
PutPixel(x+1,y+12,color);
PutPixel(x+15,y+12,color);
return;
case 18: //êàðòðèäæ
case 18:
DrawBar(x,y+11,1,2,color);
DrawBar(x+15,y+11,1,2,color);
DrawBar(x,y+13,16,1,color);
return;
case 24: //îáðàç
case 24:
DrawBar(x,y,6,1,color);
DrawBar(x,y+1,4,1,color);
DrawBar(x,y+2,3,1,color);
/programs/cmm/eolite/include/left_panel.h
181,7 → 181,7
else
{
pos_y = 43;
DrawBar(pos_x, pos_y, 80, 17, 0xFFFFFF);
DrawBar(pos_x, pos_y, strlen(#dev_name)*6 + 37, 17, 0xFFFFFF);
DefineButton(pos_x+2, pos_y, strlen(#dev_name)*6 + 33, 16, 100+i+BT_HIDE,0xFFFFFF);
_PutImage(pos_x + 5, pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices);
WriteText(pos_x + 24, pos_y+5, 0x80, 0, #dev_name);
/programs/cmm/eolite/include/settings.h
8,6 → 8,7
?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
?define SHOW_REAL_NAMES "®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
?define USE_BIG_FONTS "®«ì让 èà¨äâ (⮫쪮  ­£«¨©áª¨¥ ᨬ¢®«ë!)"
?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
?define CANCEL_T "Žâ¬¥­ "
19,6 → 20,7
?define SHOW_DEVICE_CLASS "Show device class name"
?define SHOW_REAL_NAMES "Show real file names without changing case"
?define USE_BIG_FONTS "Use big fonts (English characters only!)"
?define USE_TWO_PANELS "Two panels"
?define LIST_LINE_HEIGHT "List line height"
?define NOTIFY_COPY_END "Notify when copying finished"
?define CANCEL_T "Cancel"
34,7 → 36,7
byte id;
proc_info settings_form;
dword save_show_dev_name,save_real_files_names_case, save_info_after_copy, save_use_big_fonts, save_files_h, save_DBLTime;
dword save_show_dev_name,save_real_files_names_case, save_info_after_copy, save_use_big_fonts, save_two_panels, save_files_h, save_DBLTime;
if (active_settings){
EXIT_SETTING:
43,6 → 45,7
real_files_names_case = save_real_files_names_case;
info_after_copy = save_info_after_copy;
use_big_fonts = save_use_big_fonts;
two_panels = save_two_panels;
files.line_h = save_files_h;
MOUSE_TIME = save_DBLTime;
56,6 → 59,7
save_real_files_names_case = real_files_names_case;
save_info_after_copy = info_after_copy;
save_use_big_fonts = use_big_fonts;
two_panels = two_panels;
save_files_h = files.line_h;
save_DBLTime = MOUSE_TIME;
86,6 → 90,7
else if (id==21) real_files_names_case ^= 1;
else if (id==22) info_after_copy ^= 1;
else if (id==23) { use_big_fonts ^= 1; BigFontsChange(); }
else if (id==24) two_panels ^= 1;
else if (id==25) files.line_h++;
else if (id==26) && (files.line_h>14) files.line_h--;
else if (id==27) MOUSE_TIME++;
105,10 → 110,10
break;
case evReDraw:
DefineAndDrawWindow(Form.left + Form.width/2, Form.top + Form.height/2 - 75, 300, 234+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 254+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
GetProcessInfo(#settings_form, SelfInfo);
DrawSettingsCheckBoxes();
DrawFlatButton(9, 166, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
DrawFlatButton(9, 186, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
DrawFlatButton(128, settings_form.cheight - 30, 70, 22, 10, 0xE4DFE1, APPLY_T);
DrawFlatButton(208, settings_form.cheight - 30, 70, 22, 11, 0xE4DFE1, CANCEL_T);
}
121,8 → 126,9
CheckBox2(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case);
CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy);
CheckBox2(10, 77, 23, USE_BIG_FONTS, use_big_fonts);
MoreLessBox(10, 104, 18, 25, 26, #system.color, files.line_h, LIST_LINE_HEIGHT);
MoreLessBox(10, 134, 18, 27, 28, #system.color, MOUSE_TIME, T_DOUBLE_CLICK);
CheckBox2(10, 99, 24, USE_TWO_PANELS, two_panels);
MoreLessBox(10, 124, 18, 25, 26, #system.color, files.line_h, LIST_LINE_HEIGHT);
MoreLessBox(10, 154, 18, 27, 28, #system.color, MOUSE_TIME, T_DOUBLE_CLICK);
}
 
 
133,6 → 139,7
ini_get_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", 0); real_files_names_case = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", 0); info_after_copy = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", 0); use_big_fonts = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", 0); two_panels = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "LineHeight", 18); files.line_h = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX;
BigFontsChange();
145,6 → 152,7
ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
ini_set_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", use_big_fonts);
ini_set_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", two_panels);
ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME);
}
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager v3.0 beta 6"
#define ABOUT_TITLE "Eolite 3.0 beta 6"
#define TITLE "Eolite File Manager v3.0 RC1"
#define ABOUT_TITLE "Eolite 3.0 RC1"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"
/programs/cmm/lib/io.h
241,6 → 241,7
if(!strncmp(pos,"cd/",3)) return PATH;
if(!strncmp(pos,"bd/",3)) return PATH;
if(!strncmp(pos,"usbhd/",6)) return PATH;
if(!strncmp(pos,"kolibrios/",10)) return PATH;
sprintf(#__PATH_NEW,"/sys%s",PATH);
return #__PATH_NEW;
}