Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7490 → Rev 7491

/programs/cmm/eolite/include/copy.h
123,6 → 123,7
if (copy_rezult = copyf(#copy_from,#copy_to))
{
Write_Error(copy_rezult);
if (copy_rezult==8) DialogExit(); //not enough space
}
else if (cut_active)
{
/programs/cmm/eolite/include/gui.h
78,4 → 78,12
PutPixel(x+3,y,col_pxl);
PutPixel(x,y+3,col_pxl);
PutPixel(x+3,y+3,col_pxl);
}
 
:void DrawCaptButtonSmallText(dword x,y,w,h,id,color_b, color_t,text)
{
dword tx = -strlen(text)*6+w/2+x;
dword ty = h/2-3+y;
DefineButton(x,y,w,h,id,color_b);
WriteText(tx,ty,0x80,color_t,text);
}
/programs/cmm/eolite/include/progress_dialog.h
1,9 → 1,15
#define WIN_DIALOG_W 420
#define WIN_DIALOG_H 100
 
#define WIN_DIALOG_W 380
#define WIN_DIALOG_H 85
#define PR_LEFT 14
#define PR_TOP 28
#define PR_W WIN_DIALOG_W-PR_LEFT-PR_LEFT
#define PR_H 14
 
proc_info Dialog_Form;
progress_bar copy_bar = {0,PR_LEFT,PR_TOP,PR_W,PR_H,0,0,1,0xFFFFFF,0x00FF00,0x555555};
//sensor copying = {PR_LEFT,PR_TOP,WIN_DIALOG_W-PR_LEFT-PR_LEFT,19};
 
progress_bar copy_bar = {0,16,60,50,23,0,0,1,0xFFFFFF,0x00FF00,0x555555};
 
int operation_flag;
enum {
COPY_FLAG,
14,31 → 20,35
 
void DisplayOperationForm()
{
dword title, message;
switch(CheckEvent())
{
case evButton:
notify(T_CANCEL_PASTE);
DialogExit();
break;
case evReDraw:
dword title;
if (operation_flag==COPY_FLAG) {
title = T_COPY_WINDOW_TITLE;
message = T_COPY_WINDOW_TEXT;
copy_bar.progress_color = 0x00FF00;
}
else if (operation_flag==MOVE_FLAG) {
title = T_MOVE_WINDOW_TITLE;
message = T_MOVE_WINDOW_TEXT;
copy_bar.progress_color = 0x00FF00;
}
else if (operation_flag==DELETE_FLAG) {
title = T_DELETE_WINDOW_TITLE;
message = T_DELETE_WINDOW_TEXT;
copy_bar.progress_color = 0xF17A65;
}
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title,0);
copy_bar.frame_color = system.color.work_graph;
switch(CheckEvent())
{
case evButton:
notify(T_CANCEL_PASTE);
DialogExit();
break;
case evReDraw:
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W+9,skin_height+WIN_DIALOG_H,0x34,system.color.work,title,0);
GetProcessInfo(#Dialog_Form, SelfInfo);
WriteText(45, 11, 0x90, system.color.work_text, message);
DrawStandartCaptButton(Dialog_Form.cwidth - 105, copy_bar.top-2 , T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON);
DrawCaptButtonSmallText(WIN_DIALOG_W-PR_LEFT-80, PR_TOP+PR_H+6, 80,22, 2,
system.color.work_button, system.color.work_button_text, T_ABORT_WINDOW_BUTTON);
 
DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, system.color.work_dark, system.color.work_light);
//copying.draw_wrapper();
}
}
 
48,7 → 58,6
ExitProcess();
}
 
 
void Operation_Draw_Progress(dword filename) {
if (Dialog_Form.cwidth==0)
{
55,13 → 64,16
copy_bar.value++;
return;
}
copy_bar.width = Dialog_Form.cwidth-32 - 100;
DisplayOperationForm();
DrawIconByExtension(filename, filename+strrchr(filename,'.'), 16, 19, system.color.work);
DrawBar(45, 32, Dialog_Form.cwidth-45, 15, system.color.work);
WriteText(45, 32, 0x90, system.color.work_text, filename);
DrawBar(PR_LEFT, PR_TOP-14, WIN_DIALOG_W-PR_LEFT, 10, system.color.work);
WriteText(PR_LEFT, PR_TOP-14, 0x80, system.color.work_text, filename);
 
progressbar_draw stdcall (#copy_bar);
progressbar_progress stdcall (#copy_bar);
//copy_bar.value++;
//pause(20);
//pause(1);
//copying.draw_progress(copy_bar.value*copying.w/copy_bar.max, copy_bar.value, copy_bar.max-copy_bar.value, "");
 
DrawBar(PR_LEFT, PR_TOP+PR_H+6, 100, 15, system.color.work);
WriteText(PR_LEFT, PR_TOP+PR_H+6, 0x80, system.color.work_text, sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max));
}
/programs/cmm/eolite/include/settings.h
206,9 → 206,6
void Write_Error(int error_number)
{
char error_message[500];
dword ii;
if (files.cur_y>=0) Line_ReDraw(0xFF0000, files.cur_y);
pause(5);
sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE");
notify(#error_message);
}
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager 4.02"
#define ABOUT_TITLE "EOLITE 4.02"
#define TITLE "Eolite File Manager 4.03"
#define ABOUT_TITLE "EOLITE 4.03"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"
18,11 → 18,8
?define NOT_CREATE_FILE "'¥ 㤠«®áì ᮧ¤ âì ä ©«.' -E"
?define T_NOTIFY_APP_PARAM_WRONG "' à ¬¥âà ¤«ï § ¯ã᪠ Eolite ­¥ ¢¥à¥­: ¯ ¯ª  ­¥ áãé¥áâ¢ã¥â!' -E"
?define T_COPY_WINDOW_TITLE "Š®¯¨àãî..."
?define T_COPY_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
?define T_MOVE_WINDOW_TITLE "¥à¥¬¥é î..."
?define T_MOVE_WINDOW_TEXT "¥à¥¬¥é ¥âáï ä ©«:"
?define T_DELETE_WINDOW_TITLE "“¤ «ïî..."
?define T_DELETE_WINDOW_TEXT "“¤ «ï¥âáï ä ©«:"
?define T_ABORT_WINDOW_BUTTON "à¥à¢ âì"
?define INFO_AFTER_COPY "Š®¯¨à®¢ ­¨¥ § ¢¥à襭®"
?define T_CANCEL_PASTE "Š®¯¨à®¢ ­¨¥ ¯à¥ªà é¥­®.  ¯ª  ᪮¯¨à®¢ ­  ­¥ ¯®«­®áâìî."
50,11 → 47,8
?define NOT_CREATE_FILE "'File can not be created.' -E"
?define T_NOTIFY_APP_PARAM_WRONG "'Eolite param is wrong: directory does not exist!' -E"
?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."
/programs/cmm/lib/copyf.h
104,7 → 104,7
}
 
#ifdef LANG_RUS
unsigned char *ERROR_TEXT[]={
:unsigned char *ERROR_TEXT[]={
"Š®¤ #0: ãᯥ譮",
"Žè¨¡ª  #1: ­¥ ®¯à¥¤¥«¥­  ¡ §  ¨/¨«¨ à §¤¥« ¦ñá⪮£® ¤¨áª ",
"Žè¨¡ª  #2: äã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï í⮩ ä ©«®¢®© á¨á⥬ë",
123,7 → 123,7
"Žè¨¡ª  #31: ä ©« ­¥ ï¥âáï ¨á¯®«­ï¥¬ë¬",
"Žè¨¡ª  #32: ᫨誮¬ ¬­®£® ¯à®æ¥áᮢ", 0};
#else
unsigned char *ERROR_TEXT[]={
:unsigned char *ERROR_TEXT[]={
"Code #0 - No error, compleated successfully",
"Error #1 - Base or partition of a hard disk is not defined",
"Error #2 - Function isn't supported for this file system",
/programs/cmm/lib/gui/sensor.h
0,0 → 1,45
 
#define MIN_PB_BLOCK_W 19
#define LOAD_CPU 0x2460C8
#define PROGRESS_ACTIVE 0x489FE4
#define PROGRESS_BG 0xFFFfff
#define PROGRESS_BG_TEXT 0x696969
 
:struct sensor {
int x,y,w,h;
void set_size();
void draw_wrapper();
void draw_progress();
};
 
:void sensor::set_size(dword _x, _y, _w, _h)
{
x=_x+2;
y=_y;
w=_w;
h=_h;
draw_wrapper();
}
 
:void sensor::draw_wrapper()
{
DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, system.color.work_dark, system.color.work_light);
}
 
:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure)
{
if (progress_w < MIN_PB_BLOCK_W) progress_w = MIN_PB_BLOCK_W;
if (progress_w > w-MIN_PB_BLOCK_W) progress_w = w-MIN_PB_BLOCK_W;
 
DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE);
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, system.color.work_graph, 200));
 
sprintf(#param, "%i%s", active_value, mesure);
WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);
 
DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG);
sprintf(#param, "%i%s", bg_value, mesure);
WriteText(-progress_w - calc(strlen(#param)*8)/2 + w+x, h/2-7+y, 0x90, PROGRESS_BG_TEXT, #param);
}
/programs/cmm/lib/gui.h
18,6 → 18,7
#endif
 
#include "../lib/gui/tabs.h"
#include "../lib/gui/sensor.h"
#include "../lib/gui/more_less_box.h"
 
#ifndef INCLUDE_CHECKBOX
/programs/cmm/sysmon/sysmon.c
16,59 → 16,6
 
//===================================================//
// //
// SENSOR //
// //
//===================================================//
 
#define MIN_PB_BLOCK_W 19
#define LOAD_CPU 0x2460C8
#define PROGRESS_ACTIVE 0x489FE4
#define PROGRESS_BG 0xFFFfff
#define PROGRESS_BG_TEXT 0x696969
 
struct sensor {
int x,y,w,h;
void set_size();
void draw_wrapper();
void draw_progress();
};
 
void sensor::set_size(dword _x, _y, _w, _h)
{
x=_x+2;
y=_y;
w=_w;
h=_h;
draw_wrapper();
}
 
void sensor::draw_wrapper()
{
DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, system.color.work_dark, system.color.work_light);
}
 
void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure)
{
if (progress_w < MIN_PB_BLOCK_W) progress_w = MIN_PB_BLOCK_W;
if (progress_w > w-MIN_PB_BLOCK_W) progress_w = w-MIN_PB_BLOCK_W;
 
DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE);
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, system.color.work_graph, 200));
 
 
sprintf(#param, "%i%s", active_value, mesure);
WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);
 
DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG);
sprintf(#param, "%i%s", bg_value, mesure);
WriteText(-progress_w - calc(strlen(#param)*8)/2 + w+x, h/2-7+y, 0x90, PROGRESS_BG_TEXT, #param);
}
 
//===================================================//
// //
// DATA //
// //
//===================================================//