CMM: move error messages to libraries

git-svn-id: svn://kolibrios.org@5621 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-07-29 14:09:01 +00:00
parent 413054fe2a
commit 1834e6d8f6
14 changed files with 29 additions and 21 deletions

View File

@ -167,7 +167,7 @@ void main()
mem_Init();
SetEventMask(0x27);
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj' -E");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
list[SKINS].current = list[WALLPAPERS].current = -1;
list[SKINS].first = list[WALLPAPERS].first = 0;
TabClick(WALLPAPERS);

View File

@ -124,10 +124,10 @@ void main()
mem_Init();
CursorPointer.Load(#CursorFile);
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error: library doesn't exists - box_lib");
if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio");
if (load_dll2(libimg, #libimg_init,1)!=0) notify("Error: library doesn't exists - libimg");
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify("Error: library doesn't exists - http");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
if (load_dll2(libimg, #libimg_init,1)!=0) notify(LIB_IMG_LOAD_ERR);
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify(LIB_HTTP_LOAD_ERR);
Libimg_LoadImage(#skin, abspath("wv_skin.png"));
SetSkinColors();

View File

@ -35,7 +35,7 @@ void main()
{
int id, key;
mem_Init();
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading GUI library /sys/lib/box_lib.obj");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
dict_folder = abspath(DICT_DIRECROTY);
OpenDictionary(0);

View File

@ -49,8 +49,8 @@ void main()
char notify_message[4296];
mem_Init();
if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify("Error: library doesn't exists - http");
if (!URL) strcpy(#URL, "http://builds.kolibrios.org/eng/latest-iso.7z");
address_box.size = address_box.pos = strlen(#URL);

View File

@ -42,7 +42,6 @@
?define WAIT_DELETING_FOLDER "Удаляется папка. Подожите..."
?define NOT_CREATE_FOLDER "Не удалось создать папку."
?define NOT_CREATE_FILE "Не удалось создать файл."
?define ERROR_1 "Ошибка при загрузке библиотеки /rd/1/lib/box_lib.obj"
?define T_PASTE_WINDOW_TITLE "Копирую..."
?define T_PASTE_WINDOW_TEXT "Копируется файл:"
?define T_PASTE_WINDOW_BUTTON "Прервать"
@ -68,7 +67,6 @@
?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 ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
?define T_PASTE_WINDOW_TITLE "Kopeerin..."
?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
?define T_PASTE_WINDOW_BUTTON "Abort"
@ -94,7 +92,6 @@
?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 ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
?define T_PASTE_WINDOW_TITLE "Copying..."
?define T_PASTE_WINDOW_TEXT "Copying file:"
?define T_PASTE_WINDOW_BUTTON "Abort"
@ -188,8 +185,8 @@ void main()
rand_n = random(40);
gestures.get();
mem_Init();
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_1);
if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
if (load_dll2(libini, #lib_init,1)!=0) notify(LIB_INI_LOAD_ERR);
eolite_ini_path = abspath("Eolite.ini");
LoadIniSettings();
GetSystemDiscs();

View File

@ -13,6 +13,13 @@
dword boxlib = #aEdit_box_lib;
char aEdit_box_lib[]="/sys/lib/box_lib.obj";
#ifdef LANG_RUS
?define BOX_LIB_LOAD_ERR "Error while loading library /rd/1/lib/box_lib.obj"
#else
?define BOX_LIB_LOAD_ERR "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
#endif
dword box_lib_init = #aboxlib_init;
dword edit_box_draw = #aEdit_box_draw;

View File

@ -12,6 +12,7 @@
dword libHTTP = #alibHTTP;
char alibHTTP[23] = "/sys/lib/http.obj\0";
?define LIB_HTTP_LOAD_ERR "Error while loading library /rd/1/lib/http.obj"
dword http_lib_init = #aLib_init;
dword http_get = #aHTTPget;

View File

@ -23,6 +23,7 @@
//library
dword libimg = #alibimg;
char alibimg[21] = "/sys/lib/libimg.obj\0";
?define LIB_IMG_LOAD_ERR "Error while loading library /rd/1/lib/libimg.obj"
dword libimg_init = #alibimg_init;
dword img_is_img = #aimg_is_img;

View File

@ -11,6 +11,7 @@
dword libini = #alibini;
char alibini[] = "/sys/lib/libini.obj";
?define LIB_INI_LOAD_ERR "Error while loading library /rd/1/lib/libini.obj"
dword lib_init = #alib_init;
dword ini_enum_sections = #aini_enum_sections;

View File

@ -13,6 +13,7 @@
//library
dword libio = #alibio;
char alibio[21] = "/sys/lib/libio.obj\0"; //"libio.obj\0";
?define LIB_IO_LOAD_ERR "Error while loading library /rd/1/lib/libio.obj"
dword libio_init = #alibio_init;
dword file_size = #afile_size;

View File

@ -102,12 +102,12 @@ char version[]=" WebView 0.1";
void main() {
mem_Init();
CursorPointer.Load(#CursorFile);
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading library - box_lib.obj");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
if (load_dll2(network_lib, #network_lib_init,0)!=0) notify("Error while loading library - network.obj");
if (load_dll2(netcode_lib, #base64_encode,0)!=0) notify("Error while loading library - netcode.obj");
if (load_dll2(iconv_lib, #iconv_open,0)!=0) { notify("Error while loading library - iconv.obj"); use_iconv=2; }
if (load_dll2(libio, #libio_init,1)!=0) notify("Error while loading library - libio.obj");
if (load_dll2(libimg, #libimg_init,1)!=0) notify("Error while loading library - libimg.obj");
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
if (load_dll2(libimg, #libimg_init,1)!=0) notify(LIB_IMG_LOAD_ERR);
OpenMailDat();
SetEventMask(0x27);
LoginBoxLoop();

View File

@ -65,9 +65,9 @@ void main()
{
dword id, key;
mem_Init();
if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio");
if (load_dll2(libimg, #libimg_init,1)!=0) notify("Error: library doesn't exists - libimg");
if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini");
if (load_dll2(libio, #libio_init,1)!=0) notify(LIB_IO_LOAD_ERR);
if (load_dll2(libimg, #libimg_init,1)!=0) notify(LIB_IMG_LOAD_ERR);
if (load_dll2(libini, #lib_init,1)!=0) notify(LIB_INI_LOAD_ERR);
Libimg_LoadImage(#skin, "/sys/icons32.png");
Libimg_FillTransparent(skin.image, skin.w, skin.h, LIST_BACKGROUND_COLOR);

View File

@ -62,7 +62,7 @@ void Main_Window()
int i, x;
mem_Init();
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Eror: library doesn't exists - box_lib");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(BOX_LIB_LOAD_ERR);
GetSizeDisk();
edit_disk_size.left = strlen(INTRO_TEXT_4)*6 + 10;
SetEventMask(0x27);

View File

@ -40,7 +40,7 @@ void main()
mem_Init();
if (load_dll2(libtruetype, #truetype, 1) != 0) notify("Error: library doesn't exists - truetype");
if (load_dll2(Proc_lib, #OpenDialog_init,0)!=0) notify("Error: library doesn't exists - Proc_lib (open_dialog)");
if (load_dll2(Proc_lib, #OpenDialog_init,0)!=0) notify(LIB_IO_LOAD_ERR);
OpenDialog_init stdcall (#o_dialog);
if (param[0]) OpenFont(#param);