diff options
author | Sergey Udaltsov <svu@gnome.org> | 2011-02-08 00:43:22 +0000 |
---|---|---|
committer | Sergey Udaltsov <svu@gnome.org> | 2011-02-08 00:43:22 +0000 |
commit | 04e0cc94ef6b50c8731fe2c7159c93f5e3342619 (patch) | |
tree | 5fb0bbb2db6931241854ef34f8f11362613c00bc | |
parent | 972ede36be4b6d3b17a080541f0fb09378ef2264 (diff) |
Publish ISO->name functions
-rw-r--r-- | libxklavier/xkl_config_item.h | 4 | ||||
-rw-r--r-- | libxklavier/xklavier_config.c | 8 | ||||
-rw-r--r-- | libxklavier/xklavier_config_iso.c | 8 | ||||
-rw-r--r-- | libxklavier/xklavier_private.h | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/libxklavier/xkl_config_item.h b/libxklavier/xkl_config_item.h index 57b371f..ef2624c 100644 --- a/libxklavier/xkl_config_item.h +++ b/libxklavier/xkl_config_item.h @@ -132,6 +132,10 @@ extern "C" { */ extern XklConfigItem *xkl_config_item_new(void); + extern const gchar * xkl_get_country_name(const gchar * code); + + extern const gchar * xkl_get_language_name(const gchar * code); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libxklavier/xklavier_config.c b/libxklavier/xklavier_config.c index d7372dd..6ca7514 100644 --- a/libxklavier/xklavier_config.c +++ b/libxklavier/xklavier_config.c @@ -810,7 +810,7 @@ if_country_matches_pattern(const XklConfigItem * item, const gchar *country_desc; if (check_name) { gchar *upper_name = g_ascii_strup(item->name, -1); - country_desc = xkl_get_country_iso_code(upper_name); + country_desc = xkl_get_country_name(upper_name); g_free(upper_name); xkl_debug(200, "Checking layout country: [%s]\n", country_desc); @@ -822,7 +822,7 @@ if_country_matches_pattern(const XklConfigItem * item, gchar **countries = g_object_get_data(G_OBJECT(item), XCI_PROP_COUNTRY_LIST); for (; countries && *countries; countries++) { - country_desc = xkl_get_country_iso_code(*countries); + country_desc = xkl_get_country_name(*countries); xkl_debug(200, "Checking country: [%s][%s]\n", *countries, country_desc); if ((country_desc != NULL) @@ -839,7 +839,7 @@ if_language_matches_pattern(const XklConfigItem * item, { const gchar *language_desc; if (check_name) { - language_desc = xkl_get_language_iso_code(item->name); + language_desc = xkl_get_language_name(item->name); xkl_debug(200, "Checking layout language: [%s]\n", language_desc); if ((language_desc != NULL) @@ -849,7 +849,7 @@ if_language_matches_pattern(const XklConfigItem * item, gchar **languages = g_object_get_data(G_OBJECT(item), XCI_PROP_LANGUAGE_LIST); for (; languages && *languages; languages++) { - language_desc = xkl_get_language_iso_code(*languages); + language_desc = xkl_get_language_name(*languages); xkl_debug(200, "Checking language: [%s][%s]\n", *languages, language_desc); if ((language_desc != NULL) diff --git a/libxklavier/xklavier_config_iso.c b/libxklavier/xklavier_config_iso.c index fdc4f25..ab8ff5f 100644 --- a/libxklavier/xklavier_config_iso.c +++ b/libxklavier/xklavier_config_iso.c @@ -165,7 +165,7 @@ iso_code_names_init(LookupParams * params) typedef const gchar *(*DescriptionGetterFunc) (const gchar * code); const gchar * -xkl_get_language_iso_code(const gchar * code) +xkl_get_language_name(const gchar * code) { const gchar *name; @@ -182,7 +182,7 @@ xkl_get_language_iso_code(const gchar * code) } const gchar * -xkl_get_country_iso_code(const gchar * code) +xkl_get_country_name(const gchar * code) { const gchar *name; @@ -292,7 +292,7 @@ xkl_config_registry_foreach_country(XklConfigRegistry * }; xkl_config_registry_foreach_iso_code(config, func, xpath_exprs, - xkl_get_country_iso_code, TRUE, + xkl_get_country_name, TRUE, data); } @@ -309,7 +309,7 @@ xkl_config_registry_foreach_language(XklConfigRegistry * }; xkl_config_registry_foreach_iso_code(config, func, xpath_exprs, - xkl_get_language_iso_code, FALSE, + xkl_get_language_name, FALSE, data); } diff --git a/libxklavier/xklavier_private.h b/libxklavier/xklavier_private.h index c4bf9d8..35fc8a5 100644 --- a/libxklavier/xklavier_private.h +++ b/libxklavier/xklavier_private.h @@ -480,10 +480,6 @@ extern gboolean xkl_read_config_item(XklConfigRegistry * config, gint doc_index, xmlNodePtr iptr, XklConfigItem * item); -extern const gchar * xkl_get_language_iso_code(const gchar * code); - -extern const gchar * xkl_get_country_iso_code(const gchar * code); - extern gint xkl_debug_level; extern const gchar *xkl_last_error_message; |