mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-26 06:14:45 +00:00
shellsettingsplugin: Never affect panels when not in Plasma Mobile
If the navigation bar setting is triggered, it can affect the Desktop session as well. Add a check to only change Plasma panels in Plasma Mobile.
This commit is contained in:
parent
a58144fb18
commit
29f387bb57
1 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
#include <KIO/CommandLauncherJob>
|
#include <KIO/CommandLauncherJob>
|
||||||
#include <KNotificationJobUiDelegate>
|
#include <KNotificationJobUiDelegate>
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
|
#include <KRuntimePlatform>
|
||||||
|
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
#include <QDBusMessage>
|
#include <QDBusMessage>
|
||||||
|
|
@ -168,6 +169,12 @@ void MobileShellSettings::setConvergenceModeEnabled(bool enabled)
|
||||||
|
|
||||||
void MobileShellSettings::updateNavigationBarsInPlasma(bool navigationPanelEnabled)
|
void MobileShellSettings::updateNavigationBarsInPlasma(bool navigationPanelEnabled)
|
||||||
{
|
{
|
||||||
|
// Do not update panels when not in Plasma Mobile
|
||||||
|
bool isMobilePlatform = KRuntimePlatform::runtimePlatform().contains("phone");
|
||||||
|
if (!isMobilePlatform) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto message = QDBusMessage::createMethodCall(QLatin1String("org.kde.plasmashell"),
|
auto message = QDBusMessage::createMethodCall(QLatin1String("org.kde.plasmashell"),
|
||||||
QLatin1String("/PlasmaShell"),
|
QLatin1String("/PlasmaShell"),
|
||||||
QLatin1String("org.kde.PlasmaShell"),
|
QLatin1String("org.kde.PlasmaShell"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue