mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-30 12:44:21 +03:00
Table: select all by CTRL+A and click on the left top cell
Eolite: do not show size for cd git-svn-id: svn://kolibrios.org@7518 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d620a37d75
commit
113f18111d
@ -1171,12 +1171,7 @@ dword GetDeviceSizeLabel(dword path)
|
|||||||
char cdname[8];
|
char cdname[8];
|
||||||
if (ESBYTE[path+1] == '/') path++;
|
if (ESBYTE[path+1] == '/') path++;
|
||||||
if (ESBYTE[path+1] == 'c') && (ESBYTE[path+2] == 'd')
|
if (ESBYTE[path+1] == 'c') && (ESBYTE[path+2] == 'd')
|
||||||
&& (ESBYTE[path+4] == 0) {
|
&& (ESBYTE[path+4] == 0) return 0;
|
||||||
//hack for http://board.kolibrios.org/viewtopic.php?p=72293#p72279
|
|
||||||
strcpy(#cdname, path);
|
|
||||||
strcat(#cdname, "/1");
|
|
||||||
path = #cdname;
|
|
||||||
}
|
|
||||||
GetFileInfo(path, #bdvk);
|
GetFileInfo(path, #bdvk);
|
||||||
return ConvertSize64(bdvk.sizelo, bdvk.sizehi);
|
return ConvertSize64(bdvk.sizelo, bdvk.sizehi);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define TITLE "Eolite File Manager 4.04"
|
#define TITLE "Eolite File Manager 4.04a"
|
||||||
#define ABOUT_TITLE "EOLITE 4.04"
|
#define ABOUT_TITLE "EOLITE 4.04a"
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
?define T_FILE "” ©«"
|
||||||
|
@ -11,7 +11,7 @@ extern char params[1024];
|
|||||||
#endif
|
#endif
|
||||||
char params[1024];
|
char params[1024];
|
||||||
|
|
||||||
#define TABLE_VERSION "0.99.1a"
|
#define TABLE_VERSION "0.99.2"
|
||||||
|
|
||||||
// strings
|
// strings
|
||||||
const char *sFileSign = "KolibriTable File\n";
|
const char *sFileSign = "KolibriTable File\n";
|
||||||
@ -45,10 +45,10 @@ kosSysColors sc;
|
|||||||
#define HEADER_CELL_COLOR_ACTIVE 0xC4C5BA //0xBBBBFF
|
#define HEADER_CELL_COLOR_ACTIVE 0xC4C5BA //0xBBBBFF
|
||||||
|
|
||||||
// button IDs
|
// button IDs
|
||||||
#define SAVE_BUTTON 0x11
|
#define SAVE_BUTTON 100
|
||||||
#define LOAD_BUTTON 0x12
|
#define LOAD_BUTTON 101
|
||||||
#define NEW_BUTTON 0x13
|
#define NEW_BUTTON 102
|
||||||
#define DRAG_BUTTON 0x20
|
#define SELECT_ALL_BUTTON 103
|
||||||
|
|
||||||
#define COL_BUTTON 0x100
|
#define COL_BUTTON 0x100
|
||||||
#define ROW_BUTTON (COL_BUTTON + 0x100)
|
#define ROW_BUTTON (COL_BUTTON + 0x100)
|
||||||
@ -125,6 +125,7 @@ int drag_x, drag_y;
|
|||||||
int old_end_x, old_end_y;
|
int old_end_x, old_end_y;
|
||||||
|
|
||||||
void draw_grid();
|
void draw_grid();
|
||||||
|
void EventGridSelectAll();
|
||||||
|
|
||||||
void DrawSelectedFrame(int x, int y, int w, int h, DWORD col)
|
void DrawSelectedFrame(int x, int y, int w, int h, DWORD col)
|
||||||
{
|
{
|
||||||
@ -329,6 +330,7 @@ void draw_grid()
|
|||||||
long x0 = 0, y0 = 0, x = 0, y = 0;
|
long x0 = 0, y0 = 0, x = 0, y = 0;
|
||||||
DWORD bg_color;
|
DWORD bg_color;
|
||||||
kos_DrawBar(0,0,cell_w[0],cell_h[0],HEADER_CELL_COLOR); // left top cell
|
kos_DrawBar(0,0,cell_w[0],cell_h[0],HEADER_CELL_COLOR); // left top cell
|
||||||
|
kos_DefineButton(0,0,cell_w[0]-4,cell_h[0]-4, SELECT_ALL_BUTTON + BT_NODRAW, 0);
|
||||||
|
|
||||||
//kos_DebugValue("sel_moved", sel_moved);
|
//kos_DebugValue("sel_moved", sel_moved);
|
||||||
|
|
||||||
@ -901,6 +903,9 @@ void process_key()
|
|||||||
else if (ctrl) {
|
else if (ctrl) {
|
||||||
switch (key_scancode)
|
switch (key_scancode)
|
||||||
{
|
{
|
||||||
|
case SCAN_CODE_KEY_A:
|
||||||
|
EventGridSelectAll();
|
||||||
|
break;
|
||||||
case SCAN_CODE_KEY_V:
|
case SCAN_CODE_KEY_V:
|
||||||
{
|
{
|
||||||
int i, j, x0, y0;
|
int i, j, x0, y0;
|
||||||
@ -1064,6 +1069,16 @@ void EventLoadFile()
|
|||||||
kos_AppRun("/sys/@notify", result);
|
kos_AppRun("/sys/@notify", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventGridSelectAll()
|
||||||
|
{
|
||||||
|
sel_y = 1;
|
||||||
|
sel_x = 1;
|
||||||
|
sel_end_x = col_count - 1;
|
||||||
|
sel_end_y = row_count - 1;
|
||||||
|
stop_edit();
|
||||||
|
draw_grid();
|
||||||
|
}
|
||||||
|
|
||||||
void process_button()
|
void process_button()
|
||||||
{
|
{
|
||||||
Dword button;
|
Dword button;
|
||||||
@ -1086,6 +1101,10 @@ void process_button()
|
|||||||
case LOAD_BUTTON:
|
case LOAD_BUTTON:
|
||||||
EventLoadFile();
|
EventLoadFile();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SELECT_ALL_BUTTON:
|
||||||
|
EventGridSelectAll();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (button >= COL_HEAD_BUTTON && button < ROW_HEAD_BUTTON)
|
if (button >= COL_HEAD_BUTTON && button < ROW_HEAD_BUTTON)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user