Subversion Repositories Kolibri OS

Rev

Rev 7806 | Rev 7977 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7806 Rev 7823
Line 35... Line 35...
35
char image_menu_items[] = 
35
char image_menu_items[] = 
36
"Š®«¨ç¥á⢮ ¨á¯®«ì§®¢ ­­ëå 梥⮢
36
"Š®«¨ç¥á⢮ ¨á¯®«ì§®¢ ­­ëå 梥⮢
37
‡ ¬¥­¨âì ¢á¥ æ¢¥â  1 ­  2";
37
‡ ¬¥­¨âì ¢á¥ æ¢¥â  1 ­  2";
38
?define T_MENU_IMAGE "ˆª®­ª "
38
?define T_MENU_IMAGE "ˆª®­ª "
39
?define T_TEST_ICON "à®¢¥à¨âì ¨ª®­ªã"
39
?define T_TEST_ICON "à®¢¥à¨âì ¨ª®­ªã"
40
?define T_TITLE "Icon Editor 0.60 Alpha"
40
?define T_TITLE "¥¤ ªâ®à ¨ª®­®ª 0.60 Alpha"
-
 
41
?define T_UNIC_COLORS_COUNT "'“­¨ª «ì­ëå 梥⮢: %i.' -I"
-
 
42
?define T_TOO_BIG_IMAGE_FOR_PREVIEW "'IconEdit
-
 
43
ˆ§®¡à ¦¥­¨¥ ᫨誮¬ ¡®«ì讥 ¤«ï ¯à¥¤¯à®á¬®âà !' -tE"
-
 
44
?define T_ERROR_CROP_TOOL "'„«ï ®¡à¥§ª¨ ¨§®¡à ¦¥­¨ï ¢­ ç «¥ ­ã¦­® ¢ë¤¥«¨âì ®¡« áâì.' -W"
-
 
45
?define T_ERROR_IMA_ICONEDIT "'â® ¯à®á⮠। ªâ®à ¨ª®­®ª, ¢ë¡à ­®¥
-
 
46
¨§®¡à ¦¥­¨¥ ᫨誮¬ ¢¥«¨ª® ¤«ï ­¥£®!' -E"
41
#else
47
#else
42
char image_menu_items[] = 
48
char image_menu_items[] = 
43
"Count colors used
49
"Count colors used
44
Replace all colors equal to 1 by 2";
50
Replace all colors equal to 1 by 2";
45
?define T_MENU_IMAGE "Icon"
51
?define T_MENU_IMAGE "Icon"
46
?define T_TEST_ICON "Test Icon"
52
?define T_TEST_ICON "Test Icon"
47
?define T_TITLE "¥¤ ªâ®à ¨ª®­®ª 0.60 Alpha"
53
?define T_TITLE "Icon Editor 0.60 Alpha"
-
 
54
?define T_UNIC_COLORS_COUNT "'Image has %i unique colors.' -I"
-
 
55
?define T_TOO_BIG_IMAGE_FOR_PREVIEW "'IconEdit
-
 
56
Image is too big for preview!' -tE"
-
 
57
?define T_ERROR_CROP_TOOL "'You need to select something before using crop tool.' -W"
-
 
58
?define T_ERROR_IMA_ICONEDIT "'Hey, this is just an icon editor,
-
 
59
selected image is too big to open!' -E"
48
#endif
60
#endif
Line 49... Line 61...
49
 
61
 
Line 179... Line 191...
179
	else
191
	else
180
	{
192
	{
181
		Libimg_LoadImage(#open_image, #param);
193
		Libimg_LoadImage(#open_image, #param);
Line 182... Line 194...
182
 
194
 
183
		if (open_image.w*open_image.h>MAX_CELL_SIZE*MAX_CELL_SIZE) {
195
		if (open_image.w*open_image.h>MAX_CELL_SIZE*MAX_CELL_SIZE) {
184
			notify("'Hey, this is just an icon editor,\nselected image is too big to open!' -E");
196
			notify(T_ERROR_IMA_ICONEDIT);
185
			ExitProcess();
197
			ExitProcess();
186
		}
198
		}
187
		else {
199
		else {
188
			image.create(open_image.h, open_image.w);
200
			image.create(open_image.h, open_image.w);
Line 598... Line 610...
598
}
610
}
Line 599... Line 611...
599
 
611
 
600
void ShowWindow_TestIcon()
612
void ShowWindow_TestIcon()
601
{
613
{
602
	if (image.rows>=preview_size) || (image.columns>=preview_size) {
614
	if (image.rows>=preview_size) || (image.columns>=preview_size) {
603
		notify("'IconEdit\nImage is too big for preview!' -tE");
615
		notify(T_TOO_BIG_IMAGE_FOR_PREVIEW);
604
		return;
616
		return;
605
	}
617
	}
606
	loop() switch(WaitEvent())
618
	loop() switch(WaitEvent())
607
	{
619
	{
Line 718... Line 730...
718
		selection.reset();
730
		selection.reset();
719
		actionsHistory.init();
731
		actionsHistory.init();
720
		DrawWindow();
732
		DrawWindow();
721
	}
733
	}
722
	else {
734
	else {
723
		notify("'You need to select something before using crop tool.' -W");
735
		notify(T_ERROR_CROP_TOOL);
724
	}
736
	}
725
}
737
}
Line 726... Line 738...
726
 
738
 
727
void EventShowImageMenu()
739
void EventShowImageMenu()
Line 754... Line 766...
754
		for (prev=0; prev
766
		for (prev=0; prev
755
			if (image.mas[prev] == image.mas[cur]) {unic=false; break;}
767
			if (image.mas[prev] == image.mas[cur]) {unic=false; break;}
756
		}
768
		}
757
		if (unic) resi++;
769
		if (unic) resi++;
758
	}
770
	}
759
	notify( sprintf(#res_str, "'Image has %i unique colors.' -I", resi) );
771
	notify( sprintf(#res_str, T_UNIC_COLORS_COUNT, resi) );
760
}
772
}
Line 761... Line 773...
761
 
773
 
762
void EventReplaceImageColors(dword c1, c2)
774
void EventReplaceImageColors(dword c1, c2)
763
{
775
{