Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4071 → Rev 4072

/programs/cmm/eolite/Eolite.c
79,8 → 79,8
 
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
 
#define TITLE "Eolite File Manager v2.0.1"
#define ABOUT_TITLE "Eolite v2.0.1"
#define TITLE "Eolite File Manager v2.0.2"
#define ABOUT_TITLE "Eolite v2.0.2"
dword col_work = 0xE4DFE1;
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
dword col_padding = 0xC8C9C9;
/programs/cmm/eolite/include/menu.h
42,14 → 42,15
0, 0, 0};
#endif
 
llist menu;
int cur_action_buf;
 
void FileMenu()
{
mouse mm;
word slot, index, start_y;
llist menu;
word slot, key;
proc_info MenuForm;
int texty, newi;
int index;
 
menu.ClearList();
menu.SetSizes(m.x+Form.left+5,m.y+Form.top+GetSkinHeight(),10,0,0,18);
58,10 → 59,10
if (itdir) && (file_captions[index+2]>=200) continue;
if (strlen(file_captions[index])>menu.w) menu.w = strlen(file_captions[index]);
menu.count++;
menu.visible++;
}
menu.w = menu.w + 3 * 6 + 50;
menu.h = menu.count*menu.line_h;
texty = menu.line_h/2-4;
SetEventMask(100111b);
goto _MENU_DRAW;
71,22 → 72,21
slot = GetProcessSlot(MenuForm.ID);
if (slot != GetActiveProcess()) ExitProcess();
mm.get();
newi = mm.y - 1 / menu.line_h;
if (mm.y<=0) || (mm.y>menu.h+5) || (mm.x<0) || (mm.x>menu.w) newi=-1;
if (menu.current<>newi)
menu.current_temp = mm.y - 1 / menu.line_h;
if (mm.y<=0) || (mm.y>menu.h+5) || (mm.x<0) || (mm.x>menu.w) menu.current_temp = -1;
if (menu.current<>menu.current_temp)
{
menu.current=newi;
goto _ITEMS_DRAW;
menu.current=menu.current_temp;
MenuListRedraw();
}
if (mm.lkm) {action_buf = cur_action_buf; pause(5); ExitProcess(); }
break;
 
case evButton:
action_buf = GetButtonID();
ExitProcess();
break;
case evKey:
if (GetKey()==27) ExitProcess();
key = GetKey();
if (key==27) ExitProcess();
if (key == 13) {action_buf = cur_action_buf; ExitProcess(); }
if (menu.ProcessKey(key)) MenuListRedraw();
break;
case evReDraw: _MENU_DRAW:
95,15 → 95,22
DrawRectangle(0,0,menu.w+1,menu.h+2,col_border);
DrawBar(1,1,menu.w,1,0xFFFfff);
DrawPopupShadow(1,1,menu.w,menu.h,0);
MenuListRedraw();
}
}
 
_ITEMS_DRAW:
for (index=0, start_y=0; file_captions[index*3]!=0; index++)
void MenuListRedraw()
{
DefineButton(1,start_y+1,menu.w,menu.line_h-1,file_captions[index*3+2]+BT_HIDE+BT_NOFRAME,0xFFFFFF);
int start_y=0;
int index;
int texty = menu.line_h/2-4;
for (index=0; file_captions[index*3]!=0; index++)
{
if ((itdir) && (file_captions[index*3+2]>=200)) continue;
DrawBar(1,start_y+2,1,menu.line_h,0xFFFfff);
if (start_y/menu.line_h==menu.current)
{
cur_action_buf = file_captions[index*3+2];
DrawBar(2,start_y+2,menu.w-1,menu.line_h,0xFFFfff);
}
else
115,5 → 122,4
WriteText(-strlen(file_captions[index*3+1])*6-6+menu.w,start_y+texty+2,0x80,0x888888,file_captions[index*3+1]);
start_y+=menu.line_h;
}
}
}
/programs/cmm/eolite/include/open_with.h
106,22 → 106,7
key = GetKey();
if (key==27) ExitProcess();
if (key==13) { RunProgram(#app_paths[app_list.current].item, #file_path); ExitProcess(); }
if (key==177)
{
if (app_list.KeyDown()) DrawAppList();
}
if (key==178)
{
if (app_list.KeyUp()) DrawAppList();
}
if (key==180)
{
if (app_list.KeyHome()) DrawAppList();
}
if (key==181)
{
if (app_list.KeyEnd()) DrawAppList();
}
if (app_list.ProcessKey(key)) DrawAppList();
break;
case evReDraw: _APP_LIST_DRAW: