forked from KolibriOS/kolibrios
Eolite 4.35: file selection with SHIFT holded, new /rd icon
git-svn-id: svn://kolibrios.org@7989 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
75b0246e8c
commit
36119794f4
@ -236,12 +236,23 @@ void main()
|
||||
|
||||
ProceedMouseGestures();
|
||||
|
||||
GetKeyModifier();
|
||||
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT)
|
||||
if (mouse.key&MOUSE_LEFT) && (mouse.up) {
|
||||
files.ProcessMouse(mouse.x, mouse.y);
|
||||
EventChooseFile(files.cur_y);
|
||||
List_ReDraw();
|
||||
break;
|
||||
}
|
||||
|
||||
if (files.MouseOver(mouse.x, mouse.y))
|
||||
{
|
||||
//select file
|
||||
if (mouse.key&MOUSE_LEFT) && (mouse.up)
|
||||
{
|
||||
if (files.ProcessMouse(mouse.x, mouse.y)) List_ReDraw(); else {
|
||||
if (files.ProcessMouse(mouse.x, mouse.y)) {
|
||||
List_ReDraw();
|
||||
} else {
|
||||
if (mouse.y - files.y / files.item_h + files.first == files.cur_y) Open(0);
|
||||
}
|
||||
}
|
||||
@ -405,6 +416,18 @@ void main()
|
||||
break;
|
||||
}
|
||||
|
||||
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) {
|
||||
if (key_scancode == SCAN_CODE_DOWN) {
|
||||
EventChooseFile(files.cur_y);
|
||||
files.KeyDown();
|
||||
} else if (key_scancode == SCAN_CODE_UP) {
|
||||
EventChooseFile(files.cur_y);
|
||||
files.KeyUp();
|
||||
} else break;
|
||||
List_ReDraw();
|
||||
break;
|
||||
}
|
||||
|
||||
if (files.ProcessKey(key_scancode))
|
||||
{
|
||||
List_ReDraw();
|
||||
@ -489,11 +512,9 @@ void main()
|
||||
Del_Form();
|
||||
break;
|
||||
case SCAN_CODE_INS:
|
||||
if (getElementSelectedFlag(files.cur_y) == true) setElementSelectedFlag(files.cur_y, false);
|
||||
else setElementSelectedFlag(files.cur_y, true);
|
||||
EventChooseFile(files.cur_y);
|
||||
files.KeyDown();
|
||||
List_ReDraw();
|
||||
DrawStatusBar();
|
||||
break;
|
||||
case SCAN_CODE_F1...SCAN_CODE_F10:
|
||||
FnProcess(key_scancode-58);
|
||||
@ -1314,4 +1335,14 @@ char line_param[4096+5];
|
||||
}
|
||||
}
|
||||
|
||||
void EventChooseFile(int _id)
|
||||
{
|
||||
if (getElementSelectedFlag(_id) == true) {
|
||||
setElementSelectedFlag(_id, false);
|
||||
} else {
|
||||
setElementSelectedFlag(_id, true);
|
||||
}
|
||||
DrawStatusBar();
|
||||
}
|
||||
|
||||
stop:
|
||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.4 KiB |
@ -43,7 +43,7 @@ void about_dialog()
|
||||
WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE);
|
||||
WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE);
|
||||
DrawRectangle3D(0,154,about_form.cwidth,1,sc.work_dark,sc.work_light);
|
||||
WriteTextLines(7,163,0x90,sc.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2019",20);
|
||||
WriteTextLines(7,163,0x90,sc.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2020",20);
|
||||
#ifdef LANG_RUS
|
||||
DrawStandartCaptButton(60,about_form.cheight-38,11,"ˆáâ®à¨ï à §à ¡®âª¨");
|
||||
#endif
|
||||
|
@ -46,47 +46,48 @@ struct _SystemDiscs
|
||||
void Click();
|
||||
} SystemDiscs=0;
|
||||
|
||||
#define DEV_H 17
|
||||
#define DEV_H_HOR 21
|
||||
|
||||
void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name)
|
||||
{
|
||||
switch(disk_first_letter)
|
||||
{
|
||||
case 'k':
|
||||
ESBYTE[dev_icon]=0;
|
||||
strcpy(disc_name, T_PROG);
|
||||
break;
|
||||
case 'r':
|
||||
ESBYTE[dev_icon]=0;
|
||||
strcpy(disc_name, T_SYS);
|
||||
break;
|
||||
case 'c':
|
||||
case 'k':
|
||||
ESBYTE[dev_icon]=1;
|
||||
strcpy(disc_name, T_CD);
|
||||
strcpy(disc_name, T_PROG);
|
||||
break;
|
||||
case 'f':
|
||||
ESBYTE[dev_icon]=2;
|
||||
strcpy(disc_name, T_FD);
|
||||
break;
|
||||
case 'c':
|
||||
ESBYTE[dev_icon]=3;
|
||||
strcpy(disc_name, T_CD);
|
||||
break;
|
||||
case 'h':
|
||||
case 'b':
|
||||
ESBYTE[dev_icon]=3;
|
||||
ESBYTE[dev_icon]=4;
|
||||
strcpy(disc_name, T_HD);
|
||||
break;
|
||||
case 's':
|
||||
ESBYTE[dev_icon]=3;
|
||||
ESBYTE[dev_icon]=4;
|
||||
strcpy(disc_name, T_SATA);
|
||||
break;
|
||||
case 'u':
|
||||
ESBYTE[dev_icon]=5;
|
||||
strcpy(disc_name, T_USB);
|
||||
break;
|
||||
case 't':
|
||||
ESBYTE[dev_icon]=4;
|
||||
ESBYTE[dev_icon]=5;
|
||||
strcpy(disc_name, T_RAM);
|
||||
break;
|
||||
case 'u':
|
||||
ESBYTE[dev_icon]=6;
|
||||
strcpy(disc_name, T_USB);
|
||||
break;
|
||||
default:
|
||||
ESBYTE[dev_icon]=3;
|
||||
strcpy(disc_name, T_UNC);
|
||||
ESBYTE[dev_icon]=5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,12 +127,12 @@ void _SystemDiscs::Get()
|
||||
void _SystemDiscs::Draw()
|
||||
{
|
||||
char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len;
|
||||
int draw_y, draw_x, draw_h;
|
||||
int draw_y, draw_x;
|
||||
|
||||
for (i=0; i<30; i++) DeleteButton(100+i);
|
||||
|
||||
if ( two_panels.checked) { draw_y = 41; draw_x = 2; draw_h = 21; }
|
||||
if (!two_panels.checked) { draw_y = 74; draw_x = 17; draw_h = 16; }
|
||||
if ( two_panels.checked) { draw_y = 41; draw_x = 2; }
|
||||
if (!two_panels.checked) { draw_y = 74; draw_x = 17; }
|
||||
|
||||
for (i=0;i<list.count;i++)
|
||||
{
|
||||
@ -141,21 +142,21 @@ void _SystemDiscs::Draw()
|
||||
if (two_panels.checked)
|
||||
{
|
||||
name_len = strlen(#dev_name)-1*8;
|
||||
DrawBar(draw_x, draw_y, name_len + 31, draw_h, 0xFFFFFF);
|
||||
DefineButton(draw_x+2, draw_y, name_len + 27, draw_h-1, 100+i+BT_HIDE,0xFFFFFF);
|
||||
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*6+dev_icon*17*18*3+#devices);
|
||||
DrawBar(draw_x, draw_y, name_len + 31, DEV_H_HOR, 0xFFFFFF);
|
||||
DefineButton(draw_x+2, draw_y, name_len + 27, DEV_H_HOR-1, 100+i+BT_HIDE,0xFFFFFF);
|
||||
_PutImage(draw_x + 5, draw_y+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
|
||||
WriteText(draw_x + 24, draw_y+3, 10110000b, 0, #dev_name+1);
|
||||
draw_x += name_len + 31;
|
||||
if (draw_x>=Form.cwidth-100) && (Form.cwidth) {
|
||||
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF);
|
||||
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF);
|
||||
draw_x = 2;
|
||||
draw_y += draw_h;
|
||||
draw_y += DEV_H_HOR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawBar(draw_x,draw_y,6,draw_h+1,0xFFFFFF);
|
||||
DrawBar(draw_x+6+18,draw_y,160-6-18,draw_h+1,0xFFFFFF);
|
||||
DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF);
|
||||
DrawBar(draw_x+6+18,draw_y,160-6-18,DEV_H+1,0xFFFFFF);
|
||||
DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF);
|
||||
if (show_dev_name.checked)
|
||||
{
|
||||
@ -166,16 +167,18 @@ void _SystemDiscs::Draw()
|
||||
if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name);
|
||||
WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name);
|
||||
}
|
||||
_PutImage(draw_x+6,draw_y, 18,17, is_active*6+dev_icon*17*18*3+#devices);
|
||||
draw_y += draw_h;
|
||||
_PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices);
|
||||
draw_y += DEV_H;
|
||||
}
|
||||
}
|
||||
if (two_panels.checked)
|
||||
{
|
||||
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF);
|
||||
DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF);
|
||||
DefineButton(Form.cwidth - 23, draw_y+2, 17,16, 60+BT_HIDE, 0xCCCccc);
|
||||
_PutImage(Form.cwidth - 21, draw_y+4, 14,13, 2*14*13*3+#factions);
|
||||
files.y = draw_y + draw_h + 17;
|
||||
files.y = draw_y + DEV_H_HOR + 17;
|
||||
} else {
|
||||
DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,12 +228,12 @@ void Tip(int y, dword caption, id, arrow)
|
||||
void ActionsDraw()
|
||||
{
|
||||
int i;
|
||||
int actions_y= SystemDiscs.list.count*16+108, lineh=16;
|
||||
int actions_y= SystemDiscs.list.count*DEV_H+108;
|
||||
Tip(actions_y-18, T_ACTIONS, 77, ""); //çàãîëîâîê
|
||||
for (i=0; actions[i*3]!=0; i++, actions_y+=lineh)
|
||||
for (i=0; actions[i*3]!=0; i++, actions_y+=DEV_H)
|
||||
{
|
||||
DrawBar(17,actions_y,160,lineh,0xFFFFFF); //áåëîå
|
||||
DefineButton(17,actions_y,159,lineh,actions[i*3]+BT_HIDE,0xE4DFE1);
|
||||
DrawBar(17,actions_y,160,DEV_H,0xFFFFFF); //áåëîå
|
||||
DefineButton(17,actions_y,159,DEV_H,actions[i*3]+BT_HIDE,0xE4DFE1);
|
||||
WriteText(45,actions_y+4,0x80,0,actions[i*3+1]);
|
||||
WriteText(-strlen(actions[i*3+2])*6+170,actions_y+4,0x80,0x999999,actions[i*3+2]);
|
||||
_PutImage(23,actions_y+2, 14,13, i*14*13*3+#factions);
|
||||
@ -239,8 +242,8 @@ void ActionsDraw()
|
||||
|
||||
void DrawLeftPanelBg()
|
||||
{
|
||||
int actions_y = SystemDiscs.list.count*16;
|
||||
int start_y = actions_y+156;
|
||||
int actions_y = SystemDiscs.list.count*DEV_H;
|
||||
int start_y = actions_y+159;
|
||||
int area_h;
|
||||
DrawBar(2,41,190,15,col.lpanel); //ñèíèé ïðÿìîóãîëüíèê - íàä äåâàéñàìè
|
||||
DrawBar(17,actions_y+75,160,15,col.lpanel); //ñèíèé ïðÿìîóãîëüíèê - ïîä äåâàéñàìè
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define TITLE "Eolite File Manager 4.3"
|
||||
#define ABOUT_TITLE "EOLITE 4.3"
|
||||
#define TITLE "Eolite File Manager 4.35"
|
||||
#define ABOUT_TITLE "EOLITE 4.35"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_FILE "” ©«"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "../lib/gui.h"
|
||||
|
||||
#define PANELH 28
|
||||
#define WIN_W 490
|
||||
#define WIN_W 520
|
||||
#define WIN_H 315
|
||||
#define BASE_TAB_BUTTON_ID 97
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user