Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6277 → Rev 6278

/programs/cmm/eolite/include/about.h
42,7 → 42,7
about_x = -strlen(ABOUT_TITLE)*18+about_form.cwidth/2;
WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE);
WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE);
DrawRectangle3D(0,154,about_form.cwidth/5*3,1,system.color.work_dark,system.color.work_light);
DrawRectangle3D(0,154,about_form.cwidth,1,system.color.work_dark,system.color.work_light);
WriteTextLines(7,163,0x90,system.color.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunkJoker, Pavelyakov\n(c) 2008 - 2016",20);
#ifdef LANG_RUS
DrawFlatButton(about_form.cwidth-180/2,about_form.cheight-38,180,26,11,"ˆáâ®à¨ï ࠧࠡ®âª¨");
/programs/cmm/eolite/include/delete.h
0,0 → 1,90
int del_error;
int Del_File2(dword way, sh_progr)
{
dword dirbuf, fcount, i, filename;
int error;
char del_from[4096];
if (dir_exists(way))
{
if (error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL)) del_error = error;
for (i=0; i<fcount; i++)
{
if (CheckEvent()==evReDraw) draw_window();
filename = i*304+dirbuf+72;
sprintf(#del_from,"%s/%s",way,filename);
if ( TestBit(ESDWORD[filename-40], 4) )
{
Del_File2(#del_from, 1);
}
else
{
if (sh_progr) Operation_Draw_Progress(filename);
if (error = DeleteFile(#del_from)) del_error = error;
}
}
}
if (error = DeleteFile(way)) del_error = error;
}
 
void Del_File_Thread()
{
byte del_from[4096];
dword selected_offset2;
int tst, count, i;
file_count_copy = 0;
copy_bar.value = 0;
operation_flag = DELETE_FLAG;
if (selected_count)
{
for (i=0; i<files.count; i++)
{
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
if (ESBYTE[selected_offset2]) {
sprintf(#del_from,"%s%s",#path,file_mas[i]*304+buf+72);
GetFileInfo(#del_from, #file_info_count);
if ( file_info_count.isfolder ) DirFileCount(#del_from);
else file_count_copy++;
}
}
}
else
{
if (itdir) DirFileCount(#file_path);
else file_count_copy++;
}
copy_bar.max = file_count_copy;
del_error = 0;
DisplayOperationForm();
if (selected_count)
{
for (i=0; i<files.count; i++)
{
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
if (ESBYTE[selected_offset2]) {
sprintf(#del_from,"%s%s",#path,file_mas[i]*304+buf+72);
Del_File2(#del_from, 1);
}
}
}
else
{
Del_File2(#file_path, 1);
}
if (del_error) Write_Error(del_error);
cmd_free = 6;
DialogExit();
}
 
void Del_File(byte dodel) {
del_active=0;
if (dodel)
{
delete_stak = malloc(40000);
CreateThread(#Del_File_Thread,delete_stak+40000-4);
}
else draw_window();
}
/programs/cmm/eolite/include/gui.h
67,16 → 67,17
DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
}
 
int popin_w=250;
void DrawEolitePopup(dword b1_text, b2_text)
{
int form_w=250, button_padding=30;
int button_padding=30;
int b1_len = strlen(b1_text) * 8 + button_padding;
int b2_len = strlen(b2_text) * 8 + button_padding;
int dform_x = files.w - form_w / 2 + files.x ;
int button_margin = form_w - b1_len - b2_len / 3;
int b1_x = dform_x + button_margin;
int b2_x = dform_x + button_margin + b1_len + button_margin;
DrawPopup(dform_x, 160, form_w, 90, 1, system.color.work, col_graph);
DrawFlatButton(b1_x, 210, b1_len, 24, 301, b1_text);
DrawFlatButton(b2_x, 210, b2_len, 24, 302, b2_text);
int popin_x = files.w - popin_w / 2 + files.x ;
int button_margin = popin_w - b1_len - b2_len / 3;
int b1_x = popin_x + button_margin;
int b2_x = popin_x + button_margin + b1_len + button_margin;
DrawPopup(popin_x, 160, popin_w, 90, 1, system.color.work, col_graph);
DrawFlatButton(b1_x, 210, b1_len, 24, POPUP_BTN1, b1_text);
DrawFlatButton(b2_x, 210, b2_len, 24, POPUP_BTN2, b2_text);
}
/programs/cmm/eolite/include/icons.h
27,10 → 27,10
"grf", 25,
0,0};
 
void Put_icon(dword extension, xx, yy, fairing_color, icon_n)
void DrawIconByExtension(dword extension, xx, yy, fairing_color)
{
int i;
 
dword icon_n=0;
if (extension) for (i=0; ext[i]!=0; i+=2;)
{
if (strcmpi(extension, ext[i])==0)
39,11 → 39,9
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);
if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+files.x+files.w-103,yy+3,files.font_type,0,extension);
}
 
 
/programs/cmm/eolite/include/progress_dialog.h
1,14 → 1,20
#define WIN_DIALOG_W 345
#define WIN_DIALOG_H 110
#define WIN_DIALOG_W 420
#define WIN_DIALOG_H 100
proc_info Dialog_Form;
 
progress_bar copy_bar = {0,16,49,50,20,0,0,1,0xFFFFFF,0x00FF00,0x000000};
progress_bar copy_bar = {0,16,60,50,23,0,0,1,0xFFFFFF,0x00FF00,0x555555};
 
enum {COPY_FLAG, MOVE_FLAG, DELETE_FLAG, OPERATION_END};
int operation_flag;
enum {
COPY_FLAG,
MOVE_FLAG,
DELETE_FLAG,
OPERATION_END
};
 
void DisplayOperationForm()
{
dword title, message;
switch(CheckEvent())
{
case evButton:
17,19 → 23,22
break;
case evReDraw:
if (operation_flag==COPY_FLAG) DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,GetSkinHeight()+WIN_DIALOG_H,0x34,0xFFFFFF,T_COPY_WINDOW_TITLE);
else if (operation_flag==MOVE_FLAG) DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,GetSkinHeight()+WIN_DIALOG_H,0x34,0xFFFFFF,T_MOVE_WINDOW_TITLE);
else DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,GetSkinHeight()+WIN_DIALOG_H,0x34,0xFFFFFF,T_DELETE_WINDOW_TITLE);
if (operation_flag==COPY_FLAG) {
title = T_COPY_WINDOW_TITLE;
message = T_COPY_WINDOW_TEXT;
}
else if (operation_flag==MOVE_FLAG) {
title = T_MOVE_WINDOW_TITLE;
message = T_MOVE_WINDOW_TEXT;
}
else if (operation_flag==DELETE_FLAG) {
title = T_DELETE_WINDOW_TITLE;
message = T_DELETE_WINDOW_TEXT;
}
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title);
GetProcessInfo(#Dialog_Form, SelfInfo);
if (operation_flag==COPY_FLAG) WriteText(45, 11, 0x80, system.color.work_text, T_COPY_WINDOW_TEXT);
else if (operation_flag==MOVE_FLAG) WriteText(45, 11, 0x80, system.color.work_text, T_MOVE_WINDOW_TEXT);
else WriteText(45, 11, 0x80, system.color.work_text, T_DELETE_WINDOW_TEXT);
DrawFlatButton(Dialog_Form.cwidth - 96, Dialog_Form.cheight - 32, 80, 22, 10, T_ABORT_WINDOW_BUTTON);
DrawBar(8, 10, 32, 32, 0xFFFfff);
break;
WriteText(45, 11, 0x90, system.color.work_text, message);
DrawFlatButton(Dialog_Form.cwidth - 96, /*Dialog_Form.cheight - 32*/ copy_bar.top , 80, 22, T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON);
}
}
 
40,19 → 49,19
}
 
 
void Operation_Draw_Progress(dword copying_filename) {
void Operation_Draw_Progress(dword filename) {
if (Dialog_Form.cwidth==0)
{
copy_bar.value++;
return;
}
copy_bar.width = Dialog_Form.cwidth-32;
copy_bar.width = Dialog_Form.cwidth-32 - 100;
DisplayOperationForm();
Put_icon(copying_filename+strrchr(copying_filename,'.'), 16, 19, 0xFFFfff, 0);
DrawBar(45, 29, Dialog_Form.cwidth-45, 10, 0xFFFFFF);
WriteText(45, 29, 0x80, 0x000000, copying_filename);
DrawIconByExtension(filename+strrchr(filename,'.'), 16, 19, system.color.work);
DrawBar(45, 32, Dialog_Form.cwidth-45, 15, system.color.work);
WriteText(45, 32, 0x90, 0x000000, filename);
progressbar_draw stdcall (#copy_bar);
progressbar_progress stdcall (#copy_bar);
//copy_bar.value++;
//pause(50);
//pause(20);
}
/programs/cmm/eolite/include/properties.h
3,7 → 3,7
?define BTN_CLOSE "‡ ªàëâì"
?define BTN_APPLY "à¨¬¥­¨âì"
?define QUEST_1 "à¨¬¥­¨âì ª® ¢á¥¬ ¢«®¦¥­­ë¬"
?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬"
?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬?"
?define PR_T_NAME "ˆ¬ï:"
?define PR_T_DEST " á¯®«®¦¥­¨¥:"
?define PR_T_SIZE " §¬¥à:"
21,7 → 21,7
?define BTN_CLOSE "Close"
?define BTN_APPLY "Apply"
?define QUEST_1 "Apply to all subfolders"
?define QUEST_2 "files and Folders"
?define QUEST_2 "files and Folders?"
?define PR_T_NAME "Name:"
?define PR_T_DEST "Destination:"
?define PR_T_SIZE "Size:"
41,7 → 41,7
char file_name2[4096]="\0";
edit_box file_name_ed = {195,50,25,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2};
edit_box path_to_file_ed = {145,100,46,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2};
frame flags_frame = { 0, 280, 10, 83, 151, 0x000111, 0xFFFfff, 1, FLAGS, 0, 0, 6, 0x000111, 0xFFFFFF };
frame flags_frame = { 0, 280, 10, 83, 151, 0x000111, 0xFFFfff, 1, FLAGS, 0, 1, 12, 0x000111, 0xFFFFFF };
 
int file_count, dir_count, size_dir;
char folder_info[200];
51,7 → 51,7
BDVK file_info_dirsize;
 
proc_info settings_form;
byte quest_active, atr_readonly, atr_hidden, atr_system;
bool quest_active, atr_readonly, atr_hidden, atr_system;
 
void SetPropertiesDir(dword way)
{
142,8 → 142,9
ExitProcess();
}
 
void Quest()
void ShowConfirmQuestionPopin()
{
quest_active = 1;
DrawPopup(30,80,200,90,1,system.color.work, system.color.work_graph);
WriteText(50, 100, 0x80, 0x000000, QUEST_1);
WriteText(80, 115, 0x80, 0x000000, QUEST_2);
249,6 → 250,7
{
IF (id==301) SetProperties(2);
IF (id==302) SetProperties(1);
quest_active=false;
break;
}
if (id==1) || (id==10)
260,8 → 262,7
{
if (selected_count) || (itdir)
{
quest_active = 1;
Quest();
ShowConfirmQuestionPopin();
}
else
{
287,6 → 288,7
{
IF (key_scancode==SCAN_CODE_ENTER) SetProperties(2);
IF (key_scancode==SCAN_CODE_ESC) SetProperties(1);
quest_active=false;
break;
}
if (key_scancode==SCAN_CODE_ESC)
298,8 → 300,7
{
if (selected_count) || (itdir)
{
quest_active = 1;
Quest();
ShowConfirmQuestionPopin();
}
else
{
332,7 → 333,7
if (selected_count)
{
Put_icon('', 18, 19, 0xFFFfff, 0);
DrawIconByExtension('', 18, 19, 0xFFFfff);
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
WriteText(50, 23, 0x80, 0x000000, #folder_info);
sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG);
341,9 → 342,9
else
{
if ( file_info_general.isfolder )
Put_icon("<DIR>", 18, 19, 0xFFFfff, 0);
DrawIconByExtension("<DIR>", 18, 19, 0xFFFfff);
else
Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 19, 0xFFFfff, 0);
DrawIconByExtension(#file_name2+strrchr(#file_name2,'.'), 18, 19, 0xFFFfff);
 
WriteText(50, 13, 0x80, 0x000000, PR_T_NAME);
edit_box_draw stdcall (#file_name_ed);
367,6 → 368,7
flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2;
flags_frame.font_color = system.color.work_text;
flags_frame.ext_col = system.color.work_graph;
flags_frame.font_backgr_color = system.color.work;
frame_draw stdcall (#flags_frame);
DrawPropertiesCheckBoxes();
}
/programs/cmm/eolite/include/settings.h
14,7 → 14,7
?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
?define TITLE_SETT "Settings"
?define SHOW_DEVICE_CLASS "Show device class name"
?define SHOW_REAL_NAMES "Show real file names without changing case"
?define SHOW_REAL_NAMES "Show file names in original case"
?define FONT_SIZE_LABEL "Font size"
?define USE_TWO_PANELS "Two panels"
?define smooth_FONT "Use smooth font"
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager v3.4"
#define ABOUT_TITLE "EOLITE 3.4"
#define TITLE "Eolite File Manager v3.43"
#define ABOUT_TITLE "EOLITE 3.43"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"