gok r2607 - in trunk: . gok
- From: gerdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gok r2607 - in trunk: . gok
- Date: Fri, 16 Jan 2009 09:49:22 +0000 (UTC)
Author: gerdk
Date: Fri Jan 16 09:49:22 2009
New Revision: 2607
URL: http://svn.gnome.org/viewvc/gok?rev=2607&view=rev
Log:
2009-01-16 Gerd Kohlberger <gerdk svn gnome org>
* gok/gok-keyboard.c: Migrate to msgctxt (GNOME Goal).
* configure.in: Bump glib and intltool versions.
Patch by Leonardo Ferreira Fontenelle. Fixes bug #567105.
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/gok/gok-keyboard.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Jan 16 09:49:22 2009
@@ -46,7 +46,7 @@
AM_PROG_LIBTOOL
dnl internationalization support
-IT_PROG_INTLTOOL([0.40.0])
+IT_PROG_INTLTOOL([0.40.1])
GETTEXT_PACKAGE=gok
AC_SUBST(GETTEXT_PACKAGE)
@@ -162,7 +162,7 @@
dnl Checks for libraries
PKG_CHECK_MODULES(GOK, \
- glib-2.0 >= 2.11.0 \
+ glib-2.0 >= 2.17.4 \
libgnomeui-2.0 >= 2.0.0 \
cspi-1.0 >= 1.5.0 \
libspi-1.0 >= 1.5.0 \
Modified: trunk/gok/gok-keyboard.c
==============================================================================
--- trunk/gok/gok-keyboard.c (original)
+++ trunk/gok/gok-keyboard.c Fri Jan 16 09:49:22 2009
@@ -595,31 +595,17 @@
*
**/
static void
-gok_keyboard_add_keys_from_charstrings (GokKeyboard *pKeyboard,
- gchar *level0_string,
- gchar *level1_string,
- gchar *level2_string,
- gchar *level3_string)
+gok_keyboard_add_keys_from_charstrings (GokKeyboard *pKeyboard,
+ const gchar *level0_string,
+ const gchar *level1_string,
+ const gchar *level2_string,
+ const gchar *level3_string)
{
GokKey *pKey = pKeyboard->pKeyFirst;
gboolean has_level_1 = level1_string && *level1_string;
gboolean has_level_2 = level2_string && *level2_string;
gboolean has_level_3 = level3_string && *level3_string;
- if (pKey)
- {
- while (pKey->pKeyNext)
- {
- pKey = pKey->pKeyNext;
- }
-
- }
- if (level0_string)
- {
- level0_string = g_utf8_strchr (level0_string, -1, '|');
- if (level0_string) ++level0_string; /* works because '|' is one byte */
- }
-
if (!(level0_string && g_utf8_validate (level0_string, -1, NULL)) ||
(level1_string && !g_utf8_validate (level1_string, -1, NULL)) ||
(level2_string && !g_utf8_validate (level2_string, -1, NULL)) ||
@@ -628,31 +614,18 @@
return;
}
- if (has_level_1)
- {
- gok_modifier_add ("shift");
- level1_string = g_utf8_strchr (level1_string, -1, '|');
- if (level1_string) ++level1_string; /* works because '|' is one byte */
- has_level_1 = strlen (level3_string) > 0;
- }
- if (has_level_2)
- {
- gok_modifier_add ("level2");
- level2_string = g_utf8_strchr (level2_string, -1, '|');
- if (level2_string) ++level2_string; /* works because '|' is one byte */
- has_level_2 = strlen (level2_string) > 0;
- }
- if (has_level_3)
+ if (pKey)
{
- gok_modifier_add ("level3");
- level3_string = g_utf8_strchr (level3_string, -1, '|');
- if (level3_string) ++level3_string; /* works because '|' is one byte */
- has_level_3 = strlen (level3_string) > 0;
+ while (pKey->pKeyNext)
+ {
+ pKey = pKey->pKeyNext;
+ }
}
while (*level0_string)
{
gchar utf8_char[7];
+
pKey = gok_key_new (pKey, NULL, pKeyboard);
pKey->has_text = TRUE;
pKey->Type = KEYTYPE_NORMAL;
@@ -660,11 +633,13 @@
pKey->Style = KEYSTYLE_NORMAL;
pKey->FontSize = -1;
pKey->FontSizeGroup = FONT_SIZE_GROUP_GLYPH;
+
utf8_char [g_unichar_to_utf8 (g_utf8_get_char (level0_string), utf8_char)] = '\0';
gok_keylabel_new (pKey, utf8_char, 0, 0, NULL);
pKey->pOutput = gok_output_new (OUTPUT_KEYSTRING, utf8_char, SPI_KEY_STRING);
/* FIXME: need this to work for other levels too! */
level0_string = g_utf8_find_next_char (level0_string, NULL);
+
if (*level1_string)
{
utf8_char [g_unichar_to_utf8 (g_utf8_get_char (level1_string), utf8_char)] = '\0';
@@ -673,7 +648,7 @@
}
if (*level2_string)
{
- /* FIXME: get the appropriate modifiers and mod masks! */
+ /* FIXME: get the appropriate modifiers and mod masks! */
utf8_char [g_unichar_to_utf8 (g_utf8_get_char (level2_string), utf8_char)] = '\0';
gok_keylabel_new (pKey, utf8_char, 2, 0, NULL);
level2_string = g_utf8_find_next_char (level2_string, NULL);
@@ -684,7 +659,8 @@
gok_keylabel_new (pKey, utf8_char, 3, 0, NULL);
level3_string = g_utf8_find_next_char (level3_string, NULL);
}
- if (!pKeyboard->pKeyFirst) pKeyboard->pKeyFirst = pKey;
+ if (!pKeyboard->pKeyFirst)
+ pKeyboard->pKeyFirst = pKey;
}
if (has_level_1) {
@@ -694,10 +670,11 @@
pKey->is_repeatable = TRUE;
pKey->Style = KEYSTYLE_NORMAL;
pKey->FontSize = -1;
- pKey->FontSizeGroup = FONT_SIZE_GROUP_GLYPH;
+ pKey->FontSizeGroup = FONT_SIZE_GROUP_UNIQUE;
/* translators: "shift" as in "the shift modifier key" */
gok_keylabel_new (pKey, _("shift"), 0, 0, NULL);
pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "Shift_L", SPI_KEY_PRESSRELEASE);
+ gok_modifier_add ("shift");
}
if (has_level_2) {
pKey = gok_key_new (pKey, NULL, pKeyboard);
@@ -710,6 +687,7 @@
/* translators: The context is "key level" as in shift/caps status on keyboard */
gok_keylabel_new (pKey, _("Level 2"), 0, 0, NULL);
pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "ISO_Level2_Latch", SPI_KEY_PRESSRELEASE);
+ gok_modifier_add ("level2");
}
if (has_level_3) {
pKey = gok_key_new (pKey, NULL, pKeyboard);
@@ -722,6 +700,7 @@
/* translators: see note for "Level 2" */
gok_keylabel_new (pKey, _("Level 3"), 0, 0, NULL);
pKey->pOutput = gok_output_new (OUTPUT_KEYSYM, "ISO_Level3_Latch", SPI_KEY_PRESSRELEASE);
+ gok_modifier_add ("level3");
}
pKey = gok_key_new (pKey, NULL, pKeyboard);
@@ -851,8 +830,6 @@
* character-primitives which can be used to compose your language's character set.
* Each string below corresponds to the characters associated with a particular
* "shift level" in the XKB keyboard definition.
- * The prefix before the '|' character is just a context string and need not be
- * translated.
*
* For languages where 'case' is used, the first string should contain
* the lowercase alphabet.
@@ -861,22 +838,21 @@
* precede alphabetic characters, digits and punctuation should be placed
* at the end of the string.
*/
- _("level 0|abcdefghijklmnopqrstuvwxyz1234567890-=[];'#\\,./"),
- /* The substring "level 1|" should not be translated.
- * For languages/locales which use 'upper case', this string should
+ C_("level 0", "abcdefghijklmnopqrstuvwxyz1234567890-=[];'#\\,./"),
+ /* For languages/locales which use 'upper case', this string should
* correspond to uppercase versions of characters in the 'level 0' string.
*/
- _("level 1|ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"3$%^&*()_+{}:@~<>?"),
+ C_("level 1", "ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"3$%^&*()_+{}:@~<>?"),
/* Not used in C locale: this string can contain a third set of characters
* at another 'shift level'. It can be used to provide a second/alternate
* glyph/character set for the locale, separately or in conjunction with
* 'level 3'. At the translator's discretion, accented characters can be
* placed here and in 'level 3' as well.
*/
- _("level 2|"),
+ C_("level 2", ""),
/* For locales which need an even larger character set, or offer uppercase versions
* of the 'level2' characters, add them to 'level 3' */
- _("level 3|"));
+ C_("level 3", ""));
if (!gok_main_get_login ())
{
@@ -916,20 +892,20 @@
* Note to Translators: the following strings should contain your LANG/locale's
* alphabet or, in the case of LANGs with a very large glyph set, a set of
* character-primitives which can be used to compose your language's character set.
- * This string should contain all of the glyphs in the "level #|abcde..." strings
+ * This string should contain all of the glyphs in the "abcde..." strings in context level #
* but they should appear in 'frequency order', that is, the most frequently occurring
* characters in your locale should appear at the front of the list.
* (Put digits after characters, and punctuation last).
* If level 0 and level 1 refer to upper-and-lower-case in your locale,
* the characters in these two strings should occur in the same relative order.
*/
- _("level 0|etaonrishdlfcmugypwbvkxjqz`1234567890-=\\[];'<,./"),
- _("level 1|ETAONRISHDLFCMUGYPWBVKXJQZ~! #$%^&*()_+|{}:\"><>?"),
+ C_("freq-level 0", "etaonrishdlfcmugypwbvkxjqz`1234567890-=\\[];'<,./"),
+ C_("freq-level 1", "ETAONRISHDLFCMUGYPWBVKXJQZ~! #$%^&*()_+|{}:\"><>?"),
/*
* Seldom-used or alternate characters can appear in levels 2 and 3 if necessary.
*/
- _("level 2|\0"),
- _("level 3|\0")); /* no level 2 or 3 in C locale */
+ C_("freq-level 2", ""),
+ C_("freq-level 3", "")); /* no level 2 or 3 in C locale */
if (!gok_main_get_login ())
{
gok_keyboard_add_compose_aux_keys (pKeyboard);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]