From f711bf30d9af869cfc837e4f92d3e5153aa54166 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 7 Apr 2012 22:07:32 +0000 Subject: [PATCH] Eolite 1.15 unstable git-svn-id: svn://kolibrios.org@2587 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/fs/Eolite/trunk/Eolite.c-- | 36 +++++++++++-------- .../fs/Eolite/trunk/include/about_dialog.h | 2 +- programs/fs/Eolite/trunk/include/devices.h | 14 +++----- programs/fs/Eolite/trunk/include/some_code.h | 27 -------------- 4 files changed, 28 insertions(+), 51 deletions(-) diff --git a/programs/fs/Eolite/trunk/Eolite.c-- b/programs/fs/Eolite/trunk/Eolite.c-- index 6894003cda..a03f093cd8 100644 --- a/programs/fs/Eolite/trunk/Eolite.c-- +++ b/programs/fs/Eolite/trunk/Eolite.c-- @@ -1,6 +1,8 @@ //Leency & Veliant -=- KolibriOS Team -=- 2012 //GNU GPL licence. +//копировать через поток + #include "lib\kolibri.h" #include "lib\memory.h" #include "lib\edit_box_lib.h" @@ -16,7 +18,7 @@ int BUTTON_HEIGHT=18; #define ONLY_OPEN 2 //переменные -#define title "Eolite File Manager v1.11" +#define title "Eolite File Manager v1.15" dword videlenie=0x94AECE; //цвет выделенного элемента из списка файлов // int but_num, @@ -43,6 +45,10 @@ int toolbar_buttons_x[6]={9,46,85,134,167,203}; dword file_mas[6898]; int j, i, mouse_dd; +struct path_string { +char Item[4096]; +}; + dword stak[100]; //окно About edit_box edit1= {250,247,13,0xffffff,0x94AECE,0xD3DDEB,0xffffff,0,248,#edit_path,#mouse_dd,64,6,6}; @@ -57,6 +63,7 @@ dword buf, off; // #include "include\icons_f.h" #include "include\ini.h" #include "include\devices.h" +#include "include\history.h" void main() @@ -84,7 +91,7 @@ int pressed_y; { switch(WaitEvent()) { - CASE evMouse: + case evMouse: IF (del_active==1) break; id=GetSlot(Form.ID); @@ -152,23 +159,26 @@ int pressed_y; IF (del_active==1) {IF (id==301) || (id==302) Del_File(302-id); break;} switch(id) { - CASE 21: //Назад + case 21: //Back GoBack(); break; - CASE 23: //up! + case 22: //Forvard + HistoryPath(go_forvard); + break; + case 23: //up! IF (strcmp(#path,"/")<>0) Dir_Up(); break; - CASE 24: //cut + case 24: //cut key=24; - CASE 25: //copy + case 25: //copy goto CTRLC_MARK; - CASE 26: //paste + case 26: //paste Paste(); break; - CASE 27: //goto edit_path + case 27: //goto edit_path Goto_edit_path(); break; - CASE 31...33: //sort + case 31...33: //sort IF(sort_num==1) DrawBar(onLeft(192,168)/2+210,45,6,9,0xE4DFE1); IF(sort_num==2) DrawBar(onLeft(115,0),45,6,9,0xE4DFE1); IF(sort_num==3) DrawBar(onLeft(44,0),45,6,9,0xE4DFE1); @@ -787,12 +797,10 @@ void Dir_Up() inline fastcall void GoBack() //вначале удаляем текущий путь, а потом копируем то, что осталось { - i=strlen(#PathHistory)-1; - IF (i<7) RETURN; - PathHistory[i]=0x00; - copystr(#PathHistory+find_symbol(#PathHistory,'/'),#temp); //папка в которой были + char cur_folder[4096]; + copystr(GetCurrentFolder(), #cur_folder); HistoryPath(go_back); - SelectFile(#temp); + SelectFile(#cur_folder); } diff --git a/programs/fs/Eolite/trunk/include/about_dialog.h b/programs/fs/Eolite/trunk/include/about_dialog.h index 266b63c855..4e938bc4f7 100644 --- a/programs/fs/Eolite/trunk/include/about_dialog.h +++ b/programs/fs/Eolite/trunk/include/about_dialog.h @@ -37,7 +37,7 @@ void authors() DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,0,0,"About Eolite"); DrawBar(0,0,172,50,0x8494C4); //голубое сзади PutPaletteImage(#logo,85,85,43,7,#logo_pal); - WriteText(54-3,100,0x80,0xBF40BF,"Eolite v1.11",0); + WriteText(54-3,100,0x80,0xBF40BF,"Eolite v1.15",0); WriteText(55,120,0x80,0,"Developers:",0); WriteText(39,130,0x80,0,"Leency & Veliant",0); WriteText(30,140,0x80,0,"Diamond, Lrz, Nable",0); diff --git a/programs/fs/Eolite/trunk/include/devices.h b/programs/fs/Eolite/trunk/include/devices.h index 54f32af61f..7eed819105 100644 --- a/programs/fs/Eolite/trunk/include/devices.h +++ b/programs/fs/Eolite/trunk/include/devices.h @@ -1,10 +1,6 @@ //03.04.2012 -struct string { -char Item[4096]; -}; - -string disk_list[20]; +path_string disk_list[20]; int disc_num; @@ -25,6 +21,7 @@ void GetSystemDiscs() Open_Dir(#dev_name, ONLY_OPEN); dev_disc_num = count; + //if (count<=0) copystr(#dev_name,#disk_list[disc_num].Item); else for (j1=0; j12560) - { - copystr(#PathHistory+1024,#PathHistory); - copystr("/",#PathHistory+strlen(#PathHistory)); - } - copystr("|",#PathHistory+strlen(#PathHistory)); - copystr(#path,#PathHistory+strlen(#PathHistory)); - } - if (action==go_back) - { - i=strlen(#PathHistory)-1; - WHILE (PathHistory[i]<>'|') { i--; }; - IF (i>0) PathHistory[i]=0x00; - WHILE (PathHistory[i]<>'|') { copystr(#PathHistory[i],#path); i--; } - IF (i>0) PathHistory[i]=0x00; - } -} - - dword onLeft(dword right,left) {EAX=Form.width-right-left;} dword onTop(dword down,up) {EAX=Form.height-GetSkinWidth()-down-up;}