Eolite 2.75: change attributes of file/folder

git-svn-id: svn://kolibrios.org@5554 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2015-05-10 01:12:52 +00:00
parent 8cc519feda
commit 9c63aacf50
3 changed files with 35 additions and 2 deletions

View File

@ -95,8 +95,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v2.73"
#define ABOUT_TITLE "Eolite v2.73"
#define TITLE "Eolite File Manager v2.75"
#define ABOUT_TITLE "Eolite v2.75"
dword col_padding, col_selec, col_lpanel;
int toolbar_buttons_x[7]={9,46,85,134,167,203};

View File

@ -44,6 +44,17 @@ char folder_info[200];
BDVK file_info_general;
BDVK file_info_dirsize;
void SetProperties(byte id)
{
if (selected_count) return;
else
{
if (id==20) file_info_general.readonly ^= 1;
if (id==21) file_info_general.hidden ^= 1;
if (id==22) file_info_general.system ^= 1;
SetFileInfo(#file_path, #file_info_general);
}
}
void GetSizeDir(dword way)
{
@ -142,6 +153,10 @@ void properties_dialog()
case evButton:
id=GetButtonID();
IF (id==1) || (id==10) ExitProcess();
if (id==20) SetProperties(id);
if (id==21) SetProperties(id);
if (id==22) SetProperties(id);
DrawPropertiesCheckBoxes();
break;
case evMouse:

View File

@ -68,6 +68,24 @@
$int 0x40
}
///////////////////////////
// Èçìåíåíèå ïàðàìåòðîâ ôàéëà //
///////////////////////////
:f70 setinfo_file_70;
:dword SetFileInfo(dword file_path, bdvk_struct)
{
setinfo_file_70.func = 6;
setinfo_file_70.param1 =
setinfo_file_70.param2 =
setinfo_file_70.param3 = 0;
setinfo_file_70.param4 = bdvk_struct;
setinfo_file_70.rezerv = 0;
setinfo_file_70.name = file_path;
$mov eax,70
$mov ebx,#setinfo_file_70.func
$int 0x40
}
///////////////////////////
// Запуск программы //
///////////////////////////