From 7347f09a774769afa1412d447a860a4cba0a89c2 Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Thu, 9 May 2024 20:28:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(AppContentMenu):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=90=AF=E5=8A=A8=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/extension/menu/app-menu-plugin.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/extension/menu/app-menu-plugin.cpp b/src/extension/menu/app-menu-plugin.cpp index 3312c57..1a66284 100644 --- a/src/extension/menu/app-menu-plugin.cpp +++ b/src/extension/menu/app-menu-plugin.cpp @@ -103,30 +103,30 @@ void AppContentMenu::addToTop(QObject *parent, const QString &appId, const int & void AppContentMenu::addToPanelAction(QObject *parent, const QString &appId, QList &list) { - QDBusInterface iface("com.ukui.panel.desktop", "/", "com.ukui.panel.desktop", QDBusConnection::sessionBus()); + QDBusInterface iface("org.ukui.taskManager", "/taskManager", "org.ukui.taskManager", QDBusConnection::sessionBus()); if (!iface.isValid()) { - qWarning() << "Panel desktop dbusinterface error"; + qWarning() << "Ukui taskManager dbusinterface error"; return; } iface.setTimeout(1); - QDBusReply isFixedOnTaskBar = iface.call("CheckIfExist", appId); + QDBusReply isFixedOnTaskBar = iface.call("checkQuickLauncher", appId); if (!isFixedOnTaskBar.isValid()) { - qWarning() << "Panel desktop dbusinterface call CheckIfExist timeout"; + qWarning() << "Ukui taskManager dbusinterface call checkQuickLauncher timeout"; return; } QString actionName = isFixedOnTaskBar ? QObject::tr("Remove from taskbar") : QObject::tr("Add to taskbar"); - QString functionName = isFixedOnTaskBar ? "RemoveFromTaskbar" : "AddToTaskbar"; + QString functionName = isFixedOnTaskBar ? "removeQuickLauncher" : "addQuickLauncher"; list << new QAction(actionName, parent); QObject::connect(list.last(), &QAction::triggered, parent, [appId, functionName] { - QDBusInterface iface("com.ukui.panel.desktop", "/", "com.ukui.panel.desktop", QDBusConnection::sessionBus()); + QDBusInterface iface("org.ukui.taskManager", "/taskManager", "org.ukui.taskManager", QDBusConnection::sessionBus()); if (!iface.isValid()) { - qWarning() << "Panel desktop dbusinterface error"; + qWarning() << "Ukui taskManager dbusinterface error"; return; }