canna: bump git commit

fix garbled icons in control window
This commit is contained in:
Jérôme Duval
2024-11-11 22:51:42 +01:00
parent ebd006ff0b
commit 68aaaa4fd3
3 changed files with 331 additions and 57 deletions

View File

@@ -1,54 +0,0 @@
SUMMARY="A Japanese input method add-on"
DESCRIPTION="
Canna (CannaIM) is a Japanese input method add-on. It is based a client-server based Kana-Kanji conversion system \"Canna\".
"
HOMEPAGE="http://canna.sourceforge.jp/"
COPYRIGHT="
1999 M.Kawamura
1992 NEC Corporation, Tokyo, Japan.
"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="http://www.jade.dti.ne.jp/~murai/haiku/CannaIM.zip"
CHECKSUM_SHA256="1615a8810d15307869bfa48ec82aa9cf034c1aec170fa7056f0149c8d64e8770"
SOURCE_FILENAME="CannaIM.zip"
SOURCE_DIR="canna"
ARCHITECTURES="x86_gcc2 x86"
USER_SETTINGS_FILES="
settings/Canna directory
"
PROVIDES="
canna = $portVersion
addon:canna = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku_devel
cmd:gcc
cmd:jam
"
BUILD()
{
jam -q $jobArgs
}
INSTALL()
{
CannaDir=$addOnsDir/input_server/methods
mkdir -p $CannaDir
cp -a generated/distro/canna $CannaDir
CannaDataDir=$dataDir/Canna
mkdir -p $CannaDataDir
cp -a data/default $CannaDataDir
cp -a data/dic $CannaDataDir
}

View File

@@ -7,12 +7,13 @@ COPYRIGHT="
1992 NEC Corporation, Tokyo, Japan.
"
LICENSE="MIT"
REVISION="3"
srcGitRev="82b97486e551f7ce15ad908b478f33a0a8611c8b"
REVISION="1"
srcGitRev="dcde6bbd57a7e2cc506bfbc393e900ee5d078b04"
SOURCE_URI="https://github.com/mt819/CannaIM/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="c21c6573fa712f25a33875d35ee0eee6f335744010a8b7296e894c25e05ef34a"
CHECKSUM_SHA256="00dcea71e29c19b2cebab7ce1fcefe3024cd9d066e13cce6deafea2ff8efbd6b"
SOURCE_FILENAME="$portName-$srcGitRev.tar.gz"
SOURCE_DIR="CannaIM-$srcGitRev"
PATCHES="canna-$portVersion.patchset"
ARCHITECTURES="all"

View File

@@ -0,0 +1,327 @@
From fff4c08fe38c45f19fde392dd01ab39ac2b471a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
Date: Mon, 11 Nov 2024 21:36:11 +0100
Subject: PaletteWindow: use ImportBits instead of SetBits
diff --git a/Sources/PaletteWindow.cpp b/Sources/PaletteWindow.cpp
index 084aae0..36c6990 100644
--- a/Sources/PaletteWindow.cpp
+++ b/Sources/PaletteWindow.cpp
@@ -93,8 +93,10 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
BRect largerect( 0, 0, HexOnwidth - 1, HexOnheight - 1 );
BRect smallrect( 0, 0, HiraOnwidth - 1, HiraOnheight - 1);
- int32 largebytes = HexOnbytesperpixel * HexOnwidth * HexOnheight;
- int32 smallbytes = HiraOnbytesperpixel * HiraOnwidth * HiraOnheight;
+ int32 largerow = HexOnbytesperpixel * HexOnwidth;
+ int32 smallrow = HiraOnbytesperpixel * HiraOnwidth;
+ int32 largebytes = largerow * HexOnheight;
+ int32 smallbytes = smallrow * HiraOnheight;
color_space cspace = HexOncspace;
BPicture *onpict, *offpict;
BBitmap *smallimage, *largeimage;
@@ -104,11 +106,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
fBack->MovePenTo( 0, 0 );
- smallimage->SetBits( HiraOnbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( HiraOnbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
onpict = fBack->EndPicture();
- smallimage->SetBits( HiraOffbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( HiraOffbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
offpict = fBack->EndPicture();
@@ -119,11 +121,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( HiraButton );
- smallimage->SetBits( KataOnbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( KataOnbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
onpict = fBack->EndPicture();
- smallimage->SetBits( KataOffbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( KataOffbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
offpict = fBack->EndPicture();
@@ -134,11 +136,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( KataButton );
- smallimage->SetBits( ZenAlphaOnbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( ZenAlphaOnbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
onpict = fBack->EndPicture();
- smallimage->SetBits( ZenAlphaOffbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( ZenAlphaOffbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
offpict = fBack->EndPicture();
@@ -149,11 +151,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( ZenAlphaButton );
- smallimage->SetBits( HanAlphaOnbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( HanAlphaOnbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
onpict = fBack->EndPicture();
- smallimage->SetBits( HanAlphaOffbits, smallbytes, 0, cspace );
+ smallimage->ImportBits( HanAlphaOffbits, smallbytes, smallrow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( smallimage );
offpict = fBack->EndPicture();
@@ -164,11 +166,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( HanAlphaButton );
- largeimage->SetBits( ExtendOnbits, largebytes, 0, cspace );
+ largeimage->ImportBits( ExtendOnbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
onpict = fBack->EndPicture();
- largeimage->SetBits( ExtendOffbits, largebytes, 0, cspace );
+ largeimage->ImportBits( ExtendOffbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
offpict = fBack->EndPicture();
@@ -179,11 +181,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( ExtendButton );
- largeimage->SetBits( KigoOnbits, largebytes, 0, cspace );
+ largeimage->ImportBits( KigoOnbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
onpict = fBack->EndPicture();
- largeimage->SetBits( KigoOffbits, largebytes, 0, cspace );
+ largeimage->ImportBits( KigoOffbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
offpict = fBack->EndPicture();
@@ -194,11 +196,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( KigoButton );
- largeimage->SetBits( HexOnbits, largebytes, 0, cspace );
+ largeimage->ImportBits( HexOnbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
onpict = fBack->EndPicture();
- largeimage->SetBits( HexOffbits, largebytes, 0, cspace );
+ largeimage->ImportBits( HexOffbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
offpict = fBack->EndPicture();
@@ -209,11 +211,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
msg, B_TWO_STATE_BUTTON );
fBack->AddChild( HexButton );
- largeimage->SetBits( BushuOnbits, largebytes, 0, cspace );
+ largeimage->ImportBits( BushuOnbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
onpict = fBack->EndPicture();
- largeimage->SetBits( BushuOffbits, largebytes, 0, cspace );
+ largeimage->ImportBits( BushuOffbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
offpict = fBack->EndPicture();
@@ -225,11 +227,11 @@ PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
fBack->AddChild( BushuButton );
#if 0
- largeimage->SetBits( TorokuOnbits, largebytes, 0, cspace );
+ largeimage->ImportBits( TorokuOnbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
onpict = fBack->EndPicture();
- largeimage->SetBits( TorokuOffbits, largebytes, 0, cspace );
+ largeimage->ImportBits( TorokuOffbits, largebytes, largerow, 0, cspace );
fBack->BeginPicture( new BPicture );
fBack->DrawBitmap( largeimage );
offpict = fBack->EndPicture();
--
2.45.2
From d4064b97f2602b931abf3768509c487b6a2ecb24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
Date: Mon, 11 Nov 2024 22:48:32 +0100
Subject: PaletteIconImages.h: colorspace is actually B_RGB24
diff --git a/Sources/PaletteIconImages.h b/Sources/PaletteIconImages.h
index f31689a..65c7515 100644
--- a/Sources/PaletteIconImages.h
+++ b/Sources/PaletteIconImages.h
@@ -1,6 +1,6 @@
#define BushuOnwidth 28
#define BushuOnheight 20
-#define BushuOncspace B_RGB32
+#define BushuOncspace B_RGB24
#define BushuOnbytesperpixel 3
unsigned char BushuOnbits[] = {
@@ -119,7 +119,7 @@ unsigned char BushuOnbits[] = {
};
#define BushuOffwidth 28
#define BushuOffheight 20
-#define BushuOffcspace B_RGB32
+#define BushuOffcspace B_RGB24
#define BushuOffbytesperpixel 3
unsigned char BushuOffbits[] = {
@@ -238,7 +238,7 @@ unsigned char BushuOffbits[] = {
};
#define ExtendOnwidth 28
#define ExtendOnheight 20
-#define ExtendOncspace B_RGB32
+#define ExtendOncspace B_RGB24
#define ExtendOnbytesperpixel 3
unsigned char ExtendOnbits[] = {
@@ -357,7 +357,7 @@ unsigned char ExtendOnbits[] = {
};
#define ExtendOffwidth 28
#define ExtendOffheight 20
-#define ExtendOffcspace B_RGB32
+#define ExtendOffcspace B_RGB24
#define ExtendOffbytesperpixel 3
unsigned char ExtendOffbits[] = {
@@ -476,7 +476,7 @@ unsigned char ExtendOffbits[] = {
};
#define HanAlphaOnwidth 20
#define HanAlphaOnheight 20
-#define HanAlphaOncspace B_RGB32
+#define HanAlphaOncspace B_RGB24
#define HanAlphaOnbytesperpixel 3
unsigned char HanAlphaOnbits[] = {
@@ -563,7 +563,7 @@ unsigned char HanAlphaOnbits[] = {
};
#define HanAlphaOffwidth 20
#define HanAlphaOffheight 20
-#define HanAlphaOffcspace B_RGB32
+#define HanAlphaOffcspace B_RGB24
#define HanAlphaOffbytesperpixel 3
unsigned char HanAlphaOffbits[] = {
@@ -650,7 +650,7 @@ unsigned char HanAlphaOffbits[] = {
};
#define HexOnwidth 28
#define HexOnheight 20
-#define HexOncspace B_RGB32
+#define HexOncspace B_RGB24
#define HexOnbytesperpixel 3
unsigned char HexOnbits[] = {
@@ -769,7 +769,7 @@ unsigned char HexOnbits[] = {
};
#define HexOffwidth 28
#define HexOffheight 20
-#define HexOffcspace B_RGB32
+#define HexOffcspace B_RGB24
#define HexOffbytesperpixel 3
unsigned char HexOffbits[] = {
@@ -888,7 +888,7 @@ unsigned char HexOffbits[] = {
};
#define HiraOnwidth 20
#define HiraOnheight 20
-#define HiraOncspace B_RGB32
+#define HiraOncspace B_RGB24
#define HiraOnbytesperpixel 3
unsigned char HiraOnbits[] = {
@@ -975,7 +975,7 @@ unsigned char HiraOnbits[] = {
};
#define HiraOffwidth 20
#define HiraOffheight 20
-#define HiraOffcspace B_RGB32
+#define HiraOffcspace B_RGB24
#define HiraOffbytesperpixel 3
unsigned char HiraOffbits[] = {
@@ -1062,7 +1062,7 @@ unsigned char HiraOffbits[] = {
};
#define KataOnwidth 20
#define KataOnheight 20
-#define KataOncspace B_RGB32
+#define KataOncspace B_RGB24
#define KataOnbytesperpixel 3
unsigned char KataOnbits[] = {
@@ -1149,7 +1149,7 @@ unsigned char KataOnbits[] = {
};
#define KataOffwidth 20
#define KataOffheight 20
-#define KataOffcspace B_RGB32
+#define KataOffcspace B_RGB24
#define KataOffbytesperpixel 3
unsigned char KataOffbits[] = {
@@ -1236,7 +1236,7 @@ unsigned char KataOffbits[] = {
};
#define KigoOnwidth 28
#define KigoOnheight 20
-#define KigoOncspace B_RGB32
+#define KigoOncspace B_RGB24
#define KigoOnbytesperpixel 3
unsigned char KigoOnbits[] = {
@@ -1355,7 +1355,7 @@ unsigned char KigoOnbits[] = {
};
#define KigoOffwidth 28
#define KigoOffheight 20
-#define KigoOffcspace B_RGB32
+#define KigoOffcspace B_RGB24
#define KigoOffbytesperpixel 3
unsigned char KigoOffbits[] = {
@@ -1474,7 +1474,7 @@ unsigned char KigoOffbits[] = {
};
#define TorokuOnwidth 24
#define TorokuOnheight 16
-#define TorokuOncspace B_RGB32
+#define TorokuOncspace B_RGB24
#define TorokuOnbytesperpixel 3
unsigned char TorokuOnbits[] = {
@@ -1557,7 +1557,7 @@ unsigned char TorokuOnbits[] = {
0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,};
#define TorokuOffwidth 24
#define TorokuOffheight 16
-#define TorokuOffcspace B_RGB32
+#define TorokuOffcspace B_RGB24
#define TorokuOffbytesperpixel 3
unsigned char TorokuOffbits[] = {
@@ -1640,7 +1640,7 @@ unsigned char TorokuOffbits[] = {
0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,};
#define ZenAlphaOnwidth 20
#define ZenAlphaOnheight 20
-#define ZenAlphaOncspace B_RGB32
+#define ZenAlphaOncspace B_RGB24
#define ZenAlphaOnbytesperpixel 3
unsigned char ZenAlphaOnbits[] = {
@@ -1727,7 +1727,7 @@ unsigned char ZenAlphaOnbits[] = {
};
#define ZenAlphaOffwidth 20
#define ZenAlphaOffheight 20
-#define ZenAlphaOffcspace B_RGB32
+#define ZenAlphaOffcspace B_RGB24
#define ZenAlphaOffbytesperpixel 3
unsigned char ZenAlphaOffbits[] = {
--
2.45.2