forked from KolibriOS/kolibrios
Eolite 3.91:
1. fixed a critical issue in setElementSelectedFlag() function which could cause app crash after paste several elements 2. also deny copying in several cases (empty disk, ".." element) 3. fix regression: icon for a file without extension, not executable git-svn-id: svn://kolibrios.org@7278 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e98d3b0786
commit
e1c7133e38
@ -550,7 +550,7 @@ void DrawFavButton(int x)
|
||||
void draw_window()
|
||||
{
|
||||
if (show_status_bar.checked) status_bar_h = STATUS_BAR_H; else status_bar_h = 0;
|
||||
DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,NULL,TITLE,0);
|
||||
DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,TITLE,0);
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
if (Form.status_window>2) return;
|
||||
if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; }
|
||||
|
@ -44,7 +44,7 @@ void about_dialog()
|
||||
DrawRectangle3D(0,154,about_form.cwidth,1,system.color.work_dark,system.color.work_light);
|
||||
WriteTextLines(7,163,0x90,system.color.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n(c) 2008 - 2017",20);
|
||||
#ifdef LANG_RUS
|
||||
DrawFlatButton(60,about_form.cheight-38,11,"ˆáâ®à¨ï à §à ¡®âª¨");
|
||||
DrawStandartCaptButton(60,about_form.cheight-38,11,"ˆáâ®à¨ï à §à ¡®âª¨");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,10 @@ enum {NOCUT, CUT};
|
||||
void setElementSelectedFlag(dword n, int state) {
|
||||
dword selected_offset = file_mas[n]*304 + buf+32 + 7;
|
||||
ESBYTE[selected_offset] = state;
|
||||
if (n==0) && (strncmp(file_mas[n]*304+buf+72,"..",2)==0) ESBYTE[selected_offset] = false; //do not selec ".." directory
|
||||
if (n==0) && (strncmp(file_mas[n]*304+buf+72,"..",2)==0) {
|
||||
ESBYTE[selected_offset] = false; //do not selec ".." directory
|
||||
return;
|
||||
}
|
||||
if (state==true) selected_count++;
|
||||
if (state==false) selected_count--;
|
||||
}
|
||||
@ -27,7 +30,13 @@ void Copy(dword pcth, char cut)
|
||||
dword copy_buf_offset = 0;
|
||||
|
||||
if (files.count<=0) return; //no files
|
||||
if (selected_count==0) setElementSelectedFlag(files.cur_y, true); //no element selected by "insert", so we copy current element
|
||||
|
||||
//if no element selected by "Insert" key, then we copy current element
|
||||
if (!selected_count)
|
||||
setElementSelectedFlag(files.cur_y, true);
|
||||
|
||||
if (!selected_count) return;
|
||||
|
||||
size_buf = 4;
|
||||
for (i=0; i<files.count; i++)
|
||||
{
|
||||
|
@ -8,7 +8,9 @@ void DirFileCount(dword way)
|
||||
if (dir_exists(way))
|
||||
{
|
||||
cur_file = malloc(4096);
|
||||
// In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
|
||||
// In the process of recursive descent, memory must be allocated
|
||||
// dynamically, because the static variable cause a fault!!!
|
||||
// But unfortunately pass away to sacrifice speed.
|
||||
GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
|
||||
filename = dirbuf+72;
|
||||
for (i=0; i<fcount; i++)
|
||||
|
@ -52,17 +52,6 @@ void DrawFlatButtonSmall(dword x,y,width,height,id,text)
|
||||
WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,0x333333,text);
|
||||
}
|
||||
|
||||
int DrawFlatButton(dword x, y, id, text)
|
||||
{
|
||||
int padding_w = 15;
|
||||
int width = strlen(text) * 8 + padding_w + padding_w;
|
||||
int height = 25;
|
||||
if (id) DefineButton(x+1,y+1,width-2,height-2,id,system.color.work_button);
|
||||
WriteText(x+padding_w,height/2+y-6,0x90,system.color.work_button_text,text);
|
||||
return width + padding_w;
|
||||
}
|
||||
|
||||
|
||||
void DrawFilledBar(dword x, y, w, h)
|
||||
{
|
||||
int i, fill_h;
|
||||
@ -77,6 +66,6 @@ void DrawEolitePopup(dword b1_text, b2_text)
|
||||
int but_x;
|
||||
int popin_x = files.w - popin_w / 2 + files.x ;
|
||||
DrawPopup(popin_x, 160, popin_w, 95, 1, system.color.work, col_graph);
|
||||
but_x = DrawFlatButton(popin_x+23, 215, POPUP_BTN1, b1_text);
|
||||
DrawFlatButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text);
|
||||
but_x = DrawStandartCaptButton(popin_x+23, 215, POPUP_BTN1, b1_text);
|
||||
DrawStandartCaptButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text);
|
||||
}
|
@ -5,7 +5,7 @@ void DrawIconByExtension(dword file_path, extension, xx, yy, fairing_color)
|
||||
char BYTE_HEAD_FILE[4];
|
||||
char ext[512];
|
||||
int i;
|
||||
dword icon_n;
|
||||
dword icon_n = 2;
|
||||
dword selected_image;
|
||||
dword default_image;
|
||||
dword default_icon;
|
||||
|
@ -1,4 +1,3 @@
|
||||
//Leency 2008-2013
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_DEVICES "“áâனá⢠"
|
||||
|
@ -1,5 +1,3 @@
|
||||
//Leency 2008-2013
|
||||
|
||||
//pay attension: >200 this is only file actions, not supported by folders
|
||||
#ifdef LANG_RUS
|
||||
char *file_captions[] = {
|
||||
|
@ -38,7 +38,7 @@ void DisplayOperationForm()
|
||||
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title,0);
|
||||
GetProcessInfo(#Dialog_Form, SelfInfo);
|
||||
WriteText(45, 11, 0x90, system.color.work_text, message);
|
||||
DrawFlatButton(Dialog_Form.cwidth - 105, copy_bar.top-2 , T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON);
|
||||
DrawStandartCaptButton(Dialog_Form.cwidth - 105, copy_bar.top-2 , T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,8 +143,8 @@ void ShowConfirmQuestionPopin()
|
||||
DrawPopup(15,80,250,90,1,system.color.work, system.color.work_graph);
|
||||
WriteText(35, 102, 0x90, 0x000000, QUEST_1);
|
||||
WriteText(65, 117, 0x90, 0x000000, QUEST_2);
|
||||
DrawFlatButton(62,138,301,T_YES);
|
||||
DrawFlatButton(155,138,302,T_NO);
|
||||
DrawStandartCaptButton(62,138,301,T_YES);
|
||||
DrawStandartCaptButton(155,138,302,T_NO);
|
||||
}
|
||||
|
||||
void GetSizeDir(dword way)
|
||||
@ -314,8 +314,8 @@ void DrawPropertiesWindow()
|
||||
DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0);
|
||||
GetProcessInfo(#settings_form, SelfInfo);
|
||||
|
||||
DrawFlatButton(settings_form.cwidth - 96, settings_form.cheight-34, 10, BTN_CLOSE);
|
||||
DrawFlatButton(settings_form.cwidth -208, settings_form.cheight-34, 11, BTN_APPLY);
|
||||
DrawStandartCaptButton(settings_form.cwidth - 96, settings_form.cheight-34, 10, BTN_CLOSE);
|
||||
DrawStandartCaptButton(settings_form.cwidth -208, settings_form.cheight-34, 11, BTN_APPLY);
|
||||
|
||||
WriteText(10, 78, 0x90, system.color.work_text, PR_T_DEST);
|
||||
edit_box_draw stdcall (#path_to_file_ed);
|
||||
|
@ -31,8 +31,6 @@
|
||||
?define START_PATH " Start path: "
|
||||
#endif
|
||||
|
||||
int WinX, WinY, WinW, WinH;
|
||||
|
||||
char path_start[4096];
|
||||
edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,4098,
|
||||
#path_start,0, 100000000000010b,0,0};
|
||||
@ -164,10 +162,10 @@ void LoadIniSettings()
|
||||
two_panels.checked = ini.GetInt("TwoPanels", false);
|
||||
kfont.size.pt = ini.GetInt("FontSize", 13);
|
||||
files.item_h = ini.GetInt("LineHeight", 19);
|
||||
WinX = ini.GetInt("WinX", 200);
|
||||
WinY = ini.GetInt("WinY", 50);
|
||||
WinW = ini.GetInt("WinW", 550);
|
||||
WinH = ini.GetInt("WinH", 506);
|
||||
Form.left = ini.GetInt("WinX", 200);
|
||||
Form.top = ini.GetInt("WinY", 50);
|
||||
Form.width = ini.GetInt("WinW", 550);
|
||||
Form.height = ini.GetInt("WinH", 506);
|
||||
ini.GetString("DefaultPath", #path, 4096, "/rd/1");
|
||||
ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
|
||||
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
|
||||
|
@ -1,4 +1,3 @@
|
||||
//Áûñòðàÿ ñîðòèðîâêà. Leency 2008.
|
||||
|
||||
void Sort_by_Size(int a, b) // для первого вызова: a = 0, b = <элементов в массиве> - 1
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define TITLE "Eolite File Manager v3.9"
|
||||
#define ABOUT_TITLE "EOLITE 3.9"
|
||||
#define TITLE "Eolite File Manager v3.91"
|
||||
#define ABOUT_TITLE "EOLITE 3.91"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_FILE "” ©«"
|
||||
|
Loading…
Reference in New Issue
Block a user