Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4224 → Rev 4225

/programs/cmm/eolite/include/icons.h
1,6 → 1,6
char *ext[]={
"..", 17,
"<DIR>",16,
"<dir>",16, "<DIR>",16,
"txt", 1, "doc", 1, "rtf", 1, "odt", 1, "log", 1, "docx",1,
"htm", 2, "html",2, "mht", 2,
"ini", 3, "js", 3, "conf",3, "inf", 3,
30,11 → 30,19
 
#include "imgs\icons.txt"
 
void Put_icon(dword extension, xx, yy, fairing_color, default_icon)
void Put_icon(dword extension, xx, yy, fairing_color, icon_n)
{
int icon_n=default_icon, i;
for (i=0; ext[i]!=0; i+=2;) if (!strcmp(extension, ext[i])) { icon_n = ext[i+1]; break; }
int i;
 
if (extension) for (i=0; ext[i]!=0; i+=2;)
{
if (strcmpi(extension, ext[i])==0)
{
icon_n = ext[i+1];
break;
}
}
 
ficons_pal[0] = fairing_color;
PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
/programs/cmm/eolite/include/ini.h
33,11 → 33,15
IF (!strcmp(#parametr,"SelectionColor")) edit2.shift_color=col_selec=StrToCol(#option);
IF (!strcmp(#parametr,"LineHeight")) files.line_h = atoi(#option);
IF (!strcmp(#parametr,"ShowDeviceName")) show_dev_name=atoi(#option);
IF (!strcmp(#parametr,"RealFileNamesCase")) real_files_names_case=atoi(#option);
IF (parametr) && (!strcmp(#file_name+strrchr(#file_name,'.'),#parametr)) && (!onload)
{
errornum=RunProgram(#option,#file_path);
IF (errornum<0) Write_Error(errornum);
if (errornum<0)
{
if (errornum==-5) ShowOpenWithDialog(); else Write_Error(errornum);
}
return;
}
parametr=option=NULL;
/programs/cmm/eolite/include/left_panel.h
1,6 → 1,8
//Leency 2008-2013
 
#ifdef LANG_RUS
?define T_DEVICES "“áâனá⢠"
?define T_ACTIONS "„¥©á⢨ï"
char *actions[] = {
57, "®¢ë© ä ©«", "F7",
56, "®¢ ï ¯ ¯ª ", "F6",
7,10 → 9,9
60, " áâனª¨", "F10",
0,0,0
};
?define T_DEVICES "“áâனá⢠"
?define T_ACTIONS "„¥©á⢨ï"
 
#elif LANG_EST
?define T_DEVICES "Seadmed"
?define T_ACTIONS "Toimingud"
char *actions[] = {
57, "Uus fail", "F7",
56, "Uus kataloog", "F6",
17,11 → 18,9
60, "Seaded", "F10",
0,0,0
};
 
?define T_DEVICES "Seadmed"
?define T_ACTIONS "Toimingud"
 
#else
?define T_DEVICES "Devices"
?define T_ACTIONS "Actions"
char *actions[] = {
57, "New file", "F7",
56, "New folder", "F6",
28,9 → 27,6
60, "Options", "F10",
0,0,0
};
 
?define T_DEVICES "Devices"
?define T_ACTIONS "Actions"
#endif
 
 
77,8 → 73,10
strcpy(#disk_list[disc_num].Item, #sys_discs);
disc_num++;
}
if (strcmp(#disk_list[disc_num-1].Item, "/rd/1/")==0) if (GetDir(nullbuf, nullbuf, "/kolibrios/", DIRS_ALL)==0)
if (strcmp(#disk_list[disc_num-1].Item, "/rd/1/")==0)
{
if (GetDir(nullbuf, nullbuf, "/kolibrios/", DIRS_ALL)==0)
{
strcpy(#disk_list[disc_num].Item, "/kolibrios/");
kolibrios_drive = true;
disc_num++;
85,7 → 83,20
} else kolibrios_drive = false;
}
}
}
 
void DrawRamDiskSpace()
{
int free_rd_space = GetFreeRamDiskClusters() * 49 / ALL_RD_CLUSTERS;
DefineButton(120, 80, 49, 4, 27+BT_HIDE, 0);
if (!free_rd_space)
DrawBar(121, 81, 49-free_rd_space, 3, 0xFF0000);
else
{
DrawBar(121, 81, 49-free_rd_space, 3, 0x7A7F84);
DrawBar(121+49-free_rd_space, 81, free_rd_space, 3, 0xC4C4C4);
}
}
 
void SystemDiscsDraw()
{
109,6 → 120,7
case 'r':
dev_icon=0;
strcpy(#disc_name, "System ");
DrawRamDiskSpace();
break;
case 'c':
dev_icon=1;
143,8 → 155,7
strcpy(#disc_name, "Unknown ");
}
strcat(#disc_name, #dev_name);
if (show_dev_name) WriteText(45,i*16+79,0x80,0,#disc_name);
else WriteText(45,i*16+79,0x80,0,#dev_name);
if (show_dev_name) WriteText(45,i*16+79,0x80,0,#disc_name); else WriteText(45,i*16+79,0x80,0,#dev_name);
_PutImage(21,i*16+76, 14,13, dev_icon*14*13*3+#devices);
}
}
/programs/cmm/eolite/include/open_with.h
1,5 → 1,11
//Leency 2013
 
void ShowOpenWithDialog()
{
SwitchToAnotherThread();
CreateThread(#OpenWith,#open_with_stak+4092);
}
 
llist app_list;
struct app_list_string { char item[1024]; char ext[5]; };
app_list_string app_paths[100];
/programs/cmm/eolite/include/other.h
74,4 → 74,39
if (h <= 14) fill_h = h; else fill_h = 14;
for (i=0; i<fill_h; i++) DrawBar(x, y+i, w, 1, col_palette[14-i]);
DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
}
 
 
 
 
 
 
struct rd_info
{
dword function_number, reserved[4];
char path[4];
} rd_info;
 
#define ALL_RD_CLUSTERS 2847
int GetFreeRamDiskClusters()
{
dword free_size;
static dword old_free_size;
 
rd_info.function_number = 15;
strcpy(#rd_info.path, "/rd");
$mov eax,58
$mov ebx, #rd_info;
$int 0x40
if (EAX==0)
{
free_size=ECX;
old_free_size = ECX;
}
else
{
debugi(EAX);
free_size = old_free_size;
}
return free_size;
}