Commit ee4e8b9f authored by Florent Revest's avatar Florent Revest

nemo-qml-plugin-systemsettings: Restart asteroid-launcher instead of rebooting...

nemo-qml-plugin-systemsettings: Restart asteroid-launcher instead of rebooting the watch when the language is changed
parent 79ee64da
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
......@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://src/displaysettings.cpp;beginline=1;endline=31;md5=99
SRC_URI = "git://git.merproject.org/mer-core/nemo-qml-plugin-systemsettings.git;protocol=https \
file://0001-Update-QStorageInfo-API-usage.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"
SRCREV = "8e98f8c8069592d3dd21011743fdfb4d2efcc50a"
PR = "r1"
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