forked from KolibriOS/kolibrios
CMM: Eolite - no more delete /tmp disks from, optimizations for settings.h, change checkbox appearance, fix panels_cfg morelessbox colors, upload proc_lib.h
git-svn-id: svn://kolibrios.org@5526 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6a6d3deaec
commit
426afa4886
@ -95,12 +95,11 @@
|
||||
|
||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||
|
||||
#define TITLE "Eolite File Manager v2.65"
|
||||
#define ABOUT_TITLE "Eolite v2.65"
|
||||
#define TITLE "Eolite File Manager v2.66"
|
||||
#define ABOUT_TITLE "Eolite v2.66"
|
||||
dword col_padding, col_selec, col_lpanel;
|
||||
|
||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||
char tmp_disk_del_param[]="d0";
|
||||
struct path_string { char Item[4096]; };
|
||||
|
||||
byte active_about=0;
|
||||
@ -338,15 +337,6 @@ void main()
|
||||
pause(5);
|
||||
DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF);
|
||||
break;
|
||||
case 130...160:
|
||||
tmp_disk_del_param[1] = id - 130 + 48;
|
||||
RunProgram("/sys/tmpdisk", #tmp_disk_del_param);
|
||||
pause(10);
|
||||
GetSystemDiscs();
|
||||
Open_Dir(#path,WITH_REDRAW);
|
||||
DrawLeftPanel();
|
||||
//m.get();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
//Key pressed-----------------------------------------------------------------------------
|
||||
|
@ -132,9 +132,6 @@ void DrawSystemDiscs()
|
||||
case 't':
|
||||
dev_icon=4;
|
||||
strcpy(#disc_name, "RAM disk ");
|
||||
DefineButton(17+143,i*16+74,16,16,dev_name[4]+130-48+BT_HIDE+BT_NOFRAME,0xFFFFFF);
|
||||
WriteText(45+121,i*16+79,0x80,0xD63535,"-");
|
||||
WriteText(45+121,i*16+79+1,0x80,0xBC2424,"-");
|
||||
break;
|
||||
default:
|
||||
dev_icon=3; //по-умолчанию устройство выглядит как жестяк но это неправильно
|
||||
|
@ -5,23 +5,25 @@
|
||||
#ifdef LANG_RUS
|
||||
?define EDIT_FILE_ASSOCIATIONS "<EFBFBD>¥¤ ªâ¨à®¢ âì áá®æ¨ 樨 ä ©«®¢"
|
||||
?define TITLE_SETT "<EFBFBD> áâனª¨"
|
||||
?define SET_1 "‚뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢"
|
||||
?define SET_2 "<EFBFBD>®ª §ë¢ âì ¨¬¥ ä ©«®¢ ¥ ¬¥ïï ॣ¨áâà"
|
||||
?define SET_3 "‚ëá®â áâப¨ ¢ ᯨ᪥"
|
||||
?define SET_4 "“¢¥¤®¬«ïâì ® § ¢¥à襨¨ ª®¯¨à®¢ ¨ï"
|
||||
?define SHOW_DEVICE_CLASS "‚뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢"
|
||||
?define SHOW_REAL_NAMES "<EFBFBD>®ª §ë¢ âì ¨¬¥ ä ©«®¢ ¥ ¬¥ïï ॣ¨áâà"
|
||||
?define LIST_LINE_HEIGHT "‚ëá®â áâப¨ ¢ ᯨ᪥"
|
||||
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襨¨ ª®¯¨à®¢ ¨ï"
|
||||
?define CANCEL_T "Žâ¬¥ "
|
||||
?define APPLY_T "<EFBFBD>ਬ¥¨âì"
|
||||
#else
|
||||
?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
|
||||
?define TITLE_SETT "Settings"
|
||||
?define SET_1 "Show device class name"
|
||||
?define SET_2 "Show real file names without changing case"
|
||||
?define SET_3 "List line height"
|
||||
?define SET_4 "To notify the completion of the copy"
|
||||
?define SHOW_DEVICE_CLASS "Show device class name"
|
||||
?define SHOW_REAL_NAMES "Show real file names without changing case"
|
||||
?define LIST_LINE_HEIGHT "List line height"
|
||||
?define NOTIFY_COPY_END "Notify when copying finished"
|
||||
?define CANCEL_T "Cancel"
|
||||
?define APPLY_T "Apply"
|
||||
#endif
|
||||
|
||||
char confir_section = "Config";
|
||||
|
||||
|
||||
void settings_dialog()
|
||||
{
|
||||
@ -74,11 +76,8 @@ void settings_dialog()
|
||||
case evReDraw:
|
||||
DefineAndDrawWindow(Form.left + 100, 150, 300, 210+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
|
||||
GetProcessInfo(#settings_form, SelfInfo);
|
||||
|
||||
DrawSettingsCheckBoxes();
|
||||
|
||||
DrawFlatButton(9, 127, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
|
||||
|
||||
DrawFlatButton(9, 116, 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);
|
||||
}
|
||||
@ -86,34 +85,34 @@ void settings_dialog()
|
||||
|
||||
void DrawSettingsCheckBoxes()
|
||||
{
|
||||
CheckBox2(10, 11, 20, SET_1, show_dev_name);
|
||||
CheckBox2(10, 33, 21, SET_2, real_files_names_case);
|
||||
CheckBox2(10, 55, 22, SET_4, info_after_copy);
|
||||
MoreLessBox(10, 82, 18, 25, 26, sc.work_graph, 0xD2D3D3, 0x000000, files.line_h, SET_3);
|
||||
CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS, show_dev_name);
|
||||
CheckBox2(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case);
|
||||
CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy);
|
||||
MoreLessBox(10, 82, 18, 25, 26, sc.work_graph, 0xD2D3D3, 0x000000, files.line_h, LIST_LINE_HEIGHT);
|
||||
}
|
||||
|
||||
|
||||
void LoadIniSettings()
|
||||
{
|
||||
ini_get_color stdcall (eolite_ini_path, "Config", "SelectionColor", 0x94AECE);
|
||||
ini_get_color stdcall (eolite_ini_path, #confir_section, "SelectionColor", 0x94AECE);
|
||||
edit2.shift_color = EAX;
|
||||
col_selec = EAX;
|
||||
ini_get_int stdcall (eolite_ini_path, "Config", "LineHeight", 18);
|
||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "LineHeight", 18);
|
||||
files.line_h = EAX;
|
||||
ini_get_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", 1);
|
||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", 1);
|
||||
show_dev_name = EAX;
|
||||
ini_get_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", 0);
|
||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", 0);
|
||||
real_files_names_case = EAX;
|
||||
ini_get_int stdcall (eolite_ini_path, "Config", "InfoAfterCopy", 0);
|
||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", 0);
|
||||
info_after_copy = EAX;
|
||||
}
|
||||
|
||||
void SaveIniSettings()
|
||||
{
|
||||
ini_set_int stdcall (eolite_ini_path, "Config", "ShowDeviceName", show_dev_name);
|
||||
ini_set_int stdcall (eolite_ini_path, "Config", "RealFileNamesCase", real_files_names_case);
|
||||
ini_set_int stdcall (eolite_ini_path, "Config", "InfoAfterCopy", info_after_copy);
|
||||
ini_set_int stdcall (eolite_ini_path, "Config", "LineHeight", files.line_h);
|
||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
|
||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
|
||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
|
||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,12 +54,14 @@
|
||||
else if (is_checked == 1)
|
||||
{
|
||||
DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff);
|
||||
DrawBar(x+2, y+2, w-3, h-3, graph_color);
|
||||
DrawRectangle(x+2, y+2, w-4, h-4, 0xffffff);
|
||||
DrawBar(x+3, y+3, w-5, h-5, graph_color);
|
||||
}
|
||||
else if (is_checked == 2) //not active
|
||||
{
|
||||
DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff);
|
||||
DrawBar(x+2, y+2, w-3, h-3, 0x888888);
|
||||
DrawRectangle(x+2, y+2, w-4, h-4, 0xffffff);
|
||||
DrawBar(x+3, y+3, w-5, h-5, 0x888888);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +71,7 @@
|
||||
DrawRectangle(x, y, VALUE_FIELD_W, s, color_border);
|
||||
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, s-2, 0xDDDddd, 0xffffff);
|
||||
DrawBar(x+2, y+2, VALUE_FIELD_W-3, s-3, 0xffffff);
|
||||
WriteText(x+6, s / 2 + y -3, 0x80, color_text, itoa(value));
|
||||
WriteText(x+6, s / 2 + y -3, 0x80, 0x000000, itoa(value));
|
||||
|
||||
DrawCaptButton(VALUE_FIELD_W + x + 1, y, s, s, bt_id_more, color_button, color_text, "+");
|
||||
DrawCaptButton(VALUE_FIELD_W + x + s + 2, y, s, s, bt_id_less, color_button, color_text, "-");
|
||||
|
33
programs/cmm/lib/obj/proc_lib.h
Normal file
33
programs/cmm/lib/obj/proc_lib.h
Normal file
@ -0,0 +1,33 @@
|
||||
dword Proc_lib = #aProc_lib;
|
||||
char aProc_lib[] = "/sys/lib/proc_lib.obj";
|
||||
|
||||
dword OpenDialog_init = #aOpenDialog_init;
|
||||
dword OpenDialog_start = #aOpenDialog_start;
|
||||
|
||||
$DD 2 dup 0
|
||||
|
||||
char aOpenDialog_init[] = "OpenDialog_init";
|
||||
char aOpenDialog_start[] = "OpenDialog_start";
|
||||
|
||||
struct opendialog
|
||||
{
|
||||
dword type;
|
||||
dword procinfo;
|
||||
dword com_area_name;
|
||||
dword com_area;
|
||||
dword opendir_path;
|
||||
dword dir_default_path;
|
||||
dword start_path;
|
||||
dword draw_window;
|
||||
dword status;
|
||||
dword openfile_pach;
|
||||
dword filename_area;
|
||||
dword filter_area;
|
||||
|
||||
word x_size;
|
||||
word x_start;
|
||||
|
||||
word y_size;
|
||||
word y_start;
|
||||
};
|
||||
|
@ -271,7 +271,7 @@ void PanelCfg_CheckBox(dword x, y, id, text, byte value) {
|
||||
}
|
||||
|
||||
void PanelCfg_MoreLessBox(dword x, y, id_more, id_less; byte value; dword text) {
|
||||
MoreLessBox(x, y, 18, id_more, id_less, sc.work_graph, sc.work_button, sc.work_button_text, value, text);
|
||||
MoreLessBox(x, y, 18, id_more, id_less, sc.work_graph, sc.work_button, sc.work_text, value, text);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user