Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6250 → Rev 6251

/programs/cmm/app_plus/app_plus.c
20,13 → 20,29
dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACDD,0x000000,
0xE9DAB2,0xC99811,0xFDF9D4,0xF8B93C,0xFDEEBE,0xFBEBA6,0xDFAF4F,0xF3D57C};
 
#define APP_PLUS_INI_PATH "/kolibrios/settings/app_plus.ini"
 
#define APP_PLUS_INI_NOT_EXISTS "'APP+\n/kolibrios/settings/app_plus.ini is not exists.\nProgram terminated.' -tE"
 
#define WINDOW_TITLE_TEXT "Error"
#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ NOT MOUNTED"
#define DESCRIPTION_TEXT "Try to find it manually. It should look
like image on the right.
Note: this action can be done only once
per 1 session of the OS running. If you
will choose the wrong folder then you
need to reboot system to try again."
#define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..."
 
 
void CheckKosMounted()
{
if (isdir("/kolibrios/"))
if (dir_exists("/kolibrios/"))
{
io.run("syspanel", "/kolibrios/settings/app_plus.ini");
if (file_exists(APP_PLUS_INI_PATH))
io.run("syspanel", APP_PLUS_INI_PATH);
else
notify(APP_PLUS_INI_NOT_EXISTS);
ExitProcess();
}
}
69,17 → 85,6
}
}
 
#define WINDOW_TITLE_TEXT "Error"
#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ NOT MOUNTED"
#define DESCRIPTION_TEXT "Try to find it manually. It should look
like image on the right.
Note: this action can be done only once
per 1 session of the OS running. If you
will choose the wrong folder then you
need to reboot system to try again."
#define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..."
 
 
void draw_window()
{
incn y;
/programs/cmm/appearance/appearance.c
153,7 → 153,7
DrawRectangle3D(list.x-2, list.y-2, list.w+3+scroll1.size_x, list.h+3, system.color.work_dark, system.color.work_light);
DrawWideRectangle(list.x-LIST_PADDING, list.y-LIST_PADDING, LIST_PADDING*2+list.w+scroll1.size_x, LIST_PADDING*2+list.h, LIST_PADDING-2, system.color.work);
DrawTab(list.x+10, list.y, SKINS, T_SKINS);
if (isdir(WALP_STANDART_PATH)) DrawTab(strlen(T_SKINS)*8+TAB_PADDING+list.x+21, list.y, WALLPAPERS, T_WALLPAPERS);
if (dir_exists(WALP_STANDART_PATH)) DrawTab(strlen(T_SKINS)*8+TAB_PADDING+list.x+21, list.y, WALLPAPERS, T_WALLPAPERS);
DrawRectangle(list.x-1, list.y-1, list.w+1+scroll1.size_x, list.h+1, system.color.work_graph);
 
Draw_List();
/programs/cmm/eolite/Eolite.c
857,7 → 857,7
dword dirbuf, fcount, i, filename;
int error;
char del_from[4096];
if (isdir(way))
if (dir_exists(way))
{
if (error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL)) del_error = error;
for (i=0; i<fcount; i++)
/programs/cmm/eolite/include/fs.h
5,7 → 5,7
{
dword dirbuf, fcount, i, filename;
dword cur_file;
if (isdir(way))
if (dir_exists(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.
/programs/cmm/eolite/include/properties.h
57,7 → 57,7
{
dword dirbuf, fcount, i, filename;
dword cur_file;
if (isdir(way))
if (dir_exists(way))
{
cur_file = malloc(4096);
GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
105,7 → 105,7
SetFileInfo(cur_file, #file_info_general);
if (prop==2)
{
if (isdir(cur_file))
if (dir_exists(cur_file))
{
SetPropertiesDir(cur_file);
}
155,7 → 155,7
{
dword dirbuf, fcount, i, filename;
dword cur_file;
if (isdir(way))
if (dir_exists(way))
{
cur_file = malloc(4096);
// In the process of recursive descent, memory must be allocated dynamically,
/programs/cmm/examples/compile.bat
File deleted
\ No newline at end of file
/programs/cmm/examples/compile_en.bat
0,0 → 1,17
c-- window.c
c-- collections.c
c-- menu.c
 
@echo off
@del _window
@del _collections
@del _menu
 
@rename window.com _window
@rename collections.com _collections
@rename menu.com _menu
 
@del warning.txt
@echo on
 
@pause
/programs/cmm/lib/copyf.h
24,7 → 24,7
debugln("Error: copyf->GetFileInfo");
return error;
}
if (isdir(from1))
if (dir_exists(from1))
return CopyFolder(from1, in1);
else
{
85,7 → 85,7
sprintf(#copy_from2,"%s/%s",from2,filename);
sprintf(#copy_in2,"%s/%s",in2,filename);
 
if ( TestBit(ESDWORD[filename-40], 4) ) //isdir?
if ( TestBit(ESDWORD[filename-40], 4) ) //dir_exists?
{
if ( (!strncmp(filename, ".",1)) || (!strncmp(filename, "..",2)) ) continue;
CopyFolder(#copy_from2, #copy_in2);
/programs/cmm/lib/file_system.h
197,15 → 197,23
$int 0x40
}
 
:char isdir(dword fpath)
:char dir_exists(dword fpath)
{
BDVK fpath_atr;
GetFileInfo(fpath, #fpath_atr);
return fpath_atr.isfolder;
}
:char file_exists(dword fpath)
{
BDVK ReadFile_atr;
if (! GetFileInfo(fpath, #ReadFile_atr)) return true;
return false;
}
 
 
:int GetFile(dword buf, filesize, read_path)
{
int return_val = 0;
BDVK ReadFile_atr;
dword rBuf;
if (! GetFileInfo(read_path, #ReadFile_atr))
215,11 → 223,11
{
ESDWORD[buf] = rBuf;
ESDWORD[filesize] = ReadFile_atr.sizelo;
return 1;
return_val = 1;
}
}
free(rBuf);
return 0;
return return_val;
}
 
enum
/programs/cmm/software_widget/software_widget.c
58,7 → 58,7
 
Libimg_LoadImage(#skin, "/sys/icons32.png");
Libimg_FillTransparent(skin.image, skin.w, skin.h, LIST_BACKGROUND_COLOR);
kolibrios_mounted = isdir("/kolibrios");
kolibrios_mounted = dir_exists("/kolibrios");
 
if (param)
{