use dbus to start DCC, instead of command

Change-Id: I9765fd1690099ba4b54b01037d305c30f31dedd9
This commit is contained in:
石博文 2017-05-08 09:48:22 +08:00
parent 127af263d9
commit 3d17023466
Notes: Deepin Code Review 2017-05-08 10:21:15 +08:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Mon, 08 May 2017 10:21:13 +0800
Reviewed-on: https://cr.deepin.io/22892
Project: dde/dde-dock
Branch: refs/heads/master
3 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ void DatetimePlugin::invokedMenuItem(const QString &itemKey, const QString &menu
Q_UNUSED(checked)
if (menuId == "open")
QProcess::startDetached("dde-control-center", QStringList() << "datetime");
QProcess::startDetached("dbus-send --print-reply --dest=com.deepin.dde.ControlCenter /com/deepin/dde/ControlCenter com.deepin.dde.ControlCenter.ShowModule \"string:datetime\"");
else
m_centralWidget->toggleHourFormat();
}

View File

@ -66,7 +66,7 @@ QWidget *WiredItem::itemPopup()
const QString WiredItem::itemCommand() const
{
return "dde-control-center -s network";
return "dbus-send --print-reply --dest=com.deepin.dde.ControlCenter /com/deepin/dde/ControlCenter com.deepin.dde.ControlCenter.ShowModule \"string:network\"";
}
void WiredItem::paintEvent(QPaintEvent *e)

View File

@ -80,7 +80,7 @@ void SoundItem::invokeMenuItem(const QString menuId, const bool checked)
if (menuId == MUTE)
m_sinkInter->SetMute(!m_sinkInter->mute());
else if (menuId == SETTINS)
QProcess::startDetached("dde-control-center", QStringList() << "sound");
QProcess::startDetached("dbus-send --print-reply --dest=com.deepin.dde.ControlCenter /com/deepin/dde/ControlCenter com.deepin.dde.ControlCenter.ShowModule \"string:sound\"");
}
QSize SoundItem::sizeHint() const