From ad05b018bd7e3a4bb821fb2c8f1de9ea7598934f Mon Sep 17 00:00:00 2001 From: Dmitry bjorn Panin Date: Wed, 17 Nov 2010 12:27:42 +0300 Subject: [PATCH 2/2] Fix libxklavier 5.0 API compatibility --- panel-plugin/xkb-config.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c index 352fdf1..eb40500 100644 --- a/panel-plugin/xkb-config.c +++ b/panel-plugin/xkb-config.c @@ -150,8 +150,11 @@ xkb_config_initialize_xkb_options (t_xkb_settings *settings) config->application_map = g_hash_table_new (g_direct_hash, NULL); registry = xkl_config_registry_get_instance (config->engine); +#ifdef HAVE_LIBXKLAVIER4 + xkl_config_registry_load (registry, FALSE); +#else xkl_config_registry_load (registry); - +#endif config_item = xkl_config_item_new (); config->group_names = (gchar **) g_new0 (typeof (gchar **), config->group_count); @@ -214,7 +217,11 @@ xkb_config_finalize () gdk_window_remove_filter (NULL, (GdkFilterFunc) handle_xevent, NULL); +#ifdef HAVE_LIBXKLAVIER5 + xkl_engine_stop_listen (config->engine, XKLL_TRACK_KEYBOARD_STATE); +#else xkl_engine_stop_listen (config->engine); +#endif } gint @@ -547,7 +554,11 @@ xkb_config_get_xkl_registry () if (!config) return NULL; registry = xkl_config_registry_get_instance (config->engine); +#ifdef HAVE_LIBXKLAVIER4 + xkl_config_registry_load (registry, FALSE); +#else xkl_config_registry_load (registry); +#endif return registry; } -- 1.7.1