mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 16:30:02 +00:00
fix: onboard not to show on first click
tray to call show when onboard not launched log: as title issue: https://github.com/linuxdeepin/developer-center/issues/6675
This commit is contained in:
parent
3b567d096e
commit
b74544aa23
@ -11,6 +11,8 @@
|
|||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QDBusConnection>
|
||||||
|
#include <QDBusConnectionInterface>
|
||||||
|
|
||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
|
|
||||||
@ -78,8 +80,14 @@ bool OnboardPlugin::pluginIsDisable()
|
|||||||
const QString OnboardPlugin::itemCommand(const QString &itemKey)
|
const QString OnboardPlugin::itemCommand(const QString &itemKey)
|
||||||
{
|
{
|
||||||
Q_UNUSED(itemKey);
|
Q_UNUSED(itemKey);
|
||||||
|
auto ifc = QDBusConnection::sessionBus().interface();
|
||||||
return QString("dbus-send --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible");
|
|
||||||
|
return QStringLiteral(
|
||||||
|
"dbus-send --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.%1"
|
||||||
|
).arg(
|
||||||
|
ifc->isServiceRegistered(QStringLiteral("org.onboard.Onboard"))
|
||||||
|
? QStringLiteral("ToggleVisible") : QStringLiteral("Show")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnboardPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked)
|
void OnboardPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user