mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-29 17:59:50 +03:00
Eolite 3.31: remove old code, use bigger font for buttons, remove Estonian translation as unsupported, better and unified popin() function
software_widget.c: top panel increase height for new skin git-svn-id: svn://kolibrios.org@6008 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
27bb99473f
commit
1e0700bd56
@ -821,7 +821,7 @@ void Del_Form()
|
||||
else
|
||||
{
|
||||
if (!files.count) return;
|
||||
DrawPopup(dform_x,160,220,85,1,system.color.work,system.color.work_graph);
|
||||
DrawEolitePopup(T_YES, T_NO);
|
||||
WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,system.color.work_text,T_DELETE_FILE);
|
||||
for (i=0; i<files.count; i++)
|
||||
{
|
||||
@ -847,8 +847,6 @@ void Del_Form()
|
||||
WriteText(dform_x+20,190,0,0,#file_name);
|
||||
}
|
||||
}
|
||||
DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
|
||||
DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);
|
||||
del_active=1;
|
||||
}
|
||||
}
|
||||
@ -1030,8 +1028,8 @@ void NewElement(byte newf)
|
||||
WriteFile(0, 0, #temp);
|
||||
if (EAX)
|
||||
{
|
||||
Write_Error(EAX);
|
||||
ShowMessage(NOT_CREATE_FILE, 150);
|
||||
if (EAX==5) notify(NOT_CREATE_FILE);
|
||||
else Write_Error(EAX);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1045,8 +1043,8 @@ void NewElement(byte newf)
|
||||
CreateDir(#temp);
|
||||
if (EAX)
|
||||
{
|
||||
Write_Error(EAX);
|
||||
ShowMessage(NOT_CREATE_FOLDER, 150);
|
||||
if (EAX==5) notify(NOT_CREATE_FOLDER);
|
||||
else Write_Error(EAX);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1062,7 +1060,6 @@ void NewElement(byte newf)
|
||||
if (del_rezult = DeleteFile(#file_path))
|
||||
{
|
||||
Write_Error(del_rezult);
|
||||
ShowMessage(T_DEL_ERROR_1, 150);
|
||||
return;
|
||||
}
|
||||
if (CreateDir(#temp)) CreateDir(#file_path);
|
||||
@ -1104,14 +1101,12 @@ void NewElement_Form(byte crt, dword strng)
|
||||
strcpy(#new_element_name, strng);
|
||||
new_file_ed.size = new_file_ed.pos = strlen(strng);
|
||||
}
|
||||
DrawPopup(dform_x,160,220,85,1,system.color.work,system.color.work_graph);
|
||||
if (new_element_active==3) DrawEolitePopup(T_RENAME, T_CANCEL);
|
||||
else DrawEolitePopup(T_CREATE, T_CANCEL);
|
||||
new_file_ed.left = dform_x+24;
|
||||
edit_box_draw stdcall (#new_file_ed);
|
||||
DrawRectangle(new_file_ed.left-1, new_file_ed.top-1, new_file_ed.width+2, 16, 0xFFFfff);
|
||||
DrawRectangle(new_file_ed.left-2, new_file_ed.top-2, new_file_ed.width+4, 18, system.color.work_graph);
|
||||
if (new_element_active==3) DrawFlatButton(dform_x+22,208,85,22,301,0xFFB6B5,T_RENAME);
|
||||
else DrawFlatButton(dform_x+27,208,70,22,301,0xFFB6B5,T_CREATE);
|
||||
DrawFlatButton(dform_x+120,208,70,22,302,0xC6DFC6,T_CANCEL);
|
||||
}
|
||||
|
||||
void FnProcess(byte N)
|
||||
|
@ -47,8 +47,8 @@ void about_dialog()
|
||||
WriteTextB(110,15,0x81,0xBF40BF,ABOUT_TITLE);
|
||||
WriteTextLines(110,53,10010000b,0,DEVELOPERS_TEXT,21);
|
||||
#ifdef LANG_RUS
|
||||
DrawFlatButton(about_form.cwidth-250,about_form.cheight-35,130,22,11,0xE4DFE1,"ˆáâ®à¨ï à §à ¡®âª¨");
|
||||
DrawFlatButton(about_form.cwidth-310,about_form.cheight-38,180,26,11,0xE4DFE1,"ˆáâ®à¨ï à §à ¡®âª¨");
|
||||
#endif
|
||||
DrawFlatButton(about_form.cwidth-100,about_form.cheight-35,70,22,10,0xE4DFE1,CLOSE_BUTTON_TEXT);
|
||||
DrawFlatButton(about_form.cwidth-110,about_form.cheight-38, 90,26,10,0xE4DFE1,CLOSE_BUTTON_TEXT);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,11 @@ void DrawFlatButton(dword x,y,width,height,id,color,text)
|
||||
PutPixel(x+width-1, y+1, col_padding);
|
||||
if (color!=-1) DrawFilledBar(x+2, y+2, width-3, height-3);
|
||||
IF (id<>0) DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF);
|
||||
WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,system.color.work_text,text);
|
||||
if (height<18)
|
||||
WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80 ,system.color.work_text,text);
|
||||
else
|
||||
WriteText(-strlen(text)*8+width/2+x+1,height/2+y-6,10010000b,system.color.work_text,text);
|
||||
|
||||
}
|
||||
|
||||
void DrawFilledBar(dword x, y, w, h)
|
||||
@ -61,12 +65,16 @@ void DrawFilledBar(dword x, y, w, h)
|
||||
DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
|
||||
}
|
||||
|
||||
void ShowMessage(dword message, pause_duration)
|
||||
void DrawEolitePopup(dword b1_text, b2_text)
|
||||
{
|
||||
int form_x=files.w-220/2+files.x;
|
||||
int form_y=160;
|
||||
DrawPopup(form_x,form_y,220,80,1,system.color.work,system.color.work_graph);
|
||||
WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,system.color.work_text,message);
|
||||
pause(pause_duration);
|
||||
if (pause_duration) List_ReDraw();
|
||||
int form_w=250, 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, system.color.work_graph);
|
||||
DrawFlatButton(b1_x, 210, b1_len, 24, 301, 0xFFB6B5, b1_text);
|
||||
DrawFlatButton(b2_x, 210, b2_len, 24, 302, 0xC6DFC6, b2_text);
|
||||
}
|
@ -39,8 +39,8 @@
|
||||
dword mouse_ddd2;
|
||||
char path_to_file[4096]="\0";
|
||||
char file_name2[4096]="\0";
|
||||
edit_box file_name_ed = {195,50,25,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2};
|
||||
edit_box path_to_file_ed = {145,100,46,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2};
|
||||
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 };
|
||||
|
||||
int file_count, dir_count, size_dir;
|
||||
@ -158,7 +158,8 @@ void GetSizeDir(dword way)
|
||||
if (isdir(way))
|
||||
{
|
||||
cur_file = malloc(4096);
|
||||
// In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
|
||||
// In the process of recursive descent, memory must be allocated dynamically,
|
||||
// because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
|
||||
GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
|
||||
for (i=0; i<fcount; i++)
|
||||
{
|
||||
@ -318,10 +319,10 @@ void properties_dialog()
|
||||
|
||||
void DrawPropertiesWindow()
|
||||
{
|
||||
DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,0xFFFFFF,WINDOW_TITLE_PROPERTIES);
|
||||
DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE_PROPERTIES);
|
||||
GetProcessInfo(#settings_form, SelfInfo);
|
||||
DrawFlatButton(settings_form.cwidth - 70 - 13, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE);
|
||||
DrawFlatButton(settings_form.cwidth - 150 - 13, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, BTN_APPLY);
|
||||
DrawFlatButton(settings_form.cwidth - 80 - 13, settings_form.cheight - 34, 80, 24, 10, 0xE4DFE1, BTN_CLOSE);
|
||||
DrawFlatButton(settings_form.cwidth - 170 - 13, settings_form.cheight - 34, 80, 24, 11, 0xE4DFE1, BTN_APPLY);
|
||||
DrawBar(10, 10, 32, 32, 0xFFFfff);
|
||||
|
||||
WriteText(10, 50, 0x80, 0x000000, PR_T_DEST);
|
||||
|
@ -53,7 +53,6 @@ void settings_dialog()
|
||||
else if (id==24) two_panels ^= true;
|
||||
else if (id==25) { files.item_h++; files_active.item_h = files_inactive.item_h = files.item_h; }
|
||||
else if (id==26) && (files.item_h>18) files.item_h--;
|
||||
//else if (id==29) smooth_font ^= true;
|
||||
else if (id==30) { label.size.pt++; IF(!label.changeSIZE()) label.size.pt--; BigFontsChange(); }
|
||||
else if (id==31) { label.size.pt--; IF(!label.changeSIZE()) label.size.pt++; BigFontsChange(); }
|
||||
EventRedrawWindow(Form.left,Form.top);
|
||||
@ -66,10 +65,10 @@ void settings_dialog()
|
||||
break;
|
||||
|
||||
case evReDraw:
|
||||
DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 240+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
|
||||
DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 370, 243+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
|
||||
DrawSettingsCheckBoxes();
|
||||
DrawFlatButton(9, 166, strlen(SAVE_PATH_AS_DEFAULT)+4*6, 22, 6, 0xE4DFE1, SAVE_PATH_AS_DEFAULT);
|
||||
DrawFlatButton(9, 198, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
|
||||
DrawFlatButton(9, 166, strlen(SAVE_PATH_AS_DEFAULT)+3*8, 24, 6, 0xE4DFE1, SAVE_PATH_AS_DEFAULT);
|
||||
DrawFlatButton(9, 200, strlen(EDIT_FILE_ASSOCIATIONS)+3*8, 24, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define TITLE "Eolite File Manager v3.3"
|
||||
#define ABOUT_TITLE "Eolite 3.3"
|
||||
#define TITLE "Eolite File Manager v3.31"
|
||||
#define ABOUT_TITLE "Eolite 3.31"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_FILE "” ©«"
|
||||
@ -14,9 +14,8 @@
|
||||
?define T_CREATE "‘®§¤ âì"
|
||||
?define T_RENAME "<EFBFBD>¥à¥¨¬¥®¢ âì"
|
||||
?define FS_ITEM_ALREADY_EXISTS "'<27>«¥¬¥â á â ª¨¬ ¨¬¥¥¬ 㦥 áãé¥áâ¢ã¥â' -E"
|
||||
?define T_DEL_ERROR_1 "Žè¨¡ª . <20> ¯ª ¥ ¯ãáâ ï."
|
||||
?define NOT_CREATE_FOLDER "<EFBFBD>¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã."
|
||||
?define NOT_CREATE_FILE "<EFBFBD>¥ 㤠«®áì ᮧ¤ âì ä ©«."
|
||||
?define NOT_CREATE_FOLDER "'ŤĄ 㤠«®áě ᮧ¤ âě Ż ŻŞă.' -E"
|
||||
?define NOT_CREATE_FILE "'ŤĄ 㤠«®áě ᮧ¤ âě ä ©«.' -E"
|
||||
?define T_COPY_WINDOW_TITLE "Š®¯¨àãî..."
|
||||
?define T_COPY_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
|
||||
?define T_MOVE_WINDOW_TITLE "<EFBFBD>¥à¥¬¥é î..."
|
||||
@ -24,42 +23,11 @@
|
||||
?define T_DELETE_WINDOW_TITLE "“¤ «ïî..."
|
||||
?define T_DELETE_WINDOW_TEXT "“¤ «ï¥âáï ä ©«:"
|
||||
?define T_ABORT_WINDOW_BUTTON "<EFBFBD>à¥à¢ âì"
|
||||
|
||||
|
||||
?define INFO_AFTER_COPY "Š®¯¨à®¢ ¨¥ § ¢¥à襮"
|
||||
?define T_CANCEL_PASTE "Š®¯¨à®¢ ¨¥ ¯à¥ªà 饮. <20> ¯ª ᪮¯¨à®¢ ¥ ¯®«®áâìî."
|
||||
?define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« "
|
||||
?define DEL_MORE_FILES_1 "¢ë¡à ë¥ í«¥¬¥âë ("
|
||||
?define DEL_MORE_FILES_2 " èâ.)?"
|
||||
#elif LANG_EST
|
||||
?define T_FILE "Fail"
|
||||
?define T_TYPE "Tâ„–â„–p"
|
||||
?define T_SIZE "Suurus"
|
||||
?define T_NEW_FOLDER "Uus kataloog"
|
||||
?define T_NEW_FILE "Uus fail"
|
||||
?define T_DELETE_FILE "Kas sa tahad tÑ—esti kustutada"
|
||||
?define T_YES "Jah"
|
||||
?define T_NO "Ei"
|
||||
?define T_CANCEL "Cancel"
|
||||
?define T_CREATE "Create"
|
||||
?define T_RENAME "Rename"
|
||||
?define FS_ITEM_ALREADY_EXISTS "'An item with that name already exists' -E"
|
||||
?define T_DEL_ERROR_1 "Viga. Kataloog ei ole tâ„–hi."
|
||||
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
|
||||
?define NOT_CREATE_FOLDER "Kataloogi ei saa luua."
|
||||
?define NOT_CREATE_FILE "Faili ei saa luua."
|
||||
?define T_COPY_WINDOW_TITLE "Copying..."
|
||||
?define T_COPY_WINDOW_TEXT "Copying file:"
|
||||
?define T_MOVE_WINDOW_TITLE "Moving..."
|
||||
?define T_MOVE_WINDOW_TEXT "Moving file:"
|
||||
?define T_DELETE_WINDOW_TITLE "Deleting..."
|
||||
?define T_DELETE_WINDOW_TEXT "Deleting file:"
|
||||
?define T_ABORT_WINDOW_BUTTON "Abort"
|
||||
?define INFO_AFTER_COPY "Copy finished"
|
||||
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
|
||||
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
||||
?define DEL_MORE_FILES_1 "selected items("
|
||||
?define DEL_MORE_FILES_2 " pcs.)?"
|
||||
#else
|
||||
?define T_FILE "File"
|
||||
?define T_TYPE "Type"
|
||||
@ -73,10 +41,9 @@
|
||||
?define T_CREATE "Create"
|
||||
?define T_RENAME "Rename"
|
||||
?define FS_ITEM_ALREADY_EXISTS "'An item with that name already exists' -E"
|
||||
?define T_DEL_ERROR_1 "Error. Folder isn't empty."
|
||||
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
|
||||
?define NOT_CREATE_FOLDER "Folder can not be created."
|
||||
?define NOT_CREATE_FILE "File can not be created."
|
||||
?define NOT_CREATE_FOLDER "'Folder can not be created.' -E"
|
||||
?define NOT_CREATE_FILE "'File can not be created.' -E"
|
||||
?define T_COPY_WINDOW_TITLE "Copying..."
|
||||
?define T_COPY_WINDOW_TEXT "Copying file:"
|
||||
?define T_MOVE_WINDOW_TITLE "Moving..."
|
||||
|
@ -98,10 +98,11 @@ void main()
|
||||
DefineAndDrawWindow(GetScreenWidth()-window_width/2,GetScreenHeight()-window_height/2,window_width,window_height,0x74,system.color.work,"");
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
if (Form.status_window>2) { DrawTitle(#window_title); break; } else DrawTitle("");
|
||||
draw_top_bar();
|
||||
kolibrios_mounted = isdir("/kolibrios");
|
||||
col_max = Form.cwidth - 10 / cell_w;
|
||||
current_item_id = 0;
|
||||
draw_top_bar();
|
||||
row = -1;
|
||||
ini_enum_sections stdcall (#settings_ini_path, #process_sections);
|
||||
DrawBar(0, row + 1 * cell_h + list_pos, Form.cwidth, -row - 1 * cell_h - list_pos + Form.cheight, LIST_BACKGROUND_COLOR);
|
||||
break;
|
||||
@ -187,14 +188,13 @@ byte process_sections(dword sec_name, f_name)
|
||||
|
||||
void draw_top_bar()
|
||||
{
|
||||
int top_position = 26;
|
||||
int top_position = 32;
|
||||
DrawBar(0,0,Form.cwidth, top_position-2, system.color.work);
|
||||
DrawBar(0,top_position-2, Form.cwidth, 1, ShadowPixel(system.color.work, 1));
|
||||
DrawBar(0,top_position-1, Form.cwidth, 1, system.color.work_graph);
|
||||
label.write_center(0,0, Form.cwidth, top_position, system.color.work, system.color.work_text, 16, #window_title);
|
||||
label.write_center(0,5, Form.cwidth, top_position, system.color.work, system.color.work_text, 16, #window_title);
|
||||
list_top = top_position;
|
||||
list_pos = list_top;
|
||||
row = -1;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user