summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormezz <mezz@FreeBSD.org>2004-12-12 21:20:54 +0000
committermezz <mezz@FreeBSD.org>2004-12-12 21:20:54 +0000
commit1e5479236af007d4c1874876e993add58464a268 (patch)
treeeca4565d599705eec65a15a8beb9f3d8fa91f8d1
parent012bef3535def49c789523dbba5870c2607c7ee6 (diff)
downloadFreeBSD-ports-1e5479236af007d4c1874876e993add58464a268.zip
FreeBSD-ports-1e5479236af007d4c1874876e993add58464a268.tar.gz
Re-add a patch that was created by bland back in AbiWord2 2.0.3_2. bland said,
'Fix crash on startup bug for locales with mb acceleratos in menu.' Reported by: Mikhail Teterin <mi@corbulon.video-collage.com> Tested by: Mikhail Teterin <mi@corbulon.video-collage.com>
-rw-r--r--editors/abiword-devel/Makefile1
-rw-r--r--editors/abiword-devel/files/patch-src::af::ev::unix::ev_UnixMenu.cpp47
-rw-r--r--editors/abiword/Makefile1
-rw-r--r--editors/abiword/files/patch-src::af::ev::unix::ev_UnixMenu.cpp47
4 files changed, 96 insertions, 0 deletions
diff --git a/editors/abiword-devel/Makefile b/editors/abiword-devel/Makefile
index 5ae9813..424a368 100644
--- a/editors/abiword-devel/Makefile
+++ b/editors/abiword-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= abiword
PORTVERSION= 2.2.1
+PORTREVISION= 1
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= abiword
diff --git a/editors/abiword-devel/files/patch-src::af::ev::unix::ev_UnixMenu.cpp b/editors/abiword-devel/files/patch-src::af::ev::unix::ev_UnixMenu.cpp
new file mode 100644
index 0000000..7151aa6
--- /dev/null
+++ b/editors/abiword-devel/files/patch-src::af::ev::unix::ev_UnixMenu.cpp
@@ -0,0 +1,47 @@
+--- src/af/ev/unix/ev_UnixMenu.cpp.orig Sat Dec 11 16:05:23 2004
++++ src/af/ev/unix/ev_UnixMenu.cpp Sat Dec 11 16:09:41 2004
+@@ -431,22 +431,20 @@
+ return true;
+ }
+
+-static char _ev_get_underlined_char(const char * szString)
++static guint _ev_get_underlined_char(const char * szString)
+ {
+
+ UT_ASSERT(szString);
+
+- // return the char right after the underline
+- const char * p = szString;
+- while (*p && *(p+1))
++ // return the keycode right after the underline
++ const UT_UCS4String str(szString);
++ for (int i = 0; i < str.length() - 1; )
+ {
+- if (*p == '_')
+- return *++p;
+- else
+- p++;
++ if (str[i++] == '_')
++ return gdk_unicode_to_keyval(str[i]);
+ }
+
+- return 0;
++ return GDK_VoidSymbol;
+ }
+
+ static void _ev_strip_underline(char * bufResult,
+@@ -749,12 +747,12 @@
+ // version of the underlined char, since all the menus ignore upper
+ // case (SHIFT-MOD1-[char]) invokations of accelerators.
+
+- if (bAltOnMod1)
++ if (keyCode != GDK_VoidSymbol && bAltOnMod1)
+ {
+ EV_EditEventMapper * pEEM = XAP_App::getApp()->getEditEventMapper();
+ UT_ASSERT(pEEM);
+ EV_EditMethod * pEM = NULL;
+- pEEM->Keystroke(EV_EKP_PRESS|EV_EMS_ALT|tolower(keyCode),&pEM);
++ pEEM->Keystroke(EV_EKP_PRESS|EV_EMS_ALT|keyCode,&pEM);
+
+ // if the pointer is valid, there is a conflict
+ bConflict = (pEM != NULL);
diff --git a/editors/abiword/Makefile b/editors/abiword/Makefile
index 5ae9813..424a368 100644
--- a/editors/abiword/Makefile
+++ b/editors/abiword/Makefile
@@ -7,6 +7,7 @@
PORTNAME= abiword
PORTVERSION= 2.2.1
+PORTREVISION= 1
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= abiword
diff --git a/editors/abiword/files/patch-src::af::ev::unix::ev_UnixMenu.cpp b/editors/abiword/files/patch-src::af::ev::unix::ev_UnixMenu.cpp
new file mode 100644
index 0000000..7151aa6
--- /dev/null
+++ b/editors/abiword/files/patch-src::af::ev::unix::ev_UnixMenu.cpp
@@ -0,0 +1,47 @@
+--- src/af/ev/unix/ev_UnixMenu.cpp.orig Sat Dec 11 16:05:23 2004
++++ src/af/ev/unix/ev_UnixMenu.cpp Sat Dec 11 16:09:41 2004
+@@ -431,22 +431,20 @@
+ return true;
+ }
+
+-static char _ev_get_underlined_char(const char * szString)
++static guint _ev_get_underlined_char(const char * szString)
+ {
+
+ UT_ASSERT(szString);
+
+- // return the char right after the underline
+- const char * p = szString;
+- while (*p && *(p+1))
++ // return the keycode right after the underline
++ const UT_UCS4String str(szString);
++ for (int i = 0; i < str.length() - 1; )
+ {
+- if (*p == '_')
+- return *++p;
+- else
+- p++;
++ if (str[i++] == '_')
++ return gdk_unicode_to_keyval(str[i]);
+ }
+
+- return 0;
++ return GDK_VoidSymbol;
+ }
+
+ static void _ev_strip_underline(char * bufResult,
+@@ -749,12 +747,12 @@
+ // version of the underlined char, since all the menus ignore upper
+ // case (SHIFT-MOD1-[char]) invokations of accelerators.
+
+- if (bAltOnMod1)
++ if (keyCode != GDK_VoidSymbol && bAltOnMod1)
+ {
+ EV_EditEventMapper * pEEM = XAP_App::getApp()->getEditEventMapper();
+ UT_ASSERT(pEEM);
+ EV_EditMethod * pEM = NULL;
+- pEEM->Keystroke(EV_EKP_PRESS|EV_EMS_ALT|tolower(keyCode),&pEM);
++ pEEM->Keystroke(EV_EKP_PRESS|EV_EMS_ALT|keyCode,&pEM);
+
+ // if the pointer is valid, there is a conflict
+ bConflict = (pEM != NULL);
OpenPOWER on IntegriCloud