various fixes

git-svn-id: svn://kolibrios.org@7823 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-04-25 14:36:28 +00:00
parent 28e25cb9c5
commit 039ba54ea6
3 changed files with 23 additions and 7 deletions

View File

@ -37,14 +37,26 @@ char image_menu_items[] =
 ¬¥­¨âì ¢á¥ æ¢¥â  1 ­  2";  ¬¥­¨âì ¢á¥ æ¢¥â  1 ­  2";
?define T_MENU_IMAGE "ˆª®­ª " ?define T_MENU_IMAGE "ˆª®­ª "
?define T_TEST_ICON "<EFBFBD>஢¥à¨âì ¨ª®­ªã" ?define T_TEST_ICON "<EFBFBD>஢¥à¨âì ¨ª®­ªã"
?define T_TITLE "Icon Editor 0.60 Alpha" ?define T_TITLE "<EFBFBD>¥¤ ªâ®à ¨ª®­®ª 0.60 Alpha"
?define T_UNIC_COLORS_COUNT "'“­¨ª «ì­ëå 梥⮢: %i.' -I"
?define T_TOO_BIG_IMAGE_FOR_PREVIEW "'IconEdit
ˆ§®¡à ¦¥­¨¥ ᫨誮¬ ¡®«ì讥 ¤«ï ¯à¥¤¯à®á¬®âà !' -tE"
?define T_ERROR_CROP_TOOL "'„«ï ®¡à¥§ª¨ ¨§®¡à ¦¥­¨ï ¢­ ç «¥ ­ã¦­® ¢ë¤¥«¨âì ®¡« áâì.' -W"
?define T_ERROR_IMA_ICONEDIT "'<27>â® ¯à®á⮠। ªâ®à ¨ª®­®ª, ¢ë¡à ­®¥
¨§®¡à ¦¥­¨¥ ᫨誮¬ ¢¥«¨ª® ¤«ï ­¥£®!' -E"
#else #else
char image_menu_items[] = char image_menu_items[] =
"Count colors used "Count colors used
Replace all colors equal to 1 by 2"; Replace all colors equal to 1 by 2";
?define T_MENU_IMAGE "Icon" ?define T_MENU_IMAGE "Icon"
?define T_TEST_ICON "Test Icon" ?define T_TEST_ICON "Test Icon"
?define T_TITLE "<EFBFBD>¥¤ ªâ®à ¨ª®­®ª 0.60 Alpha" ?define T_TITLE "Icon Editor 0.60 Alpha"
?define T_UNIC_COLORS_COUNT "'Image has %i unique colors.' -I"
?define T_TOO_BIG_IMAGE_FOR_PREVIEW "'IconEdit
Image is too big for preview!' -tE"
?define T_ERROR_CROP_TOOL "'You need to select something before using crop tool.' -W"
?define T_ERROR_IMA_ICONEDIT "'Hey, this is just an icon editor,
selected image is too big to open!' -E"
#endif #endif
@ -181,7 +193,7 @@ void main()
Libimg_LoadImage(#open_image, #param); Libimg_LoadImage(#open_image, #param);
if (open_image.w*open_image.h>MAX_CELL_SIZE*MAX_CELL_SIZE) { if (open_image.w*open_image.h>MAX_CELL_SIZE*MAX_CELL_SIZE) {
notify("'Hey, this is just an icon editor,\nselected image is too big to open!' -E"); notify(T_ERROR_IMA_ICONEDIT);
ExitProcess(); ExitProcess();
} }
else { else {
@ -600,7 +612,7 @@ void DrawImageWithBg(dword _x, _y, _col_to)
void ShowWindow_TestIcon() void ShowWindow_TestIcon()
{ {
if (image.rows>=preview_size) || (image.columns>=preview_size) { if (image.rows>=preview_size) || (image.columns>=preview_size) {
notify("'IconEdit\nImage is too big for preview!' -tE"); notify(T_TOO_BIG_IMAGE_FOR_PREVIEW);
return; return;
} }
loop() switch(WaitEvent()) loop() switch(WaitEvent())
@ -720,7 +732,7 @@ void EventCrop()
DrawWindow(); DrawWindow();
} }
else { else {
notify("'You need to select something before using crop tool.' -W"); notify(T_ERROR_CROP_TOOL);
} }
} }
@ -756,7 +768,7 @@ void EventCountColorsUsed()
} }
if (unic) resi++; if (unic) resi++;
} }
notify( sprintf(#res_str, "'Image has %i unique colors.' -I", resi) ); notify( sprintf(#res_str, T_UNIC_COLORS_COUNT, resi) );
} }
void EventReplaceImageColors(dword c1, c2) void EventReplaceImageColors(dword c1, c2)

View File

@ -161,7 +161,7 @@ struct llist
first++; first++;
cur_y++; cur_y++;
} }
if (cur_y < first) || (cur_y > first + visible) if (cur_y < first) || (cur_y >= first + visible)
{ {
first = cur_y; first = cur_y;
CheckDoesValuesOkey(); CheckDoesValuesOkey();

View File

@ -56,6 +56,8 @@ START: ; start of execution
test eax,eax test eax,eax
jnz ErrLoadLibs jnz ErrLoadLibs
mcall 30,1,curpath
; unpack deflate ; unpack deflate
mov eax,[unpack_DeflateUnpack2] mov eax,[unpack_DeflateUnpack2]
mov [deflate_unpack],eax mov [deflate_unpack],eax
@ -1096,6 +1098,8 @@ end if
secRButt db 'rbmenu',0 secRButt db 'rbmenu',0
curpath db '/sys',0
PredItem dd -1 PredItem dd -1
if lang eq ru if lang eq ru