From e2d29bf68d082d64c0c305c448012f34b2eeacd1 Mon Sep 17 00:00:00 2001 From: Serhii Sakhno Date: Tue, 29 Oct 2013 21:50:46 +0000 Subject: [PATCH] Eolite 2.0.4: call filemenu from the keyboard git-svn-id: svn://kolibrios.org@4136 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 14 +++++++++++--- programs/cmm/eolite/include/menu.h | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 78aabe54a6..eaabf38062 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -79,17 +79,19 @@ enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir -#define TITLE "Eolite File Manager v2.0.3" -#define ABOUT_TITLE "Eolite v2.0.3" +#define TITLE "Eolite File Manager v2.0.4" +#define ABOUT_TITLE "Eolite v2.0.4" dword col_padding, col_selec, col_lpanel; int toolbar_buttons_x[7]={9,46,85,134,167,203}; char tmp_disk_del_param[3]="d0"; struct path_string { char Item[4096]; }; -int active_about=0; +byte active_about=0; word about_window; +byte menu_call_mouse=0; + llist files; byte @@ -212,6 +214,7 @@ void main() if (!m.pkm) && (!m.lkm) && (can_show) { can_show = 0; + menu_call_mouse = 1; if (m.y>=files.y) { SwitchToAnotherThread(); @@ -387,6 +390,11 @@ void main() IF (rename_active==1) {ReName(true); break;} Open(); break; + case 074: //menu + menu_call_mouse=0; + SwitchToAnotherThread(); + CreateThread(#FileMenu,#menu_stak+4092); + break; case 173: //Ctrl+Enter if (!itdir) { diff --git a/programs/cmm/eolite/include/menu.h b/programs/cmm/eolite/include/menu.h index 587347a5ac..86ec5a0c85 100644 --- a/programs/cmm/eolite/include/menu.h +++ b/programs/cmm/eolite/include/menu.h @@ -83,7 +83,8 @@ void FileMenu() break; case evReDraw: _MENU_DRAW: - DefineAndDrawWindow(m.x+Form.left+5, m.y+Form.top+GetSkinHeight(),menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); + if (menu_call_mouse) DefineAndDrawWindow(m.x+Form.left+5, m.y+Form.top+GetSkinHeight(),menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); + else DefineAndDrawWindow(Form.left+files.x+15, files.line_h*files.current+files.y+Form.top+30,menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); GetProcessInfo(#MenuForm, SelfInfo); DrawRectangle(0,0,menu.w+1,menu.h+2,sc.work_graph); DrawBar(1,1,menu.w,1,0xFFFfff);