forked from KolibriOS/kolibrios
Eolite 2.91: make folder ".." selection not possible
git-svn-id: svn://kolibrios.org@5661 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1f7e1e244e
commit
c4b869d9eb
@ -103,8 +103,8 @@
|
|||||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||||
enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
|
enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
|
||||||
|
|
||||||
#define TITLE "Eolite File Manager v2.9"
|
#define TITLE "Eolite File Manager v2.91"
|
||||||
#define ABOUT_TITLE "Eolite v2.9"
|
#define ABOUT_TITLE "Eolite v2.91"
|
||||||
dword col_padding, col_selec, col_lpanel;
|
dword col_padding, col_selec, col_lpanel;
|
||||||
|
|
||||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||||
@ -432,12 +432,12 @@ void main()
|
|||||||
//GoBack();
|
//GoBack();
|
||||||
Dir_Up();
|
Dir_Up();
|
||||||
break;
|
break;
|
||||||
case 004: //Ctrl+D set as bg
|
case 004: //Ctrl+D - set as bg
|
||||||
strncpy(#temp, "\\S__",4);
|
strncpy(#temp, "\\S__",4);
|
||||||
strcat(#temp, #file_path);
|
strcat(#temp, #file_path);
|
||||||
RunProgram("/sys/media/kiv", #temp);
|
RunProgram("/sys/media/kiv", #temp);
|
||||||
break;
|
break;
|
||||||
case 014: //Ctrl+N new window
|
case 014: //Ctrl+N - create new window
|
||||||
if (Form.left==98) MoveSize(Form.left-20,Form.top-20,OLD,OLD);
|
if (Form.left==98) MoveSize(Form.left-20,Form.top-20,OLD,OLD);
|
||||||
RunProgram("/sys/File Managers/Eolite", #path);
|
RunProgram("/sys/File Managers/Eolite", #path);
|
||||||
break;
|
break;
|
||||||
@ -450,18 +450,17 @@ void main()
|
|||||||
case 022: //Ctrl+V
|
case 022: //Ctrl+V
|
||||||
Paste();
|
Paste();
|
||||||
break;
|
break;
|
||||||
case 001: //Ctrl+A
|
case 001: //Ctrl+A - select all files
|
||||||
debugln("press Ctrl+A");
|
|
||||||
for (i=0; i<files.count; i++)
|
for (i=0; i<files.count; i++)
|
||||||
{
|
{
|
||||||
selected_offset = file_mas[i]*304 + buf+32 + 7;
|
selected_offset = file_mas[i]*304 + buf+32 + 7;
|
||||||
|
if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory
|
||||||
ESBYTE[selected_offset] = 1;
|
ESBYTE[selected_offset] = 1;
|
||||||
selected_count++;
|
selected_count++;
|
||||||
}
|
}
|
||||||
List_ReDraw();
|
List_ReDraw();
|
||||||
break;
|
break;
|
||||||
case 021: //Ctrl+U
|
case 021: //Ctrl+U - unselect all files
|
||||||
debugln("press Ctrl+A");
|
|
||||||
for (i=0; i<files.count; i++)
|
for (i=0; i<files.count; i++)
|
||||||
{
|
{
|
||||||
selected_offset = file_mas[i]*304 + buf+32 + 7;
|
selected_offset = file_mas[i]*304 + buf+32 + 7;
|
||||||
@ -508,6 +507,7 @@ void main()
|
|||||||
break;
|
break;
|
||||||
case ASCII_KEY_INS:
|
case ASCII_KEY_INS:
|
||||||
selected_offset = file_mas[files.current+files.first]*304 + buf+32 + 7;
|
selected_offset = file_mas[files.current+files.first]*304 + buf+32 + 7;
|
||||||
|
if (files.current+files.first==0) && (!strncmp(selected_offset+33, "..", 2)) goto _INSERT_END; //do not selec ".." directory
|
||||||
if (ESBYTE[selected_offset])
|
if (ESBYTE[selected_offset])
|
||||||
{
|
{
|
||||||
ESBYTE[selected_offset]=0;
|
ESBYTE[selected_offset]=0;
|
||||||
@ -518,6 +518,7 @@ void main()
|
|||||||
ESBYTE[selected_offset] = 1;
|
ESBYTE[selected_offset] = 1;
|
||||||
selected_count++;
|
selected_count++;
|
||||||
}
|
}
|
||||||
|
_INSERT_END:
|
||||||
List_Current(1);
|
List_Current(1);
|
||||||
break;
|
break;
|
||||||
case 048...059: //F1-F10
|
case 048...059: //F1-F10
|
||||||
|
Loading…
Reference in New Issue
Block a user