Author: michael_meeks
Date: Mon Dec 1 13:47:11 2008
New Revision: 53766
URL: http://svn.opensuse.org/viewcvs/yast?rev=53766&view=rev
Log:
2008-12-01 Michael Meeks
* src/YGWidget.cc (doSetLabel): cope with unicode colon too:
* 449385
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGWidget.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=53766&r1=53765&r2=53766&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Mon Dec 1 13:47:11 2008
@@ -1,3 +1,7 @@
+2008-12-01 Michael Meeks
+
+ * src/YGWidget.cc (doSetLabel): cope with unicode colon too: 449385
+
2008-11-30 Ricardo Cruz
* src/ygtkwizard.c: ensure header text is black to contrast with the
Modified: trunk/gtk/src/YGWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGWidget.cc?rev=53766&r1=53765&r2=53766&view=diff
==============================================================================
--- trunk/gtk/src/YGWidget.cc (original)
+++ trunk/gtk/src/YGWidget.cc Mon Dec 1 13:47:11 2008
@@ -277,8 +277,11 @@
string str = YGUtils::mapKBAccel (label);
// add a ':' at the end
- int last = str.length()-1;
- if (str [last] != ':' && str [last] != '.' && str [last] != ' ')
+ const gchar *last = g_utf8_find_prev_char (str.c_str(), str.c_str() + str.length());
+ gunichar last_char = g_utf8_get_char (last);
+
+ if (last_char != ':' && last_char != '.' &&
+ last_char != ' ' && last_char != 0xff1a /* unicode-colon */)
str += ':';
/* // set it as upper case
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org