forked from KolibriOS/kolibrios
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];
|
||||
if (ESBYTE[path+1] == '/') path++;
|
||||
if (ESBYTE[path+1] == 'c') && (ESBYTE[path+2] == 'd')
|
||||
&& (ESBYTE[path+4] == 0) {
|
||||
//hack for http://board.kolibrios.org/viewtopic.php?p=72293#p72279
|
||||
strcpy(#cdname, path);
|
||||
strcat(#cdname, "/1");
|
||||
path = #cdname;
|
||||
}
|
||||
&& (ESBYTE[path+4] == 0) return 0;
|
||||
GetFileInfo(path, #bdvk);
|
||||
return ConvertSize64(bdvk.sizelo, bdvk.sizehi);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define TITLE "Eolite File Manager 4.04"
|
||||
#define ABOUT_TITLE "EOLITE 4.04"
|
||||
#define TITLE "Eolite File Manager 4.04a"
|
||||
#define ABOUT_TITLE "EOLITE 4.04a"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_FILE "” ©«"
|
||||
|
@ -11,7 +11,7 @@ extern char params[1024];
|
||||
#endif
|
||||
char params[1024];
|
||||
|
||||
#define TABLE_VERSION "0.99.1a"
|
||||
#define TABLE_VERSION "0.99.2"
|
||||
|
||||
// strings
|
||||
const char *sFileSign = "KolibriTable File\n";
|
||||
@ -45,10 +45,10 @@ kosSysColors sc;
|
||||
#define HEADER_CELL_COLOR_ACTIVE 0xC4C5BA //0xBBBBFF
|
||||
|
||||
// button IDs
|
||||
#define SAVE_BUTTON 0x11
|
||||
#define LOAD_BUTTON 0x12
|
||||
#define NEW_BUTTON 0x13
|
||||
#define DRAG_BUTTON 0x20
|
||||
#define SAVE_BUTTON 100
|
||||
#define LOAD_BUTTON 101
|
||||
#define NEW_BUTTON 102
|
||||
#define SELECT_ALL_BUTTON 103
|
||||
|
||||
#define 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;
|
||||
|
||||
void draw_grid();
|
||||
void EventGridSelectAll();
|
||||
|
||||
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;
|
||||
DWORD bg_color;
|
||||
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);
|
||||
|
||||
@ -901,6 +903,9 @@ void process_key()
|
||||
else if (ctrl) {
|
||||
switch (key_scancode)
|
||||
{
|
||||
case SCAN_CODE_KEY_A:
|
||||
EventGridSelectAll();
|
||||
break;
|
||||
case SCAN_CODE_KEY_V:
|
||||
{
|
||||
int i, j, x0, y0;
|
||||
@ -1064,6 +1069,16 @@ void EventLoadFile()
|
||||
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()
|
||||
{
|
||||
Dword button;
|
||||
@ -1086,6 +1101,10 @@ void process_button()
|
||||
case LOAD_BUTTON:
|
||||
EventLoadFile();
|
||||
break;
|
||||
|
||||
case SELECT_ALL_BUTTON:
|
||||
EventGridSelectAll();
|
||||
break;
|
||||
}
|
||||
if (button >= COL_HEAD_BUTTON && button < ROW_HEAD_BUTTON)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user