Eolite 2.58: show size in bytes in Properties window

git-svn-id: svn://kolibrios.org@5481 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-02-26 22:29:09 +00:00
parent 5f127d5ecf
commit 14c0ef2d17
4 changed files with 25 additions and 22 deletions

View File

@ -1,4 +1,4 @@
//Leency & Veliant 2008-2015 //Leency, Veliant, Punk_Joker & KolibriOS Team 2008-2015
//GNU GPL licence. //GNU GPL licence.
#ifndef AUTOBUILD #ifndef AUTOBUILD
@ -83,8 +83,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v2.57" #define TITLE "Eolite File Manager v2.58"
#define ABOUT_TITLE "Eolite v2.57" #define ABOUT_TITLE "Eolite v2.58"
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};

View File

@ -23,6 +23,8 @@
void about_dialog() void about_dialog()
{ {
byte id; byte id;
proc_info about_form;
IF (active_about) ExitProcess(); IF (active_about) ExitProcess();
active_about=1; active_about=1;
loop() switch(WaitEvent()) loop() switch(WaitEvent())
@ -47,22 +49,16 @@ void about_dialog()
case evReDraw: case evReDraw:
DefineAndDrawWindow(600,150,181,228+GetSkinHeight(),0x34,sc.work,INTRO_TEXT_1); DefineAndDrawWindow(600,150,181,228+GetSkinHeight(),0x34,sc.work,INTRO_TEXT_1);
DrawBar(0,0,172,50,0x8494C4); GetProcessInfo(#about_form, SelfInfo);
if (Form.status_window>2) break;
DrawBar(0,0,about_form.cwidth,50,0x8494C4);
PutPaletteImage(#logo,85,85,43,7,8,#logo_pal); PutPaletteImage(#logo,85,85,43,7,8,#logo_pal);
WriteTextB(46,100,0x90,0xBF40BF,ABOUT_TITLE); WriteTextB(46,100,0x90,0xBF40BF,ABOUT_TITLE);
#ifdef LANG_RUS WriteTextCenter(0,120,about_form.cwidth,0,INTRO_TEXT_2);
WriteText(50,120,0x80,0,INTRO_TEXT_2); WriteTextCenter(0,130,about_form.cwidth,0,"Leency Veliant PunkJoker");
#else WriteTextCenter(0,140,about_form.cwidth,0,"KolibriOS Team");
WriteText(55,120,0x80,0,INTRO_TEXT_2); WriteTextCenter(0,150,about_form.cwidth,0,"2008-2015");
#endif WriteTextCenter(10,170,70,0,INTRO_TEXT_3);
WriteText(39,130,0x80,0,"Leency & Veliant");
WriteText(45,140,0x80,0,"KolibriOS Team");
WriteText(61,150,0x80,0,"2008-2015");
#ifdef LANG_RUS
WriteText(19,170,0x80,0,INTRO_TEXT_3);
#else
WriteText(29,170,0x80,0,INTRO_TEXT_3);
#endif
DrawLink(71,170,0x80,23, "kolibri-n.org"); DrawLink(71,170,0x80,23, "kolibri-n.org");
DrawFlatButton(85,190,70,22,10,0xE4DFE1, INTRO_TEXT_4); DrawFlatButton(85,190,70,22,10,0xE4DFE1, INTRO_TEXT_4);
} }

View File

@ -86,9 +86,7 @@ void Paste()
if (DSDWORD[buf+4] != 3) return; if (DSDWORD[buf+4] != 3) return;
cnt = ESINT[buf+8]; cnt = ESINT[buf+8];
for (j = 0; j < cnt; j++) { for (j = 0; j < cnt; j++) {
debugi(j);
strlcpy(#copy_from, j*4096+buf+10, 4096); strlcpy(#copy_from, j*4096+buf+10, 4096);
debugln(#copy_from);
if (!copy_from) CopyExit(); if (!copy_from) CopyExit();
strcpy(#copy_to, #path); strcpy(#copy_to, #path);
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/')); strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));

View File

@ -95,8 +95,10 @@ void GetSizeDir(dword way)
void properties_dialog() void properties_dialog()
{ {
byte id; byte id;
unsigned int key; byte key;
dword file_name_off; dword file_name_off;
dword element_size;
char element_size_label[32];
proc_info settings_form; proc_info settings_form;
strcpy(#folder_info, "\0"); strcpy(#folder_info, "\0");
@ -157,7 +159,7 @@ void properties_dialog()
WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE); WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE);
if (!itdir) if (!itdir)
{ {
WriteText(100, 65, 0x80, 0x000000, ConvertSize(file_info_general.sizelo)); element_size = file_info_general.sizelo;
} }
else else
{ {
@ -167,9 +169,16 @@ void properties_dialog()
strcat(#folder_info, SET_7); strcat(#folder_info, SET_7);
strcat(#folder_info, itoa(dir_count)); strcat(#folder_info, itoa(dir_count));
WriteText(100, 80, 0x80, 0x000000, #folder_info); WriteText(100, 80, 0x80, 0x000000, #folder_info);
WriteText(100, 65, 0x80, 0x000000, ConvertSize(size_dir)); element_size = size_dir;
} }
EAX = ConvertSize(element_size);
strcpy(#element_size_label, EAX);
strcat(#element_size_label, " (");
strcat(#element_size_label, itoa(element_size));
strcat(#element_size_label, " b)");
WriteText(100, 65, 0x80, 0x000000, #element_size_label);
flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2;
flags_frame.font_color = sc.work_text; flags_frame.font_color = sc.work_text;
flags_frame.font_backgr_color = sc.work; flags_frame.font_backgr_color = sc.work;