forked from KolibriOS/kolibrios
Eolite 3.0 Final: fixes
git-svn-id: svn://kolibrios.org@5733 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2f4b8c666c
commit
2732d2f84a
@ -38,10 +38,10 @@ word settings_window;
|
|||||||
dword _not_draw = false;
|
dword _not_draw = false;
|
||||||
byte menu_call_mouse=0;
|
byte menu_call_mouse=0;
|
||||||
|
|
||||||
byte del_active=0,
|
byte del_active=0;
|
||||||
new_element_active=0;
|
byte new_element_active=0;
|
||||||
|
|
||||||
llist files;
|
llist files, files_active, files_inactive;
|
||||||
|
|
||||||
byte list_full_redraw;
|
byte list_full_redraw;
|
||||||
|
|
||||||
@ -68,10 +68,8 @@ byte use_big_fonts=false,
|
|||||||
active_panel=1;
|
active_panel=1;
|
||||||
//} settings;
|
//} settings;
|
||||||
|
|
||||||
int active_current, inactive_current, active_first, inactive_first;
|
|
||||||
char active_path[4096], inactive_path[4096];
|
char active_path[4096], inactive_path[4096];
|
||||||
|
|
||||||
|
|
||||||
dword eolite_ini_path;
|
dword eolite_ini_path;
|
||||||
|
|
||||||
char scroll_used=false;
|
char scroll_used=false;
|
||||||
@ -79,7 +77,7 @@ char scroll_used=false;
|
|||||||
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak;
|
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak;
|
||||||
|
|
||||||
proc_info Form;
|
proc_info Form;
|
||||||
int mouse_dd, sc_slider_h, sorting_arrow_x, kolibrios_drive;
|
int mouse_dd, sc_slider_h, kolibrios_drive;
|
||||||
int j, i;
|
int j, i;
|
||||||
int action_buf;
|
int action_buf;
|
||||||
int rand_n;
|
int rand_n;
|
||||||
@ -132,9 +130,9 @@ void main()
|
|||||||
{
|
{
|
||||||
strlcpy(#path, "/rd/1/", 6);
|
strlcpy(#path, "/rd/1/", 6);
|
||||||
}
|
}
|
||||||
strcpy(#active_path, #path);
|
|
||||||
strcpy(#inactive_path, #path);
|
|
||||||
Open_Dir(#path,ONLY_OPEN);
|
Open_Dir(#path,ONLY_OPEN);
|
||||||
|
strcpy(#inactive_path, #path);
|
||||||
|
llist_copy(#files_inactive, #files);
|
||||||
SetEventMask(1100111b);
|
SetEventMask(1100111b);
|
||||||
loop(){
|
loop(){
|
||||||
switch(WaitEvent())
|
switch(WaitEvent())
|
||||||
@ -289,10 +287,8 @@ void main()
|
|||||||
{
|
{
|
||||||
active_panel = 2;
|
active_panel = 2;
|
||||||
__SET_VALS_AND_DRAW:
|
__SET_VALS_AND_DRAW:
|
||||||
active_current = inactive_current;
|
llist_copy(#files_active, #files_inactive);
|
||||||
inactive_current = files.current;
|
llist_copy(#files_inactive, #files);
|
||||||
active_first = inactive_first;
|
|
||||||
inactive_first = files.first;
|
|
||||||
strcpy(#active_path, #inactive_path);
|
strcpy(#active_path, #inactive_path);
|
||||||
strcpy(#inactive_path, #path);
|
strcpy(#inactive_path, #path);
|
||||||
DrawFilePanels();
|
DrawFilePanels();
|
||||||
@ -343,11 +339,9 @@ void main()
|
|||||||
case 26:
|
case 26:
|
||||||
Paste();
|
Paste();
|
||||||
break;
|
break;
|
||||||
case 31...33: //sort
|
case 31...33: //sorting
|
||||||
if(sort_num==1) DrawFilledBar(sorting_arrow_x,files.y-12,6,10);
|
sort_num = id - 30;
|
||||||
if(sort_num==2) DrawFilledBar(sorting_arrow_x,files.y-12,6,10);
|
DrawList();
|
||||||
if(sort_num==3) DrawFilledBar(sorting_arrow_x,files.y-12,6,10);
|
|
||||||
sort_num=id-30;
|
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
break;
|
break;
|
||||||
case 50...60: //Actions
|
case 50...60: //Actions
|
||||||
@ -553,8 +547,7 @@ void draw_window()
|
|||||||
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph);
|
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph);
|
||||||
DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
|
DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
|
||||||
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
|
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
|
||||||
active_current = files.current;
|
llist_copy(#files_active, #files);
|
||||||
active_first = files.first;
|
|
||||||
strcpy(#active_path, #path);
|
strcpy(#active_path, #path);
|
||||||
DrawFilePanels();
|
DrawFilePanels();
|
||||||
if (del_active) Del_Form();
|
if (del_active) Del_Form();
|
||||||
@ -563,14 +556,18 @@ void draw_window()
|
|||||||
|
|
||||||
void DrawList()
|
void DrawList()
|
||||||
{
|
{
|
||||||
DrawFlatButton(files.x,files.y - 17, files.w - 141,16,31,system.color.work,T_FILE);
|
word sorting_arrow_x;
|
||||||
|
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);
|
DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE);
|
||||||
DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE);
|
DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE);
|
||||||
DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18");
|
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");
|
DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16,0,system.color.work,"\x19");
|
||||||
|
if (sort_num==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18;
|
||||||
|
if (sort_num==2) sorting_arrow_x = files.x + files.w - 90;
|
||||||
|
if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
|
||||||
|
WriteText(sorting_arrow_x,files.y-12,0x80,system.color.work_graph,"\x19");
|
||||||
DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
|
DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
|
||||||
if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);
|
if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawFilePanels()
|
void DrawFilePanels()
|
||||||
@ -580,34 +577,37 @@ void DrawFilePanels()
|
|||||||
DrawDeviceAndActionsLeftPanel();
|
DrawDeviceAndActionsLeftPanel();
|
||||||
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h);
|
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h);
|
||||||
DrawList();
|
DrawList();
|
||||||
|
Open_Dir(#path,ONLY_SHOW);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
llist_copy(#files, #files_inactive);
|
||||||
|
strcpy(#path, #inactive_path);
|
||||||
|
col_selec = 0xCCCccc;
|
||||||
|
|
||||||
if (active_panel==1)
|
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);
|
files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
|
||||||
DrawList();
|
DrawList();
|
||||||
files.current = active_current;
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
files.first = active_first;
|
llist_copy(#files, #files_active);
|
||||||
strcpy(#path, #active_path);
|
strcpy(#path, #active_path);
|
||||||
|
col_selec = 0x94AECE;
|
||||||
files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h);
|
files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h);
|
||||||
DrawList();
|
DrawList();
|
||||||
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
if (active_panel==2)
|
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);
|
files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h);
|
||||||
DrawList();
|
DrawList();
|
||||||
files.current = active_current;
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
files.first = active_first;
|
llist_copy(#files, #files_active);
|
||||||
strcpy(#path, #active_path);
|
strcpy(#path, #active_path);
|
||||||
|
col_selec = 0x94AECE;
|
||||||
files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
|
files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
|
||||||
DrawList();
|
DrawList();
|
||||||
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -736,10 +736,6 @@ void Open_Dir(dword dir_path, redraw){
|
|||||||
HistoryPath(ADD_NEW_PATH);
|
HistoryPath(ADD_NEW_PATH);
|
||||||
files.visible = files.h / files.line_h;
|
files.visible = files.h / files.line_h;
|
||||||
if (files.count < files.visible) files.visible = files.count;
|
if (files.count < files.visible) files.visible = files.count;
|
||||||
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,files.y-12,0x80,system.color.work_graph,"\x19");
|
|
||||||
if (redraw!=ONLY_SHOW) Sorting();
|
if (redraw!=ONLY_SHOW) Sorting();
|
||||||
list_full_redraw = true;
|
list_full_redraw = true;
|
||||||
if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
|
if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
|
||||||
@ -757,7 +753,6 @@ inline Sorting()
|
|||||||
{
|
{
|
||||||
dword k=0, l=1;
|
dword k=0, l=1;
|
||||||
dword file_off;
|
dword file_off;
|
||||||
int i;
|
|
||||||
if (!strncmp(#path,"/",2)) //do not sort
|
if (!strncmp(#path,"/",2)) //do not sort
|
||||||
{
|
{
|
||||||
for(k=1;k<files.count;k++;) file_mas[k]=k;
|
for(k=1;k<files.count;k++;) file_mas[k]=k;
|
||||||
@ -783,8 +778,8 @@ inline Sorting()
|
|||||||
if (sort_num==2) Sort_by_Type(k,files.count-1);
|
if (sort_num==2) Sort_by_Type(k,files.count-1);
|
||||||
if (sort_num==3) Sort_by_Size(k,files.count-1);
|
if (sort_num==3) Sort_by_Size(k,files.count-1);
|
||||||
//make ".." first item in list
|
//make ".." first item in list
|
||||||
if (k>0) && (!strncmp(file_mas[0]*304+buf+72,"..",3))
|
if (k>0) && (strncmp(file_mas[0]*304+buf+72,"..",2)!=0)
|
||||||
for(k--; k>0; k--;) if (!strncmp(file_mas[k]*304+buf+72,"..",3)) {file_mas[k]><file_mas[0]; break;}
|
for(k--; k>0; k--;) if (!strncmp(file_mas[k]*304+buf+72,"..",2)) {file_mas[k]><file_mas[0]; break;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define TITLE "Eolite File Manager v3.0 RC2"
|
#define TITLE "Eolite File Manager v3.0 Final"
|
||||||
#define ABOUT_TITLE "Eolite 3.0 RC2"
|
#define ABOUT_TITLE "Eolite 3.0 Final"
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
?define T_FILE "” ©«"
|
||||||
|
@ -221,4 +221,25 @@ void llist::CheckDoesValuesOkey()
|
|||||||
if (current < 0) current = 0;
|
if (current < 0) current = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void llist_copy(dword dest, src)
|
||||||
|
{
|
||||||
|
EDI = dest;
|
||||||
|
ESI = src;
|
||||||
|
EDI.llist.x = ESI.llist.x;
|
||||||
|
EDI.llist.y = ESI.llist.y;
|
||||||
|
EDI.llist.w = ESI.llist.w;
|
||||||
|
EDI.llist.h = ESI.llist.h;
|
||||||
|
EDI.llist.line_h = ESI.llist.line_h;
|
||||||
|
EDI.llist.text_y = ESI.llist.text_y;
|
||||||
|
EDI.llist.font_w = ESI.llist.font_w;
|
||||||
|
EDI.llist.font_h = ESI.llist.font_h;
|
||||||
|
EDI.llist.font_type = ESI.llist.font_type;
|
||||||
|
EDI.llist.count = ESI.llist.count;
|
||||||
|
EDI.llist.visible = ESI.llist.visible;
|
||||||
|
EDI.llist.first = ESI.llist.first;
|
||||||
|
EDI.llist.current = ESI.llist.current;
|
||||||
|
EDI.llist.column_max = ESI.llist.column_max;
|
||||||
|
EDI.llist.active = ESI.llist.active;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user