mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-24 17:59:38 +03:00
Eolite 2.0: open dialog improvements (scroll, key control, icons, no programs from /kolibrios/ drive if there is no /kolibrios/ drive), stack fixes (thanks Mario), fix single file copy, new shell icon
git-svn-id: svn://kolibrios.org@4057 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
fe0a297192
commit
211e3f5dcc
@ -79,8 +79,8 @@
|
||||
|
||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||
|
||||
#define TITLE "Eolite File Manager v1.99"
|
||||
#define ABOUT_TITLE "Eolite v1.99"
|
||||
#define TITLE "Eolite File Manager v2.0"
|
||||
#define ABOUT_TITLE "Eolite v2.0"
|
||||
dword col_work = 0xE4DFE1;
|
||||
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
|
||||
dword col_padding = 0xC8C9C9;
|
||||
@ -109,7 +109,7 @@ byte
|
||||
|
||||
proc_info Form;
|
||||
mouse m;
|
||||
int mouse_dd, scroll_used, scroll_size, sorting_arrow_x;
|
||||
int mouse_dd, scroll_used, scroll_size, sorting_arrow_x, kolibrios_drive;
|
||||
dword buf, off;
|
||||
dword file_mas[6898];
|
||||
int j, i;
|
||||
@ -200,7 +200,7 @@ void main()
|
||||
if (m.y>=files.y)
|
||||
{
|
||||
SwitchToAnotherThread();
|
||||
CreateThread(#FileMenu,#menu_stak);
|
||||
CreateThread(#FileMenu,#menu_stak+4092);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -287,7 +287,7 @@ void main()
|
||||
Copy(#file_path, NOCUT);
|
||||
break;
|
||||
case 26: //paste
|
||||
CreateThread(#Paste,#copy_stak);
|
||||
CreateThread(#Paste,#copy_stak+4092);
|
||||
break;
|
||||
case 31...33: //sort
|
||||
IF(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10);
|
||||
@ -360,7 +360,7 @@ void main()
|
||||
Copy(#file_path, NOCUT);
|
||||
break;
|
||||
case 022: //Ctrl+V
|
||||
CreateThread(#Paste,#copy_stak);
|
||||
CreateThread(#Paste,#copy_stak+4092);
|
||||
break;
|
||||
case 027: //Esc
|
||||
IF (rename_active==1) ReName(false);
|
||||
@ -426,13 +426,13 @@ void menu_action(dword id)
|
||||
if (id==201)
|
||||
{
|
||||
SwitchToAnotherThread();
|
||||
CreateThread(#OpenWith,#open_with_stak);
|
||||
CreateThread(#OpenWith,#open_with_stak+4092);
|
||||
}
|
||||
if (id==202) FnProcess(3); //F3
|
||||
if (id==203) FnProcess(4); //F4
|
||||
if (id==104) Copy(#file_path, NOCUT);
|
||||
if (id==105) Copy(#file_path, CUT);
|
||||
if (id==106) CreateThread(#Paste,#copy_stak);
|
||||
if (id==106) CreateThread(#Paste,#copy_stak+4092);
|
||||
if (id==207) FnProcess(2);
|
||||
if (id==108) Del_Form();
|
||||
if (id==109) FnProcess(5);
|
||||
@ -572,14 +572,14 @@ void Line_ReDraw(dword color, filenum){
|
||||
|
||||
if (! TestBit(attr, 4) ) //file or folder?
|
||||
{
|
||||
Put_icon(off+_strrchr(off,'.'), files.x+3, files.line_h/2-7+y, color);
|
||||
Put_icon(off+_strrchr(off,'.'), files.x+3, files.line_h/2-7+y, color, 0);
|
||||
WriteText(7-strlen(ConvertMemSize(ESDWORD[off-8]))*6+onLeft(75,0),files.line_h-6/2+y,0x80,0,ConvertMemSize(ESDWORD[off-8])); //size
|
||||
}
|
||||
else
|
||||
if (!strcmp("..",off))
|
||||
Put_icon("..", files.x+3, files.line_h/2-7+y, color);
|
||||
Put_icon("..", files.x+3, files.line_h/2-7+y, color, 0);
|
||||
else
|
||||
Put_icon("<DIR>", files.x+3, files.line_h/2-7+y, color);
|
||||
Put_icon("<DIR>", files.x+3, files.line_h/2-7+y, color, 0);
|
||||
if ( TestBit(attr, 1) ) || ( TestBit(attr, 2) ) text_col=0xA6A6B7; //system or hiden?
|
||||
if (color!=0xFFFfff)
|
||||
{
|
||||
@ -845,7 +845,7 @@ void FnProcess(char N)
|
||||
{
|
||||
case 1:
|
||||
SwitchToAnotherThread();
|
||||
CreateThread(#about_dialog,#about_stak);
|
||||
CreateThread(#about_dialog,#about_stak+4092);
|
||||
break;
|
||||
case 2:
|
||||
if (!files.count) break;
|
||||
@ -910,7 +910,7 @@ void FnProcess(char N)
|
||||
|
||||
stop:
|
||||
|
||||
char about_stak[512];
|
||||
char menu_stak[512];
|
||||
char open_with_stak[512];
|
||||
char menu_stak[4096];
|
||||
char copy_stak[4096];
|
||||
char open_with_stak[4096];
|
||||
char about_stak[4096];
|
Binary file not shown.
@ -2,6 +2,6 @@
|
||||
//Èêîíêè ïàïîê è ôàéëîâ//
|
||||
/////////////////////////
|
||||
|
||||
dword ficons_pal[] = {0xFCCEFC,0x5C627C,0xCCCCD0,0xFCFDFC,0x848AA4,0x9498AF,0xE4E2E4,0xF4F4FA,0x9CA4B6,0xABAEBC,0x7C829C,0xECEDEE,0xC4C2C9,0xE4E5EC,0xDBDCE4,0xD4D3DA,0xC4C6D4,0xFCB694,0xD7E2EF,0xBCBECC,0xFC9D73,0x5C7A9C,0x5C7AA4,0x647EA4,0x8CA2BC,0xE4EBF0,0xCCD5D9,0x7896B8,0xBCC2D4,0xD4EAFC,0xC4CBD1,0xCCDBE4,0x6C86A7,0xECF2F3,0xDCF0FC,0x748EAC,0xB5E2FC,0xC4DEFC,0xB9CDE4,0x7CAADA,0xABB2C4,0x6492CC,0x5484B8,0x5C89BC,0x9CADC4,0x6482A4,0xA47868,0x644A44,0x7C603C,0x6C4F26,0x644E44,0xFCFD9F,0xBA9D40,0xFCE274,0xFCDE60,0xC4A650,0xECD274,0xA29880,0xFCC354,0xECB847,0xFCF2F5,0xE4AA54,0xDCA24C,0x9B6A55,0x543A34,0x74799A,0x6EBEE0,0x7CBAE4,0xA4CAF4,0x040204,0xF43E4C,0x44CE3C,0x047CBC,0xFCC24C,0x9C8E74,0xFCBB3C,0xC4B6A4,0x7B828A,0xC48A34,0x54463C,0xAB5A04,0xFCE8A1,0xAC6A14,0xF4EED4,0xFBD65C,0xFCCA34,0xECB624,0x34120C,0xD2A226,0xAEC5DA,0x7C9DCC,0xB4DEF4,0x578FC4,0x94BAE4,0xECFEFC,0x84AAD4,0x2C72BD,0xA4C6EA,0x518AC2,0x447EBC,0x2669B1,0x8BB5E0,0xBCD2EC,0x1C62AC,0x6C9CC9,0x3C7AB4,0x64718B,0xC6CBE2,0x8496BC,0xEC8D99,0xD49694,0x949392,0xCC8387,0xBC7A24,0xBC6A1C,0xE7C267,0x8C5A14,0xD59A52,0xB0722C,0xF0DAB4,0xB45A04,0x8C522C,0xCC923F,0x9C5204,0x945204,0xCC9A14,0xFCFBD3,0xFCF6BC,0xFCDE98,0xFCEAC4,0xFCDA84,0xF4D67C,0xF4D27C,0xDCBA54,0x7CBE7C,0x1C8E1C,0xA98D04,0x1C8204,0x90D280,0x147E04,0x2C9018,0xBCFAAC,0x3CC234,0xC49204,0x488404,0x54AE4C,0xC8F7A4,0x84F26C,0x5CE64C,0x24AE1C,0xF8E4B4,0xB4D6A4,0x49A939,0xE4FED4,0xA8F694,0x4CDA44,0x44E63C,0x149E0C,0x848204,0x97B951,0x5C9D2F,0x6FCB4C,0x8CE264,0x4C9A24,0x749224,0xECCA7C,0xDCBE74,0x349E2C,0x5CAE3C,0x84B64C,0xD0EC90,0x84C73F,0x9CDA64,0x70B63C,0xBCE274,0xC4BA4C,0xDCB23C,0xC4E6F4,0x94CDC6,0x3CA674,0x51A389,0x74BAAC,0x2C8E64,0x64BEDC,0x3C8E94,0x1C6E5C,0x84AEA4,0x2489B9,0x1C6A84,0x145A6C,0x64827C,0xACBEA4,0x0C4E5C,0x4CA6CC,0x84BAB4,0xB4CEA4,0xA4CEAC,0x0796D9,0x1C96CC,0x2496CC,0x54CAFC,0x30A6D8,0xBC2E34,0x247AB4,0x946684,0x5C568C,0x447684,0x34867C,0x449664,0xA4CA94,0xF46264,0x8C6E34,0xACEE64,0x6CAE34,0xA02624,0xE42A3C,0xDC1A2C,0x846224,0xB4B2B4,0x8C4644,0x7C6634,0x509224,0xBBBCC3,0xACABAC,0x3C7A24,0x547A44,0xE15671,0x5C8614,0xC44244,0xDC4A6C,0x84BA1C,0x04A6F4,0xE4627C,0xEC7E94,0xA47A04,0x8C8C8C,0x848387,0x7B7C7E,0x9C9D9E,0xA4A3AC,0xD4CEDC,0xFCD94A,0xC9FEA4,0x5C6684,0xFCCE1C,0xFCC514,0x464F6A,0xF4EDFB,0xC4BEC7,0x515870,0x99C5F1,0xE4DEEC,0xFCA274,0x343644,0xFC0204,0xFCCBCC};
|
||||
dword ficons_pal[] = {0xFFC0E0,0x606078,0xC8C8D8,0xFAFAFB,0x8888A8,0xF8F8F8,0x9098B0,0xE0E0E0,0xF0F0F8,0xA0A0B8,0xA0A8C0,0x7880A0,0xE8E8F0,0xC8D0D0,0xC0C0C8,0xE0E0E8,0xF0F8FF,0xD8D8E0,0xD0D0D8,0xC8C8D0,0xFFB898,0xFFA078,0xA8A8B8,0x506880,0x6080A8,0xD8E0E8,0xA8A8C0,0x90A8C0,0xE8E8F8,0x7088B0,0xC8C8C8,0xB8C8D8,0xD8F0F8,0x98A0B8,0xA8B0C0,0xC0E8FF,0xF0F8F0,0x70A0D8,0x5888B8,0xA87868,0x604840,0x786038,0x705028,0x685048,0xF8F8A8,0xB89848,0xF8E070,0xC0A850,0xF0D068,0xA09880,0xF8C050,0xF0B848,0xF8F8F0,0xA07868,0xE0A850,0x986858,0x584038,0x707898,0x68C0D8,0xB0E0F8,0x70B8E0,0xF0E8F8,0x989898,0xD8D8D8,0x282828,0x303028,0x889090,0xFFFFFF,0x606058,0xA0A0A0,0x686868,0x888888,0x484840,0x484848,0x808080,0xB8B8C0,0x787878,0xB8B8B8,0xA8A8A8,0xA0C8F0,0xF84050,0x48D040,0x0078B8,0xF8C048,0x583830,0xFFD860,0x989070,0xF8B840,0xC0B8A8,0xD8B040,0x788088,0xC08830,0x584840,0xA85800,0xF8E8A8,0xA86818,0xF0F0D8,0xF8C830,0xF0B828,0x381010,0xD8A020,0xA8C8E0,0x78A0D0,0xD8E0F8,0x6090C8,0x6880A0,0x98B8E0,0x80A8D8,0x90A8D0,0x000000,0x3070B8,0xA0C8E8,0x5090C8,0x4888C0,0x88A8D0,0x4078B8,0x3078C0,0xB8D0E8,0x2868A8,0x88B0E0,0x90B8E0,0x2068B0,0xB8D0F0,0x2060A8,0x7098C8,0x687088,0xC0C8E0,0x8898B8,0xE89090,0xD09898,0x909088,0xC88080,0xB87820,0xB86818,0xE8C068,0x885810,0xB07818,0xD09850,0xA87028,0xF0D8B0,0xB05800,0x885028,0xC89048,0xC89038,0x985000,0xE8D8B0,0xC89810,0xFFF8D8,0xFFF8B8,0xFFFFC8,0xF8E098,0xFFE8C0,0xF8D888,0xF0D878,0xE8D070,0xE0B850,0x88D080,0x209018,0xA89008,0x188000,0x98D888,0xF8E0A0,0x309018,0xC0F8A8,0x40C038,0x289018,0xC89008,0x488000,0x58B050,0x88F070,0x58E850,0x30A028,0xF8E0B8,0xB8D8A8,0x48A840,0xA8F898,0x50D848,0x48E840,0x608818,0x90B850,0x589828,0xC8FFA0,0x70C848,0x88E068,0xD8C070,0x50A838,0xC8F098,0x80C840,0xA0D868,0x78B840,0xB0E868,0xC0B850,0xC8E8F8,0xD0E0E8,0x98D0D0,0x98C0A8,0x389070,0x50A098,0x186060,0x0898D8,0x207088,0x50A8D0,0x2898C8,0x58C8FF,0x2088B8,0x30A8D8,0xD08898,0xB82830,0x906888,0x585888,0x489860,0x68B030,0xA0C898,0xE86078,0x886830,0xA02828,0xE01828,0x904848,0x788870,0x407828,0x587848,0xE85878,0xC84048,0xE05068,0x80B820,0x08A8F8,0xE88098,0xE888A0,0xA87800,0xB8B8C8,0xFFD848,0xB8C0D0,0xFFC818,0x505870,0x98C8F0,0xFF9870,0x383848,0xFF0808};
|
||||
|
||||
unsigned char ficons[sizeof(file "imgs\icons.raw")] = FROM "imgs\icons.raw";
|
@ -1 +1 @@
|
||||
0x00FCCEFC,0x005C627C,0x00CCCCD0,0x00FCFDFC,0x00848AA4,0x009498AF,0x00E4E2E4,0x00F4F4FA,0x009CA4B6,0x00ABAEBC,0x007C829C,0x00ECEDEE,0x00C4C2C9,0x00E4E5EC,0x00DBDCE4,0x00D4D3DA,0x00C4C6D4,0x00FCB694,0x00D7E2EF,0x00BCBECC,0x00FC9D73,0x005C7A9C,0x005C7AA4,0x00647EA4,0x008CA2BC,0x00E4EBF0,0x00CCD5D9,0x007896B8,0x00BCC2D4,0x00D4EAFC,0x00C4CBD1,0x00CCDBE4,0x006C86A7,0x00ECF2F3,0x00DCF0FC,0x00748EAC,0x00B5E2FC,0x00C4DEFC,0x00B9CDE4,0x007CAADA,0x00ABB2C4,0x006492CC,0x005484B8,0x005C89BC,0x009CADC4,0x006482A4,0x00A47868,0x00644A44,0x007C603C,0x006C4F26,0x00644E44,0x00FCFD9F,0x00BA9D40,0x00FCE274,0x00FCDE60,0x00C4A650,0x00ECD274,0x00A29880,0x00FCC354,0x00ECB847,0x00FCF2F5,0x00E4AA54,0x00DCA24C,0x009B6A55,0x00543A34,0x0074799A,0x006EBEE0,0x007CBAE4,0x00A4CAF4,0x00040204,0x00F43E4C,0x0044CE3C,0x00047CBC,0x00FCC24C,0x009C8E74,0x00FCBB3C,0x00C4B6A4,0x007B828A,0x00C48A34,0x0054463C,0x00AB5A04,0x00FCE8A1,0x00AC6A14,0x00F4EED4,0x00FBD65C,0x00FCCA34,0x00ECB624,0x0034120C,0x00D2A226,0x00AEC5DA,0x007C9DCC,0x00B4DEF4,0x00578FC4,0x0094BAE4,0x00ECFEFC,0x0084AAD4,0x002C72BD,0x00A4C6EA,0x00518AC2,0x00447EBC,0x002669B1,0x008BB5E0,0x00BCD2EC,0x001C62AC,0x006C9CC9,0x003C7AB4,0x0064718B,0x00C6CBE2,0x008496BC,0x00EC8D99,0x00D49694,0x00949392,0x00CC8387,0x00BC7A24,0x00BC6A1C,0x00E7C267,0x008C5A14,0x00D59A52,0x00B0722C,0x00F0DAB4,0x00B45A04,0x008C522C,0x00CC923F,0x009C5204,0x00945204,0x00CC9A14,0x00FCFBD3,0x00FCF6BC,0x00FCDE98,0x00FCEAC4,0x00FCDA84,0x00F4D67C,0x00F4D27C,0x00DCBA54,0x007CBE7C,0x001C8E1C,0x00A98D04,0x001C8204,0x0090D280,0x00147E04,0x002C9018,0x00BCFAAC,0x003CC234,0x00C49204,0x00488404,0x0054AE4C,0x00C8F7A4,0x0084F26C,0x005CE64C,0x0024AE1C,0x00F8E4B4,0x00B4D6A4,0x0049A939,0x00E4FED4,0x00A8F694,0x004CDA44,0x0044E63C,0x00149E0C,0x00848204,0x0097B951,0x005C9D2F,0x006FCB4C,0x008CE264,0x004C9A24,0x00749224,0x00ECCA7C,0x00DCBE74,0x00349E2C,0x005CAE3C,0x0084B64C,0x00D0EC90,0x0084C73F,0x009CDA64,0x0070B63C,0x00BCE274,0x00C4BA4C,0x00DCB23C,0x00C4E6F4,0x0094CDC6,0x003CA674,0x0051A389,0x0074BAAC,0x002C8E64,0x0064BEDC,0x003C8E94,0x001C6E5C,0x0084AEA4,0x002489B9,0x001C6A84,0x00145A6C,0x0064827C,0x00ACBEA4,0x000C4E5C,0x004CA6CC,0x0084BAB4,0x00B4CEA4,0x00A4CEAC,0x000796D9,0x001C96CC,0x002496CC,0x0054CAFC,0x0030A6D8,0x00BC2E34,0x00247AB4,0x00946684,0x005C568C,0x00447684,0x0034867C,0x00449664,0x00A4CA94,0x00F46264,0x008C6E34,0x00ACEE64,0x006CAE34,0x00A02624,0x00E42A3C,0x00DC1A2C,0x00846224,0x00B4B2B4,0x008C4644,0x007C6634,0x00509224,0x00BBBCC3,0x00ACABAC,0x003C7A24,0x00547A44,0x00E15671,0x005C8614,0x00C44244,0x00DC4A6C,0x0084BA1C,0x0004A6F4,0x00E4627C,0x00EC7E94,0x00A47A04,0x008C8C8C,0x00848387,0x007B7C7E,0x009C9D9E,0x00A4A3AC,0x00D4CEDC,0x00FCD94A,0x00C9FEA4,0x005C6684,0x00FCCE1C,0x00FCC514,0x00464F6A,0x00F4EDFB,0x00C4BEC7,0x00515870,0x0099C5F1,0x00E4DEEC,0x00FCA274,0x00343644,0x00FC0204,0x00FCCBCC,
|
||||
0x00FFC0E0,0x00606078,0x00C8C8D8,0x00FAFAFB,0x008888A8,0x00F8F8F8,0x009098B0,0x00E0E0E0,0x00F0F0F8,0x00A0A0B8,0x00A0A8C0,0x007880A0,0x00E8E8F0,0x00C8D0D0,0x00C0C0C8,0x00E0E0E8,0x00F0F8FF,0x00D8D8E0,0x00D0D0D8,0x00C8C8D0,0x00FFB898,0x00FFA078,0x00A8A8B8,0x00506880,0x006080A8,0x00D8E0E8,0x00A8A8C0,0x0090A8C0,0x00E8E8F8,0x007088B0,0x00C8C8C8,0x00B8C8D8,0x00D8F0F8,0x0098A0B8,0x00A8B0C0,0x00C0E8FF,0x00F0F8F0,0x0070A0D8,0x005888B8,0x00A87868,0x00604840,0x00786038,0x00705028,0x00685048,0x00F8F8A8,0x00B89848,0x00F8E070,0x00C0A850,0x00F0D068,0x00A09880,0x00F8C050,0x00F0B848,0x00F8F8F0,0x00A07868,0x00E0A850,0x00986858,0x00584038,0x00707898,0x0068C0D8,0x00B0E0F8,0x0070B8E0,0x00F0E8F8,0x00989898,0x00D8D8D8,0x00282828,0x00303028,0x00889090,0x00FFFFFF,0x00606058,0x00A0A0A0,0x00686868,0x00888888,0x00484840,0x00484848,0x00808080,0x00B8B8C0,0x00787878,0x00B8B8B8,0x00A8A8A8,0x00A0C8F0,0x00F84050,0x0048D040,0x000078B8,0x00F8C048,0x00583830,0x00FFD860,0x00989070,0x00F8B840,0x00C0B8A8,0x00D8B040,0x00788088,0x00C08830,0x00584840,0x00A85800,0x00F8E8A8,0x00A86818,0x00F0F0D8,0x00F8C830,0x00F0B828,0x00381010,0x00D8A020,0x00A8C8E0,0x0078A0D0,0x00D8E0F8,0x006090C8,0x006880A0,0x0098B8E0,0x0080A8D8,0x0090A8D0,0x00000000,0x003070B8,0x00A0C8E8,0x005090C8,0x004888C0,0x0088A8D0,0x004078B8,0x003078C0,0x00B8D0E8,0x002868A8,0x0088B0E0,0x0090B8E0,0x002068B0,0x00B8D0F0,0x002060A8,0x007098C8,0x00687088,0x00C0C8E0,0x008898B8,0x00E89090,0x00D09898,0x00909088,0x00C88080,0x00B87820,0x00B86818,0x00E8C068,0x00885810,0x00B07818,0x00D09850,0x00A87028,0x00F0D8B0,0x00B05800,0x00885028,0x00C89048,0x00C89038,0x00985000,0x00E8D8B0,0x00C89810,0x00FFF8D8,0x00FFF8B8,0x00FFFFC8,0x00F8E098,0x00FFE8C0,0x00F8D888,0x00F0D878,0x00E8D070,0x00E0B850,0x0088D080,0x00209018,0x00A89008,0x00188000,0x0098D888,0x00F8E0A0,0x00309018,0x00C0F8A8,0x0040C038,0x00289018,0x00C89008,0x00488000,0x0058B050,0x0088F070,0x0058E850,0x0030A028,0x00F8E0B8,0x00B8D8A8,0x0048A840,0x00A8F898,0x0050D848,0x0048E840,0x00608818,0x0090B850,0x00589828,0x00C8FFA0,0x0070C848,0x0088E068,0x00D8C070,0x0050A838,0x00C8F098,0x0080C840,0x00A0D868,0x0078B840,0x00B0E868,0x00C0B850,0x00C8E8F8,0x00D0E0E8,0x0098D0D0,0x0098C0A8,0x00389070,0x0050A098,0x00186060,0x000898D8,0x00207088,0x0050A8D0,0x002898C8,0x0058C8FF,0x002088B8,0x0030A8D8,0x00D08898,0x00B82830,0x00906888,0x00585888,0x00489860,0x0068B030,0x00A0C898,0x00E86078,0x00886830,0x00A02828,0x00E01828,0x00904848,0x00788870,0x00407828,0x00587848,0x00E85878,0x00C84048,0x00E05068,0x0080B820,0x0008A8F8,0x00E88098,0x00E888A0,0x00A87800,0x00B8B8C8,0x00FFD848,0x00B8C0D0,0x00FFC818,0x00505870,0x0098C8F0,0x00FF9870,0x00383848,0x00FF0808,
|
@ -22,7 +22,7 @@ char *ext[]={
|
||||
"3ds", 20, "ico", 20, "cur", 20, "ani", 20, "vox", 20,
|
||||
"img", 21, "ima", 21,
|
||||
"dll", 22, "obj", 22, "dict",22,
|
||||
"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z", 23, "gz", 23,
|
||||
"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z", 23, "gz", 23, "kexp", 23,
|
||||
"iso", 24, "cue", 24, "nrg", 24, "mdf", 24,
|
||||
"grf", 25,
|
||||
0,0};
|
||||
@ -30,9 +30,9 @@ char *ext[]={
|
||||
|
||||
#include "imgs\icons.txt"
|
||||
|
||||
void Put_icon(dword extension, xx, yy, fairing_color)
|
||||
void Put_icon(dword extension, xx, yy, fairing_color, default_icon)
|
||||
{
|
||||
int icon_n=0, i;
|
||||
int icon_n=default_icon, i;
|
||||
for (i=0; ext[i]!=0; i+=2;) if (!strcmp(extension, ext[i])) { icon_n = ext[i+1]; break; }
|
||||
|
||||
ficons_pal[0] = fairing_color;
|
||||
@ -61,33 +61,33 @@ void IconFairing(dword filenum, x,y, color)
|
||||
DrawBar(x+1,y+11,1,4,color);
|
||||
GOTO RIGHT_PAINT;
|
||||
case 9: //inc
|
||||
DrawBar(208,y,1,3,color);
|
||||
DrawBar(209,y,2,4,color);
|
||||
DrawBar(210,y,1,15,color);
|
||||
PutPixel(198,y+14,color);
|
||||
DrawBar(199,y+13,1,2,color);
|
||||
DrawBar(200,y+12,10,3,color);
|
||||
PutPixel(205,y+11,color);
|
||||
DrawBar(206,y+10,1,2,color);
|
||||
DrawBar(207,y+9,1,3,color);
|
||||
PutPixel(207,y+7,color);
|
||||
DrawBar(208,y+6,2,7,color);
|
||||
PutPixel(209,y+5,color);
|
||||
DrawBar(x+13,y,1,3,color);
|
||||
DrawBar(x+14,y,2,4,color);
|
||||
DrawBar(x+15,y,1,15,color);
|
||||
PutPixel(x+3,y+14,color);
|
||||
DrawBar(x+4,y+13,1,2,color);
|
||||
DrawBar(x+5,y+12,10,3,color);
|
||||
PutPixel(x+10,y+11,color);
|
||||
DrawBar(x+11,y+10,1,2,color);
|
||||
DrawBar(x+12,y+9,1,3,color);
|
||||
PutPixel(x+12,y+7,color);
|
||||
DrawBar(x+13,y+6,2,7,color);
|
||||
PutPixel(x+14,y+5,color);
|
||||
return;
|
||||
case 10: //font
|
||||
DrawBar(x+1,y+1,1,13,color);
|
||||
DrawBar(197,y+1,1,11,color);
|
||||
DrawBar(198,y+1,1,10,color);
|
||||
DrawBar(199,y+1,1,9,color);
|
||||
DrawBar(200,y+1,1,7,color);
|
||||
DrawBar(201,y+1,1,5,color);
|
||||
DrawBar(202,y+1,1,4,color);
|
||||
DrawBar(203,y+1,1,2,color);
|
||||
DrawBar(209,y+1,1,13,color);
|
||||
DrawBar(208,y+1,1,11,color);
|
||||
PutPixel(204,y+6,color);
|
||||
DrawBar(203,y+10,2,1,color);
|
||||
DrawBar(202,y+11,2,3,color);
|
||||
DrawBar(x+2,y+1,1,11,color);
|
||||
DrawBar(x+3,y+1,1,10,color);
|
||||
DrawBar(x+4,y+1,1,9,color);
|
||||
DrawBar(x+5,y+1,1,7,color);
|
||||
DrawBar(x+6,y+1,1,5,color);
|
||||
DrawBar(x+7,y+1,1,4,color);
|
||||
DrawBar(x+8,y+1,1,2,color);
|
||||
DrawBar(x+14,y+1,1,13,color);
|
||||
DrawBar(x+13,y+1,1,11,color);
|
||||
PutPixel(x+9,y+6,color);
|
||||
DrawBar(x+8,y+10,2,1,color);
|
||||
DrawBar(x+7,y+11,2,3,color);
|
||||
return;
|
||||
case 12: //audio
|
||||
PutPixel(x+2,y+9,color);
|
||||
@ -101,22 +101,22 @@ void IconFairing(dword filenum, x,y, color)
|
||||
PutPixel(x+13,y+13,color);
|
||||
return;
|
||||
case 13: //skin
|
||||
PutPixel(210,y,color);
|
||||
PutPixel(x+15,y,color);
|
||||
return;
|
||||
case 16...17: //folder
|
||||
DrawBar(x,y,1,15,color);
|
||||
DrawBar(203,y,8,2,color);
|
||||
IF (filenum==17) PutPixel(206,y+1,0x1A7B17); //green arrow part
|
||||
DrawBar(x+8,y,8,2,color);
|
||||
IF (filenum==17) PutPixel(x+11,y+1,0x1A7B17); //green arrow part
|
||||
DrawBar(x+1,y+13,15,2,color);
|
||||
PutPixel(x+1,y,color); //.òî÷êè
|
||||
PutPixel(202,y,color);
|
||||
PutPixel(210,y+2,color);
|
||||
PutPixel(x+7,y,color);
|
||||
PutPixel(x+15,y+2,color);
|
||||
PutPixel(x+1,y+12,color);
|
||||
PutPixel(210,y+12,color);
|
||||
PutPixel(x+15,y+12,color);
|
||||
return;
|
||||
case 18: //êàðòðèäæ
|
||||
DrawBar(x,y+11,1,2,color);
|
||||
DrawBar(210,y+11,1,2,color);
|
||||
DrawBar(x+15,y+11,1,2,color);
|
||||
DrawBar(x,y+13,16,1,color);
|
||||
return;
|
||||
case 24: //îáðàç
|
||||
|
@ -80,8 +80,9 @@ void SystemDiscsGet()
|
||||
if (strcmp(#disk_list[disc_num-1].Item, "/rd/1/")==0) if (GetDir(nullbuf, nullbuf, "/kolibrios/", DIRS_ALL)==0)
|
||||
{
|
||||
strcpy(#disk_list[disc_num].Item, "/kolibrios/");
|
||||
kolibrios_drive = true;
|
||||
disc_num++;
|
||||
}
|
||||
} else kolibrios_drive = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//Leency 2013
|
||||
|
||||
llist app_list;
|
||||
struct app_list_string { char item[1024]; char icon; };
|
||||
struct app_list_string { char item[1024]; char ext[5]; };
|
||||
app_list_string app_paths[100];
|
||||
|
||||
int GetListOfPrograms()
|
||||
@ -11,8 +11,6 @@ int GetListOfPrograms()
|
||||
int tj, ti;
|
||||
static dword buff, fsize;
|
||||
|
||||
debug("GetListOfPrograms()");
|
||||
|
||||
free(buff);
|
||||
if (!GetFile(#buff, #fsize, abspath("Eolite.ini")))
|
||||
{
|
||||
@ -31,18 +29,20 @@ int GetListOfPrograms()
|
||||
case '=': InfType=OPTION; break;
|
||||
case 0x0a:
|
||||
case 0x0d:
|
||||
InfType=PARAM;
|
||||
if (!strcmp(#section,"Associations")) && (option)
|
||||
if (!strcmp(#section,"Associations")) && (option) && (InfType!=COMMENT)
|
||||
{
|
||||
for (ti=0; ti<app_list.count; ti++) //do not add duplications
|
||||
{
|
||||
if (strcmp(#app_paths[ti].item, #option)==0) GOTO _OUT;
|
||||
if (strcmp(#app_paths[ti].item, #option)==0) goto _OUT;
|
||||
}
|
||||
// for (i=0; ext[i]!=0; i+=2;) if (!strcmp(extension, ext[i])) { icon_n = ext[i+1]; break; }
|
||||
if (kolibrios_drive==false) && (strstr(#option,"kolibrios/")!=0) goto _OUT;
|
||||
strcpy(#app_paths[app_list.count].item, #option);
|
||||
if (strlen(#parametr)<=5) && (parametr[0]) strcpy(#app_paths[app_list.count].ext, #parametr);
|
||||
else strcpy(#app_paths[app_list.count].ext, "kex");
|
||||
app_list.count++;
|
||||
}
|
||||
_OUT:
|
||||
InfType=PARAM;
|
||||
parametr=option=NULL;
|
||||
break;
|
||||
default:
|
||||
@ -61,7 +61,7 @@ void OpenWith()
|
||||
#define OPEN_LIST_VISIBLE_N 12
|
||||
#define OPEN_LIST_LINE_H 20
|
||||
#define PANEL_H 40
|
||||
#define PADDING 8;
|
||||
#define PADDING 8
|
||||
int WIN_H;
|
||||
mouse mm;
|
||||
word key, slot;
|
||||
@ -93,6 +93,11 @@ void OpenWith()
|
||||
app_list.current = app_list.current_temp;
|
||||
DrawAppList();
|
||||
}
|
||||
if (mm.lkm)
|
||||
{
|
||||
RunProgram(#app_paths[app_list.current].item, #file_path);
|
||||
ExitProcess();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@ -100,11 +105,15 @@ void OpenWith()
|
||||
case evKey:
|
||||
key = GetKey();
|
||||
if (key==27) ExitProcess();
|
||||
break;
|
||||
|
||||
case evButton:
|
||||
RunProgram(#app_paths[GetButtonID()-10].item, #file_path);
|
||||
ExitProcess();
|
||||
if (key==13) { RunProgram(#app_paths[app_list.current].item, #file_path); ExitProcess(); }
|
||||
if (key==177) //down
|
||||
{
|
||||
if (app_list.KeyDown()) DrawAppList();
|
||||
}
|
||||
if (key==178) //up
|
||||
{
|
||||
if (app_list.KeyUp()) DrawAppList();
|
||||
}
|
||||
break;
|
||||
|
||||
case evReDraw: _APP_LIST_DRAW:
|
||||
@ -115,7 +124,7 @@ void OpenWith()
|
||||
DrawPopup(0,0,MenuForm.width-2,MenuForm.height-2,0, col_work, col_border);
|
||||
DrawRectangle(app_list.x-1, app_list.y-2, app_list.w+1, app_list.h+2, col_border);
|
||||
|
||||
Put_icon(#file_name+_strrchr(#file_name,'.'), 10, 13, col_work);
|
||||
Put_icon(#file_name+_strrchr(#file_name,'.'), 10, 13, col_work, 0);
|
||||
WriteText(35,10, 0x80, 0, T_SELECT_APP_TO_OPEN_WITH);
|
||||
WriteText(35,23, 0x80, 0, #file_name);
|
||||
|
||||
@ -125,13 +134,19 @@ void OpenWith()
|
||||
|
||||
void DrawAppList()
|
||||
{
|
||||
#define SCROLL_WIDTH 5
|
||||
llist tiny_scroll;
|
||||
dword index, col_bg;
|
||||
for (index = 0; (index<app_list.visible) && (index+app_list.first<app_list.count); index++)
|
||||
{
|
||||
DefineButton(app_list.x, index*app_list.line_h+app_list.y, app_list.w, app_list.line_h-1, index+app_list.first+10+BT_HIDE+BT_NOFRAME, 0);
|
||||
if (index+app_list.first==app_list.current) col_bg = col_selec; else col_bg = 0xFFFfff;
|
||||
DrawBar(app_list.x, index*app_list.line_h+app_list.y, app_list.w, app_list.line_h, col_bg);
|
||||
Put_icon("kex", app_list.x+4, index*app_list.line_h+app_list.y+2, col_bg);
|
||||
WriteText(app_list.x+23, index*app_list.line_h+app_list.y+7, 0x80, 0, #app_paths[index+app_list.first].item);
|
||||
Put_icon(#app_paths[index+app_list.first].ext, app_list.x+4, index*app_list.line_h+app_list.y+2, col_bg, 6);
|
||||
WriteText(app_list.x+25, index*app_list.line_h+app_list.y+7, 0x80, 0, #app_paths[index+app_list.first].item);
|
||||
}
|
||||
tiny_scroll.h = app_list.w*app_list.visible/app_list.count;
|
||||
tiny_scroll.x = app_list.x+app_list.w-SCROLL_WIDTH-1;
|
||||
tiny_scroll.y = app_list.first * app_list.h / app_list.count + app_list.y;
|
||||
if (tiny_scroll.y + tiny_scroll.h - app_list.y > app_list.h) tiny_scroll.y = app_list.y + app_list.h - tiny_scroll.h-1;
|
||||
DrawBar(tiny_scroll.x, tiny_scroll.y, SCROLL_WIDTH, tiny_scroll.h, 0x555555); //scroll
|
||||
}
|
Loading…
Reference in New Issue
Block a user