summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-02-24 16:34:34 +0300
committerStefano Karapetsas <[email protected]>2015-02-24 19:56:33 +0100
commit7e0491525f51c5eaee95ceb5a413e4ca786ea14e (patch)
treefe40bf95bee138a3c325dd0272384e6b4d4b2c3d
parent0f4d1375597c2d4ae841c308abe81954066dbbad (diff)
downloadlibmatekbd-7e0491525f51c5eaee95ceb5a413e4ca786ea14e.tar.bz2
libmatekbd-7e0491525f51c5eaee95ceb5a413e4ca786ea14e.tar.xz
first connect to settings, then read them.
fixes the issue with GLib >= 2.43, https://git.gnome.org/browse/glib/commit/?id=8ff5668a458344da22d30491e3ce726d861b3619 Closes https://github.com/mate-desktop/libmatekbd/pull/22
-rw-r--r--libmatekbd/matekbd-indicator.c17
-rw-r--r--libmatekbd/matekbd-status.c15
2 files changed, 17 insertions, 15 deletions
diff --git a/libmatekbd/matekbd-indicator.c b/libmatekbd/matekbd-indicator.c
index 74cb919..aef88d2 100644
--- a/libmatekbd/matekbd-indicator.c
+++ b/libmatekbd/matekbd-indicator.c
@@ -807,6 +807,15 @@ matekbd_indicator_global_init (void)
matekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
matekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+ matekbd_desktop_config_start_listen (&globals.cfg,
+ (GCallback)
+ matekbd_indicator_cfg_changed,
+ NULL);
+ matekbd_indicator_config_start_listen (&globals.ind_cfg,
+ (GCallback)
+ matekbd_indicator_ind_cfg_changed,
+ NULL);
+
matekbd_desktop_config_load_from_gsettings (&globals.cfg);
matekbd_desktop_config_activate (&globals.cfg);
@@ -827,14 +836,6 @@ matekbd_indicator_global_init (void)
xklrec->variants);
g_object_unref (G_OBJECT (xklrec));
- matekbd_desktop_config_start_listen (&globals.cfg,
- (GCallback)
- matekbd_indicator_cfg_changed,
- NULL);
- matekbd_indicator_config_start_listen (&globals.ind_cfg,
- (GCallback)
- matekbd_indicator_ind_cfg_changed,
- NULL);
matekbd_indicator_start_listen ();
xkl_debug (100, "*** Inited globals *** \n");
diff --git a/libmatekbd/matekbd-status.c b/libmatekbd/matekbd-status.c
index b0c19be..3f6c613 100644
--- a/libmatekbd/matekbd-status.c
+++ b/libmatekbd/matekbd-status.c
@@ -778,6 +778,14 @@ matekbd_status_global_init (void)
matekbd_keyboard_config_init (&globals.kbd_cfg, globals.engine);
matekbd_indicator_config_init (&globals.ind_cfg, globals.engine);
+ matekbd_desktop_config_start_listen (&globals.cfg,
+ (GCallback)
+ matekbd_status_cfg_changed, NULL);
+ matekbd_indicator_config_start_listen (&globals.ind_cfg,
+ (GCallback)
+ matekbd_status_ind_cfg_changed,
+ NULL);
+
matekbd_desktop_config_load_from_gsettings (&globals.cfg);
matekbd_desktop_config_activate (&globals.cfg);
@@ -800,13 +808,6 @@ matekbd_status_global_init (void)
(const gchar **) xklrec->variants);
g_object_unref (G_OBJECT (xklrec));
- matekbd_desktop_config_start_listen (&globals.cfg,
- (GCallback)
- matekbd_status_cfg_changed, NULL);
- matekbd_indicator_config_start_listen (&globals.ind_cfg,
- (GCallback)
- matekbd_status_ind_cfg_changed,
- NULL);
matekbd_status_start_listen ();
xkl_debug (100, "*** Inited globals *** \n");