Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change dbus interface of deepin control center #1591

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
# define BluetoothService "com.deepin.daemon.Bluetooth"
# define BluetoothPath "/com/deepin/daemon/Bluetooth"
# define BluetoothInterface "com.deepin.daemon.Bluetooth"
# define ControlcenterService "com.deepin.dde.ControlCenter"
# define ControlcenterPath "/com/deepin/dde/ControlCenter"
# define ControlcenterInterface "com.deepin.dde.ControlCenter"
#else
# define BluetoothService "org.deepin.dde.Bluetooth1"
# define BluetoothPath "/org/deepin/dde/Bluetooth1"
# define BluetoothInterface "org.deepin.dde.Bluetooth1"
# define ControlcenterService "org.deepin.dde.ControlCenter1"
# define ControlcenterPath "org/deepin/dde/ControlCenter1"
# define ControlcenterInterface "org.deepin.dde.ControlCenter1"
#endif

#define BluetoothPage "bluetooth"
#define ControlcenterService "com.deepin.dde.ControlCenter"
#define ControlcenterPath "/com/deepin/dde/ControlCenter"
#define ControlcenterInterface "com.deepin.dde.ControlCenter"

using namespace dfmplugin_utils;

Expand Down
8 changes: 4 additions & 4 deletions src/plugins/desktop/ddplugin-wallpapersetting/wlsetplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ void EventHandle::show(QString name, int mode)
#else
bool EventHandle::wallpaperSetting(const QString &name)
{
QDBusMessage msg = QDBusMessage::createMethodCall("com.deepin.dde.ControlCenter", "/com/deepin/dde/ControlCenter",
"com.deepin.dde.ControlCenter", "ShowPage");
QDBusMessage msg = QDBusMessage::createMethodCall("org.deepin.dde.ControlCenter1", "/org/deepin/dde/ControlCenter1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此代码会在旧版(<=1050)镜像和社区镜像(v23)上运行,也许需要考虑兼容性问题

"org.deepin.dde.ControlCenter1", "ShowPage");
msg.setArguments({QVariant::fromValue(QString("personalization")), QVariant::fromValue(QString("WallpaperSetting"))});
QDBusConnection::sessionBus().asyncCall(msg, 5);
fmInfo() << "ControlCenter serivce called." << msg.service() << msg.arguments();
Expand All @@ -167,8 +167,8 @@ bool EventHandle::wallpaperSetting(const QString &name)

bool EventHandle::screenSaverSetting(const QString &name)
{
QDBusMessage msg = QDBusMessage::createMethodCall("com.deepin.dde.ControlCenter", "/com/deepin/dde/ControlCenter",
"com.deepin.dde.ControlCenter", "ShowPage");
QDBusMessage msg = QDBusMessage::createMethodCall("org.deepin.dde.ControlCenter1", "/org/deepin/dde/ControlCenter1",
"org.deepin.dde.ControlCenter1", "ShowPage");
msg.setArguments({QVariant::fromValue(QString("personalization")), QVariant::fromValue(QString("ScreensaverSetting"))});
QDBusConnection::sessionBus().asyncCall(msg, 5);
fmInfo() << "ControlCenter serivce called." << msg.service() << msg.arguments();
Expand Down
Loading