Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7309 → Rev 7310

/programs/cmm/eolite/Eolite.c
180,7 → 180,7
llist_copy(#files_inactive, #files);
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
loop(){
switch(WaitEvent())
switch(WaitEventTimeout(50))
{
case evMouse:
if (del_active) || (Form.status_window>2) break;
527,7 → 527,14
if (action_buf==110) FnProcess(8);
action_buf=0;
}
break;
default:
IF( SystemDiscs.Get() ) DrawDeviceAndActionsLeftPanel();
Update_Dir(#path,WITH_REDRAW);
}
if(cmd_free)
{
if(cmd_free==1) menu_stak=free(menu_stak);
810,6 → 817,60
}
}
 
dword __updateDirCount = 0;
void Update_Dir(dword dir_path, redraw){
int errornum, maxcount, i;
if (redraw!=ONLY_SHOW)
{
selected_count = 0;
if (buf) free(buf);
errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT);
if (errornum)
{
history.add(#path);
GoBack();
Write_Error(errornum);
return;
}
maxcount = sizeof(file_mas)/sizeof(dword)-1;
if (files.count>maxcount) files.count = maxcount;
if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
}
if (files.count!=-1)
{
if(!_not_draw) if (show_breadcrumb.checked) DrawBreadCrumbs(); else DrawPathBar();
history.add(#path);
SystemDiscs.Draw();
files.visible = files.h / files.item_h;
if (files.count < files.visible) files.visible = files.count;
if (redraw!=ONLY_SHOW) Sorting();
list_full_redraw = true;
if (redraw!=ONLY_OPEN)&&(!_not_draw)
{
if ( __updateDirCount!=files.count )
{
DrawStatusBar();
List_ReDraw();
__updateDirCount = files.count;
}
}
SetCurDir(dir_path);
}
if (files.count==-1) && (redraw!=ONLY_OPEN)
{
files.KeyHome();
if(!_not_draw)
{
list_full_redraw=true;
if ( __updateDirCount!=files.count )
{
DrawStatusBar();
List_ReDraw();
__updateDirCount = files.count;
}
}
}
}
 
inline Sorting()
{
/programs/cmm/eolite/include/left_panel.h
40,7 → 40,7
struct _SystemDiscs
{
collection list;
void Get();
byte Get();
void Draw();
void Click();
} SystemDiscs;
88,9 → 88,10
strcpy(disc_name, T_UNC);
}
}
 
void _SystemDiscs::Get()
dword __countSysDiscs = 0;
byte _SystemDiscs::Get()
{
byte ret = 0;
char dev_name[10], sys_discs[10];
int i1, j1, dev_num, dev_disc_num;
dword temp_file_count, tempbuf;
100,6 → 101,11
devbuf = malloc(10000);
ReadDir(19, devbuf, "/");
dev_num = EBX;
if (dev_num != __countSysDiscs)
{
__countSysDiscs = dev_num;
ret = 0xFF;
}
for (i1=0; i1<dev_num; i1++)
{
sprintf(#dev_name,"/%s",i1*304+ devbuf+72);
118,6 → 124,7
}
}
free(devbuf);
return ret;
}
 
void _SystemDiscs::Draw()
/programs/cmm/lib/kolibri.h
91,12 → 91,15
{
$mov eax,11
$int 0x40
wait_event_code = EAX;
}
 
inline fastcall dword WaitEventTimeout(EBX)
:dword WaitEventTimeout(dword time)
{
$mov eax,23
EAX = 23;
EBX = time;
$int 0x40
wait_event_code = EAX;
}
inline fastcall dword SetEventMask(EBX)