From 48561dae7e854f64be125dc7d42b0bdc5e729d7d Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 19 Jul 2015 18:45:59 +0000 Subject: [PATCH] Eolite 2.81 Fix: 1. crash after deactive window with new file/folder or rename dialog opened; 2. do not show unnecessary message after file/folder creation; 3. fix BROWSER_PATH; 4. fix labels. Refactoring. git-svn-id: svn://kolibrios.org@5581 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 94 ++++++++------------------ programs/cmm/eolite/include/about.h | 2 +- programs/cmm/eolite/include/settings.h | 8 +-- 3 files changed, 35 insertions(+), 69 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index ae23ebb167..21e24c8805 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -109,9 +109,10 @@ #endif enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir +enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement -#define TITLE "Eolite File Manager v2.8" -#define ABOUT_TITLE "Eolite v2.8" +#define TITLE "Eolite File Manager v2.81" +#define ABOUT_TITLE "Eolite v2.81" dword col_padding, col_selec, col_lpanel; int toolbar_buttons_x[7]={9,46,85,134,167,203}; @@ -161,7 +162,7 @@ signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; byte stats; edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xFFFFFF,0,248,#file_name,#mouse_dd,64,6,6}; -edit_box new_file_ed = {150,213,80,0xFFFFFF,0x94AECE,0x000000,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0}; +edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0}; PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0}; PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0}; byte cmd_free; @@ -191,8 +192,6 @@ void main() LoadIniSettings(); GetSystemDiscs(); SetAppColors(); - strcpy(#new_element_name, T_NEW_FILE); - new_file_ed.size = strlen(T_NEW_FILE); if (param) { strcpy(#path, #param); @@ -481,7 +480,6 @@ void main() case ASCII_KEY_ESC: break; case ASCII_KEY_ENTER: - //IF (rename_active==1) {ReName(true); break;} Open(0); break; case 074: //menu @@ -627,7 +625,7 @@ void draw_window() DrawFlatButton(files.x+files.w,onTop(22,0),16,16,0,sc.work,"\x19"); Open_Dir(#path,ONLY_SHOW); if (del_active) Del_Form(); - if (new_element_active) NewElement_Form(new_element_active); + if (new_element_active) NewElement_Form(new_element_active, #new_element_name); } @@ -836,7 +834,7 @@ inline Sorting() IF (sort_num==1) Sort_by_Name(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); - //".." should be first + //make ".." first item in list IF (k>0) && (strcmp(file_mas[0]*304+buf+72,"..")!=0) FOR(k--; k>0; k--;) IF (!strcmp(file_mas[k]*304+buf+72,"..")) {file_mas[k]>