Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5575 → Rev 5576

/programs/cmm/eolite/include/about.h
25,7 → 25,7
byte id;
proc_info about_form;
 
IF (active_about) ExitProcess();
IF (active_about){cmd_free = 2;ExitProcess();}
active_about=1;
loop() switch(WaitEvent())
{
34,6 → 34,7
IF (id==1) || (id==10)
{
active_about=0;
cmd_free = 2;
ExitProcess();
}
IF (id==23) RunProgram(BROWSER_PATH, BROWSER_LINK);
43,23 → 44,24
IF (GetKey()==27)
{
active_about=0;
cmd_free = 2;
ExitProcess();
}
break;
case evReDraw:
DefineAndDrawWindow(Form.left + 200,150,181,228+GetSkinHeight(),0x34,sc.work,INTRO_TEXT_1);
DefineAndDrawWindow(Form.left+Form.width/2,Form.top+Form.height/2-114,300,228+GetSkinHeight(),0x34,sc.work,INTRO_TEXT_1);
GetProcessInfo(#about_form, SelfInfo);
if (Form.status_window>2) break;
DrawBar(0,0,about_form.cwidth,50,0x8494C4);
PutPaletteImage(#logo,85,85,43,7,8,#logo_pal);
WriteTextB(46,100,0x90,0xBF40BF,ABOUT_TITLE);
PutPaletteImage(#logo,85,85,about_form.width/2-43,7,8,#logo_pal);
WriteTextB(about_form.width/2-46,100,0x90,0xBF40BF,ABOUT_TITLE);
WriteTextCenter(0,120,about_form.cwidth,0,INTRO_TEXT_2);
WriteTextCenter(0,130,about_form.cwidth,0,"Leency Veliant PunkJoker");
WriteTextCenter(0,130,about_form.cwidth,0,"Leency Veliant PunkJoker Pavelyakov");
WriteTextCenter(0,140,about_form.cwidth,0,"KolibriOS Team");
WriteTextCenter(0,150,about_form.cwidth,0,"2008-2015");
WriteTextCenter(10,170,70,0,INTRO_TEXT_3);
DrawLink(71,170,0x80,23, "kolibri-n.org");
DrawFlatButton(85,190,70,22,10,0xE4DFE1, INTRO_TEXT_4);
WriteTextCenter(10,170,about_form.width-125,0,INTRO_TEXT_3);
DrawLink(about_form.width/2-15,170,0x80,23, "kolibri-n.org");
DrawFlatButton(about_form.width/2-35,about_form.height-60,70,22,10,0xE4DFE1, INTRO_TEXT_4);
}
}
/programs/cmm/eolite/include/left_panel.h
9,6 → 9,15
60, " áâனª¨", "F10",
0,0,0
};
?define T_PROG "à®£à ¬¬ë "
?define T_SYS "‘¨á⥬  "
?define T_UNC "¥¨§¢¥áâ­® "
?define T_CD "CD-ROM "
?define T_FD "„¨áª¥â  "
?define T_HD "†¥á⪨© ¤¨áª "
?define T_SATA "SATA ¤¨áª "
?define T_USB "USB ¤¨áª "
?define T_RAM "RAM ¤¨áª "
#elif LANG_EST
?define T_DEVICES "Seadmed"
?define T_ACTIONS "Toimingud"
18,6 → 27,15
60, "Seaded", "F10",
0,0,0
};
?define T_PROG "Programs "
?define T_SYS "System "
?define T_UNC "Unknown "
?define T_CD "CD-ROM "
?define T_FD "Floppy disk "
?define T_HD "Hard disk "
?define T_SATA "SATA disk"
?define T_USB "USB disk"
?define T_RAM "RAM disk"
#else
?define T_DEVICES "Devices"
?define T_ACTIONS "Actions"
27,6 → 45,15
60, "Settings", "F10",
0,0,0
};
?define T_PROG "Programs "
?define T_SYS "System "
?define T_UNC "Unknown "
?define T_CD "CD-ROM "
?define T_FD "Floppy disk "
?define T_HD "Hard disk "
?define T_SATA "SATA disk"
?define T_USB "USB disk"
?define T_RAM "RAM disk"
#endif
 
 
50,7 → 77,7
void GetSystemDiscs()
{
char dev_name[10], sys_discs[10];
int i1, j1, dev_num, dev_disc_num;
int i1, j1, dev_num, dev_disc_num,l;
disc_num=0;
if (devbuf) free(devbuf);
devbuf = malloc(10000); //áóôåð ãäå-òî íà 10 äåâàéñîâ â ëåâîé ïàíåëè
58,31 → 85,28
dev_num = EBX;
for (i1=0; i1<dev_num; i1++)
{
strcpy(#dev_name, "/"); // /
strcat(#dev_name, i1*304+ devbuf+72); // /rd
strcat(#dev_name, "/"); // /rd/
sprintf(#dev_name,"/%s/",i1*304+ devbuf+72);
Open_Dir(#dev_name, ONLY_OPEN);
dev_disc_num = files.count;
//if (files.count<=0) copystr(#dev_name,#disk_list[disc_num].Item); else
for (j1=0; j1<dev_disc_num; j1++;)
{
strcpy(#sys_discs, #dev_name); // /rd/
strcat(#sys_discs, j1*304+ buf+72); // /rd/1
strcat(#sys_discs, "/"); // /rd/1/
strcpy(#disk_list[disc_num].Item, #sys_discs);
l=sprintf(#sys_discs,"%s%s/",#dev_name,j1*304+ buf+72);
strncpy(#disk_list[disc_num].Item, #sys_discs,l);
disc_num++;
}
if (strcmp(#sys_discs, "/rd/1/")==0)
if (strncmp(#sys_discs, "/rd/1/",6)==0)
{
if (isdir("/kolibrios"))
{
strcpy(#disk_list[disc_num].Item, "/kolibrios/");
strncpy(#disk_list[disc_num].Item, "/kolibrios/",11);
kolibrios_drive = true;
disc_num++;
} else kolibrios_drive = false;
}
else kolibrios_drive = false;
}
}
}
 
 
void DrawSystemDiscs()
102,40 → 126,40
{
case 'k':
dev_icon=0;
strcpy(#disc_name, "Programs ");
strcpy(#disc_name, T_PROG);
break;
case 'r':
dev_icon=0;
strcpy(#disc_name, "System ");
strcpy(#disc_name, T_SYS);
break;
case 'c':
dev_icon=1;
strcpy(#disc_name, "CD-ROM ");
strcpy(#disc_name, T_CD);
break;
case 'f':
dev_icon=2;
strcpy(#disc_name, "Floppy disk ");
strcpy(#disc_name, T_FD);
break;
case 'h':
case 'b':
dev_icon=3;
strcpy(#disc_name, "Hard disk ");
strcpy(#disc_name, T_HD);
break;
case 's':
dev_icon=3;
strcpy(#disc_name, "SATA disk ");
strcpy(#disc_name, T_SATA);
break;
case 'u':
dev_icon=5;
strcpy(#disc_name, "USB flash ");
strcpy(#disc_name, T_USB);
break;
case 't':
dev_icon=4;
strcpy(#disc_name, "RAM disk ");
strcpy(#disc_name, T_RAM);
break;
default:
dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê íî ýòî íåïðàâèëüíî
strcpy(#disc_name, "Unknown ");
strcpy(#disc_name, T_UNC);
}
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);
/programs/cmm/eolite/include/menu.h
72,16 → 72,16
loop() switch(WaitEvent())
{
case evMouse:
if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
mm.get();
if (menu.ProcessMouse(mm.x, mm.y)) MenuListRedraw();
if (mm.key&MOUSE_LEFT)&&(m.click) {action_buf = cur_action_buf; pause(5); ExitProcess(); }
if (!CheckActiveProcess(MenuForm.ID)){ cmd_free=1; ExitProcess();}
else if (mm.move)&&(menu.ProcessMouse(mm.x, mm.y)) MenuListRedraw();
else if (mm.key&MOUSE_LEFT)&&(mm.down) {action_buf = cur_action_buf; pause(5); cmd_free=1; ExitProcess(); }
break;
case evKey:
key = GetKey();
if (key==27) ExitProcess();
if (key == 13) {action_buf = cur_action_buf; ExitProcess(); }
if (key==27){cmd_free=1;ExitProcess();}
else if (key == 13) {action_buf = cur_action_buf; cmd_free=1; ExitProcess(); }
if (menu.ProcessKey(key)) MenuListRedraw();
break;
/programs/cmm/eolite/include/properties.h
66,9 → 66,7
for (i=0; i<fcount; i++)
{
filename = i*304+dirbuf+72;
strcpy(#cur_file, way);
chrcat(#cur_file, '/');
strcat(#cur_file, filename);
sprintf(#cur_file,"%s/%s",way,filename);
if ( TestBit(ESDWORD[filename-40], 4) )
{
dir_count++;
98,8 → 96,7
{
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
if (ESBYTE[selected_offset2]) {
strcpy(#cur_file, way);
strcat(#cur_file, file_mas[i]*304+buf+72);
sprintf(#cur_file,way,file_mas[i]*304+buf+72);
 
GetFileInfo(#cur_file, #file_info_general);
if ( file_info_general.isfolder )
128,10 → 125,10
dword file_name_off;
dword element_size;
dword selected_offset2;
char element_size_label[32];
char element_size_label[32],tmp;
proc_info settings_form;
strcpy(#folder_info, "\0");
DSBYTE[#folder_info]=0;
file_count = 0;
dir_count = 0;
size_dir = 0;
152,7 → 149,7
{
case evButton:
id=GetButtonID();
IF (id==1) || (id==10) ExitProcess();
IF (id==1) || (id==10){cmd_free=3;ExitProcess();}
if (id==20) SetProperties(id);
if (id==21) SetProperties(id);
if (id==22) SetProperties(id);
166,7 → 163,7
case evKey:
key = GetKey();
IF (key==27) ExitProcess();
IF (key==27){cmd_free=3;ExitProcess();}
EAX=key<<8;
edit_box_key stdcall(#file_name_ed);
edit_box_key stdcall(#path_to_file_ed);
186,10 → 183,7
if (selected_count)
{
Put_icon('', 18, 19, 0xFFFfff, 0);
strcpy(#folder_info, SET_6);
strcat(#folder_info, itoa(file_count));
strcat(#folder_info, SET_7);
strcat(#folder_info, itoa(dir_count));
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
WriteText(50, 23, 0x80, 0x000000, #folder_info);
EAX = ConvertSize(size_dir);
strcpy(#element_size_label, EAX);
196,6 → 190,8
strcat(#element_size_label, " (");
strcat(#element_size_label, itoa(size_dir));
strcat(#element_size_label, " b)");
//tmp = ConvertSize(size_dir);
//sprintf(#element_size_label," ( byte)");
WriteText(100, 65, 0x80, 0x000000, #element_size_label);
}
else
215,10 → 211,7
else
{
WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS);
strcpy(#folder_info, SET_6);
strcat(#folder_info, itoa(file_count));
strcat(#folder_info, SET_7);
strcat(#folder_info, itoa(dir_count));
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
WriteText(100, 80, 0x80, 0x000000, #folder_info);
element_size = size_dir;
}
235,6 → 228,9
strcat(#element_size_label, " (");
strcat(#element_size_label, itoa(element_size));
strcat(#element_size_label, " b)");
//sprintf(#element_size_label,"%s (%d byte)","",element_size);
//tmp = ConvertSize(element_size);
//sprintf(#element_size_label,"%s (%d byte)",tmp,element_size);
WriteText(100, 65, 0x80, 0x000000, #element_size_label);
flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2;
/programs/cmm/eolite/include/settings.h
12,6 → 12,7
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
?define CANCEL_T "Žâ¬¥­ "
?define APPLY_T "à¨¬¥­¨âì"
?define T_DOUBLE_CLICK "‚à¥¬ï ¤¢®©­®£® ª«¨ª (¢ á®âëå)"
#else
?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
?define TITLE_SETT "Settings"
22,6 → 23,7
?define NOTIFY_COPY_END "Notify when copying finished"
?define CANCEL_T "Cancel"
?define APPLY_T "Apply"
?define T_DOUBLE_CLICK "Time double click (in hundredths)"
#endif
 
char confir_section = "Config";
33,11 → 35,16
unsigned int key;
proc_info settings_form;
if (active_settings) ExitProcess();
if (active_settings){cmd_free = 4;ExitProcess();}
active_settings=1;
SetEventMask(0x27);
 
loop() switch(WaitEvent())
loop(){
switch(WaitEvent())
{
case evMouse:
break;
case evButton:
id=GetButtonID();
if (id==10)
45,11 → 52,13
SaveIniSettings();
active_settings=0;
action_buf = 300;
cmd_free = 4;
ExitProcess();
}
if (id==1) || (id==11)
{
active_settings=0;
cmd_free = 4;
ExitProcess();
}
if (id==5)
63,6 → 72,8
if (id==23) use_big_fonts ^= 1;
if (id==25) files.line_h++;
if (id==26) && (files.line_h>8) files.line_h--;
if (id==27) MOUSE_TIME++;
if (id==28) && (MOUSE_TIME>30) MOUSE_TIME--;
DrawSettingsCheckBoxes();
break;
72,19 → 83,21
{
active_settings = 0;
action_buf = 300;
cmd_free = 4;
ExitProcess();
}
break;
case evReDraw:
DefineAndDrawWindow(Form.left + 100, 150, 300, 232+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
DefineAndDrawWindow(Form.left + Form.width/2, Form.top + Form.height/2 - 75, 300, 232+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
GetProcessInfo(#settings_form, SelfInfo);
DrawSettingsCheckBoxes();
DrawFlatButton(9, 138, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
DrawFlatButton(128, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, APPLY_T);
DrawFlatButton(208, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, CANCEL_T);
DrawFlatButton(9, 168, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
DrawFlatButton(128, settings_form.cheight - 30, 70, 22, 10, 0xE4DFE1, APPLY_T);
DrawFlatButton(208, settings_form.cheight - 30, 70, 22, 11, 0xE4DFE1, CANCEL_T);
}
}
}
 
void DrawSettingsCheckBoxes()
{
93,6 → 106,7
CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy);
CheckBox2(10, 77, 23, USE_BIG_FONTS, use_big_fonts);
MoreLessBox(10, 104, 18, 25, 26, #sc, files.line_h, LIST_LINE_HEIGHT);
MoreLessBox(10, 134, 18, 27, 28, #sc, MOUSE_TIME, T_DOUBLE_CLICK);
}
 
 
127,6 → 141,7
ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
ini_set_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", use_big_fonts);
ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME);
}
 
 
137,11 → 152,9
dword ii;
if (files.current>=0) Line_ReDraw(0xFF0000, files.current);
pause(5);
strcpy(#error_message, "\"Eolite\n");
ii = get_error(error_number);
strcat(#error_message, ii);
strcat(#error_message, "\" -tE");
sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE");
notify(#error_message);
}