mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-01 07:05:48 +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 <QSettings>
|
||||
#include <QPainter>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusConnectionInterface>
|
||||
|
||||
#define PLUGIN_STATE_KEY "enable"
|
||||
|
||||
@ -78,8 +80,14 @@ bool OnboardPlugin::pluginIsDisable()
|
||||
const QString OnboardPlugin::itemCommand(const QString &itemKey)
|
||||
{
|
||||
Q_UNUSED(itemKey);
|
||||
|
||||
return QString("dbus-send --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible");
|
||||
auto ifc = QDBusConnection::sessionBus().interface();
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user