Commit 97c525cd authored by Florent Revest's avatar Florent Revest

nemo-qml-plugin-systemsettings: Notify asteroid-launcher of locale changes...

nemo-qml-plugin-systemsettings: Notify asteroid-launcher of locale changes instead of restarting user@1000
parent 373f9c14
From 1bfd19e8f2aad753ef7b1a475d0ebdbe3fb67197 Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Wed, 20 Dec 2017 21:19:45 +0100
Subject: [PATCH] LanguageModel: Notify asteroid-launcher of locale changes so
that it can refresh its UI dynamically
---
src/languagemodel.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/languagemodel.cpp b/src/languagemodel.cpp
index a054d00..f8f304c 100644
--- a/src/languagemodel.cpp
+++ b/src/languagemodel.cpp
@@ -200,6 +200,9 @@ void LanguageModel::setSystemLocale(const QString &localeCode, LocaleUpdateMode
emit currentIndexChanged();
}
+ QDBusInterface systemdInterface("org.nemomobile.lipstick", "/org/nemomobile/lipstick/localemanager", "org.nemomobile.lipstick", QDBusConnection::systemBus());
+ systemdInterface.call("selectLocale", localeCode);
+
if (updateMode == UpdateAndReboot) {
QDBusInterface dsmeInterface("com.nokia.dsme", "/com/nokia/dsme/request", "com.nokia.dsme.request",
QDBusConnection::systemBus());
--
2.14.3
From 6a2fe2ffee36ea7d12d7bf973f55a39b5989f5f2 Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Mon, 27 Nov 2017 23:45:19 +0100
Subject: [PATCH] LanguageModel: Restart asteroid-launcher with the proper
environment when UpdateAndReboot is used
---
src/languagemodel.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/languagemodel.cpp b/src/languagemodel.cpp
index a054d00..52390a8 100644
--- a/src/languagemodel.cpp
+++ b/src/languagemodel.cpp
@@ -201,9 +201,10 @@ void LanguageModel::setSystemLocale(const QString &localeCode, LocaleUpdateMode
}
if (updateMode == UpdateAndReboot) {
- QDBusInterface dsmeInterface("com.nokia.dsme", "/com/nokia/dsme/request", "com.nokia.dsme.request",
- QDBusConnection::systemBus());
- dsmeInterface.call("req_reboot");
+ QDBusInterface systemdInterface("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager",
+ QDBusConnection::sessionBus());
+ systemdInterface.call("SetEnvironment", QStringList() << ("LANG=" + localeCode));
+ systemdInterface.call("RestartUnit", "asteroid-launcher.service", "replace");
}
}
--
2.14.3
...@@ -7,7 +7,7 @@ SRC_URI = "git://git.merproject.org/mer-core/nemo-qml-plugin-systemsettings.git; ...@@ -7,7 +7,7 @@ SRC_URI = "git://git.merproject.org/mer-core/nemo-qml-plugin-systemsettings.git;
file://0001-Update-QStorageInfo-API-usage.patch \ file://0001-Update-QStorageInfo-API-usage.patch \
file://0002-languagemodel-install-languages-in-usr-share-support.patch \ file://0002-languagemodel-install-languages-in-usr-share-support.patch \
file://0003-languagemodel-don-t-require-region-names.patch \ file://0003-languagemodel-don-t-require-region-names.patch \
file://0004-LanguageModel-Restart-asteroid-launcher-with-the-pro.patch" file://0004-LanguageModel-Notify-asteroid-launcher-of-locale-cha.patch"
SRCREV = "8e98f8c8069592d3dd21011743fdfb4d2efcc50a" SRCREV = "8e98f8c8069592d3dd21011743fdfb4d2efcc50a"
PR = "r1" PR = "r1"
PV = "+git${SRCPV}" PV = "+git${SRCPV}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment