another fix for glib2/gsettings regression

This commit is contained in:
raveit65 2015-08-20 10:31:22 +02:00
parent 5cec98446d
commit ce070c33a4
3 changed files with 82 additions and 1 deletions

View File

@ -15,7 +15,7 @@
Name: mate-settings-daemon
Version: %{branch}.1
%if 0%{?rel_build}
Release: 1%{?dist}
Release: 2%{?dist}
%else
Release: 0.1%{?git_rel}%{?dist}
%endif
@ -29,6 +29,10 @@ URL: http://mate-desktop.org
# Source for snapshot-builds.
%{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
# https://github.com/mate-desktop/mate-settings-daemon/pull/112
Patch0: mate-settings-daemon_rename-variable-to-better-match-libmatekbd-stuff.patch
Patch1: mate-settings-daemon_connect-to-libmatekbd-GSettings-before-reading-them.patch
BuildRequires: dbus-glib-devel
BuildRequires: dconf-devel
BuildRequires: desktop-file-utils
@ -70,6 +74,9 @@ under it.
%prep
%setup -q%{!?rel_build:n %{name}-%{commit}}
%patch0 -p1 -b .rename-variable
%patch1 -p1 -b .connect-to
%if 0%{?rel_build}
#NOCONFIGURE=1 ./autogen.sh
%else # 0%{?rel_build}
@ -145,6 +152,9 @@ fi
%changelog
* Wed Aug 19 2015 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.10.1-2
- another fix for glib2/gsettings regression
* Tue Jul 14 2015 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.10.1.1
- update to 1.10.1 release

View File

@ -0,0 +1,35 @@
diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c
index a406fe5..bb62f2b 100644
--- a/plugins/keyboard/msd-keyboard-xkb.c
+++ b/plugins/keyboard/msd-keyboard-xkb.c
@@ -582,14 +582,25 @@ msd_keyboard_xkb_init (MsdKeyboardManager * kbd_manager)
settings_kbd = g_settings_new (MATEKBD_KBD_SCHEMA);
matekbd_desktop_config_init (&current_desktop_config,
- xkl_engine);
+ xkl_engine);
matekbd_keyboard_config_init (&current_kbd_config,
- xkl_engine);
+ xkl_engine);
+
xkl_engine_backup_names_prop (xkl_engine);
msd_keyboard_xkb_analyze_sysconfig ();
- g_signal_connect (settings_desktop, "changed", G_CALLBACK(apply_desktop_settings_cb), NULL);
- g_signal_connect (settings_kbd, "changed", G_CALLBACK(apply_xkb_settings_cb), NULL);
+ matekbd_desktop_config_start_listen (&current_desktop_config,
+ G_CALLBACK (apply_desktop_settings_cb),
+ NULL);
+
+ matekbd_keyboard_config_start_listen (&current_kbd_config,
+ G_CALLBACK (apply_xkb_settings_cb),
+ NULL);
+
+ g_signal_connect (settings_desktop, "changed",
+ G_CALLBACK (apply_desktop_settings_cb), NULL);
+ g_signal_connect (settings_kbd, "changed",
+ G_CALLBACK (apply_xkb_settings_cb), NULL);
gdk_window_add_filter (NULL, (GdkFilterFunc)
msd_keyboard_xkb_evt_filter, NULL);

View File

@ -0,0 +1,36 @@
diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c
index b126fa1..a406fe5 100644
--- a/plugins/keyboard/msd-keyboard-xkb.c
+++ b/plugins/keyboard/msd-keyboard-xkb.c
@@ -58,7 +58,7 @@ static GSettings* settings_kbd;
static XklEngine* xkl_engine;
static XklConfigRegistry* xkl_registry = NULL;
-static MatekbdDesktopConfig current_config;
+static MatekbdDesktopConfig current_desktop_config;
static MatekbdKeyboardConfig current_kbd_config;
/* never terminated */
@@ -143,10 +143,10 @@ apply_desktop_settings (void)
return;
msd_keyboard_manager_apply_settings (manager);
- matekbd_desktop_config_load_from_gsettings (&current_config);
+ matekbd_desktop_config_load_from_gsettings (&current_desktop_config);
/* again, probably it would be nice to compare things
before activating them */
- matekbd_desktop_config_activate (&current_config);
+ matekbd_desktop_config_activate (&current_desktop_config);
show_leds = g_settings_get_boolean (settings_desktop, DUPLICATE_LEDS_KEY);
for (i = sizeof (indicator_icons) / sizeof (indicator_icons[0]);
@@ -581,7 +581,7 @@ msd_keyboard_xkb_init (MsdKeyboardManager * kbd_manager)
settings_desktop = g_settings_new (MATEKBD_DESKTOP_SCHEMA);
settings_kbd = g_settings_new (MATEKBD_KBD_SCHEMA);
- matekbd_desktop_config_init (&current_config,
+ matekbd_desktop_config_init (&current_desktop_config,
xkl_engine);
matekbd_keyboard_config_init (&current_kbd_config,
xkl_engine);