mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-28 11:43:09 +03:00
Eolite 2.47: button "Edit file associations" in Settingas window, better code structure, removed very old useless code
git-svn-id: svn://kolibrios.org@5435 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b8cd0f2e64
commit
e0819e0443
@ -83,8 +83,8 @@
|
||||
|
||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||
|
||||
#define TITLE "Eolite File Manager v2.46"
|
||||
#define ABOUT_TITLE "Eolite v2.46"
|
||||
#define TITLE "Eolite File Manager v2.47"
|
||||
#define ABOUT_TITLE "Eolite v2.47"
|
||||
dword col_padding, col_selec, col_lpanel;
|
||||
|
||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||
@ -128,7 +128,7 @@ PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp,
|
||||
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
|
||||
|
||||
#include "include\copy.h"
|
||||
#include "include\other.h"
|
||||
#include "include\gui.h"
|
||||
#include "include\sorting.h"
|
||||
#include "include\icons.h"
|
||||
#include "include\left_panel.h"
|
||||
@ -441,6 +441,17 @@ void main()
|
||||
}
|
||||
|
||||
|
||||
inline fastcall signed int _strrchr( ESI,BL)
|
||||
{
|
||||
int jj=0, last=strlen(ESI);
|
||||
do{
|
||||
jj++;
|
||||
$lodsb
|
||||
IF(AL==BL) last=jj;
|
||||
} while(AL!=0);
|
||||
return last;
|
||||
}
|
||||
|
||||
|
||||
void menu_action(dword id)
|
||||
{
|
||||
@ -994,6 +1005,10 @@ void FnProcess(char N)
|
||||
}
|
||||
}
|
||||
|
||||
//need to remove these functiones, they are a very old shit :)
|
||||
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
|
||||
dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;}
|
||||
|
||||
|
||||
stop:
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
@del Eolite
|
||||
cls
|
||||
c-- Eolite.c
|
||||
@kpack Eolite.com
|
||||
@rename Eolite.com Eolite
|
||||
@del warning.txt
|
||||
@del lang.h--
|
||||
|
@ -4,6 +4,7 @@
|
||||
@del Eolite
|
||||
cls
|
||||
c-- Eolite.c
|
||||
@kpack Eolite.com
|
||||
@rename Eolite.com Eolite
|
||||
@del warning.txt
|
||||
@del lang.h--
|
||||
|
@ -1,31 +1,3 @@
|
||||
//Leency 2008-2013
|
||||
|
||||
|
||||
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
|
||||
dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;}
|
||||
|
||||
|
||||
void ShowMessage(dword message, pause_duration)
|
||||
{
|
||||
int form_x=files.w-220/2+files.x;
|
||||
int form_y=160;
|
||||
DrawPopup(form_x,form_y,220,80,1,sc.work,sc.work_graph);
|
||||
WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,sc.work_text,message);
|
||||
pause(pause_duration);
|
||||
if (pause_duration) List_ReDraw();
|
||||
}
|
||||
|
||||
inline fastcall signed int _strrchr( ESI,BL)
|
||||
{
|
||||
int jj=0, last=strlen(ESI);
|
||||
do{
|
||||
jj++;
|
||||
$lodsb
|
||||
IF(AL==BL) last=jj;
|
||||
} while(AL!=0);
|
||||
return last;
|
||||
}
|
||||
|
||||
|
||||
dword col_palette[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB,
|
||||
0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1};
|
||||
@ -76,37 +48,12 @@ void DrawFilledBar(dword x, y, w, h)
|
||||
DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct rd_info
|
||||
void ShowMessage(dword message, pause_duration)
|
||||
{
|
||||
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;
|
||||
int form_x=files.w-220/2+files.x;
|
||||
int form_y=160;
|
||||
DrawPopup(form_x,form_y,220,80,1,sc.work,sc.work_graph);
|
||||
WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,sc.work_text,message);
|
||||
pause(pause_duration);
|
||||
if (pause_duration) List_ReDraw();
|
||||
}
|
@ -84,18 +84,6 @@ void SystemDiscsGet()
|
||||
}
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
@ -201,4 +189,3 @@ void DrawLeftPanel()
|
||||
ActionsDraw();
|
||||
LeftPanelBgDraw();
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#define EDITOR_PATH "/sys/tinypad"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define EDIT_FILE_ASSOCIATIONS "<EFBFBD>¥¤ ªâ¨à®¢ âì áá®æ¨ 樨 ä ©«®¢"
|
||||
?define TITLE_SETT "<EFBFBD> áâனª¨"
|
||||
?define SET_1 "‚뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢"
|
||||
?define SET_2 "<EFBFBD>®ª §ë¢ âì ¨¬¥ ä ©«®¢ ¥ ¬¥ïï ॣ¨áâà"
|
||||
@ -10,6 +11,7 @@
|
||||
?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"
|
||||
@ -20,7 +22,7 @@
|
||||
|
||||
int mouse_ddd;
|
||||
char lineh_s[30]="18\0";
|
||||
edit_box LineHeight_ed = {50,10,70,0xffffff,0x94AECE,0x9098B0,0x9098B0,2,4,#lineh_s,#mouse_ddd, 1000000000000010b,2,2};
|
||||
edit_box LineHeight_ed = {52,10,70,0xffffff,0x94AECE,0xffc90E,0xffffff,2,4,#lineh_s,#mouse_ddd, 1000000000000000b,2,2};
|
||||
checkbox2 ShowDeviceName_chb = {10*65536+15, 10*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_1, 110b};
|
||||
checkbox2 RealFileNamesCase_chb = {10*65536+15, 30*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_2, 100b};
|
||||
|
||||
@ -28,6 +30,7 @@ void settings_dialog()
|
||||
{
|
||||
byte id;
|
||||
unsigned int key;
|
||||
proc_info settings_form;
|
||||
dword eolite_ini_path = abspath("Eolite.ini");
|
||||
if (active_about) ExitProcess();
|
||||
active_about=1;
|
||||
@ -52,6 +55,10 @@ void settings_dialog()
|
||||
active_about=0;
|
||||
ExitProcess();
|
||||
}
|
||||
if (id==5)
|
||||
{
|
||||
RunProgram("tinypad", "/sys/settings/assoc.ini");
|
||||
}
|
||||
break;
|
||||
|
||||
case evKey:
|
||||
@ -74,6 +81,7 @@ void settings_dialog()
|
||||
|
||||
case evReDraw:
|
||||
DefineAndDrawWindow(Form.left + 100, 150, 300, 200+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
|
||||
GetProcessInfo(#settings_form, SelfInfo);
|
||||
|
||||
if (show_dev_name) ShowDeviceName_chb.flags = 110b;
|
||||
ELSE ShowDeviceName_chb.flags = 100b;
|
||||
@ -87,9 +95,11 @@ void settings_dialog()
|
||||
check_box_draw stdcall (#ShowDeviceName_chb);
|
||||
check_box_draw stdcall (#RealFileNamesCase_chb);
|
||||
edit_box_draw stdcall (#LineHeight_ed);
|
||||
WriteText(10, 55, 0x80, 0x000000, SET_3);
|
||||
DrawFlatButton(128,160,70,22,10,0xE4DFE1, APPLY_T);
|
||||
DrawFlatButton(208,160,70,22,11,0xE4DFE1, CANCEL_T);
|
||||
DrawRectangle(LineHeight_ed.left-1, LineHeight_ed.top-1, LineHeight_ed.width+2, 16, sc.work_graph);
|
||||
WriteText(10, 57, 0x80, 0x000000, SET_3);
|
||||
DrawFlatButton(9, 100, 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
C-- liza.c
|
||||
@del liza
|
||||
@rename liza.com liza
|
||||
@kpack liza
|
||||
@del warning.txt
|
||||
@pause
|
@ -12,7 +12,7 @@ unsigned char POP_server1[128]="pop.server.com";
|
||||
unsigned char POP_server_port1[5]="110";
|
||||
unsigned char SMTP_server1[128]="smtp.server.com";
|
||||
unsigned char SMTP_server_port1[5]="25";
|
||||
edit_box POP_server_box = {210,190,90 ,0xffffff,0x94AECE,0xffc90E,0xffffff,0,sizeof(POP_server1),#POP_server1,#mouse_opt,0};
|
||||
edit_box POP_server_box = {210,190,90 ,0xffffff,0x94AECE,0xffc90E,0x9098B0,0,sizeof(POP_server1),#POP_server1,#mouse_opt,0};
|
||||
edit_box POP_server_port_box = {210,190,115,0xffffff,0x94AECE,0xffc90E,0xffffff,0,5,#POP_server_port1,#mouse_opt,0b1000000000000000};
|
||||
edit_box SMTP_server_box = {210,190,140,0xffffff,0x94AECE,0xffc90E,0xffffff,0,sizeof(SMTP_server1),#SMTP_server1,#mouse_opt,0};
|
||||
edit_box SMTP_server_port_box = {210,190,165,0xffffff,0x94AECE,0xffc90E,0xffffff,0,5,#SMTP_server_port1,#mouse_opt,0b1000000000000000};
|
||||
|
Loading…
Reference in New Issue
Block a user