mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-01 07:05:48 +00:00
fix: 声音调整改成新接口
org.deepin.daemon.Audio1改成org.deepin.dde.Audio1 Log: 声音调整换新接口 Influence: 鼠标移动到任务栏的声音图标,滚动鼠标,声音跟着调整 Bug: https://pms.uniontech.com/bug-view-172417.html Change-Id: I369b74beb8e5e2e7e95c83dc88eef98c2849efc4
This commit is contained in:
parent
309d2508ca
commit
9fbca27acc
@ -56,9 +56,10 @@ if (${EXIT_CODE} EQUAL 0)
|
||||
endif()
|
||||
|
||||
function(generation_dbus_interface xmldir outdir)
|
||||
IF(NOT EXISTS ${outdir})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${outdir})
|
||||
IF(EXISTS ${outdir})
|
||||
file(REMOVE_RECURSE ${outdir})
|
||||
ENDIF()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${outdir})
|
||||
file(GLOB_RECURSE allXmls ${xmldir}/*.xml)
|
||||
foreach(XMLFILE ${allXmls})
|
||||
string(FIND ${XMLFILE} "/" INDEX REVERSE)
|
||||
|
@ -173,9 +173,9 @@ bool SoundPlugin::eventHandler(QEvent *event)
|
||||
return PluginsItemInterface::eventHandler(event);
|
||||
|
||||
// 获取当前默认的声音设备
|
||||
QDBusPendingCall defaultSinkCall = DDBusSender().service("org.deepin.daemon.Audio1")
|
||||
.path("/org/deepin/daemon/Audio1")
|
||||
.interface("org.deepin.daemon.Audio1")
|
||||
QDBusPendingCall defaultSinkCall = DDBusSender().service("org.deepin.dde.Audio1")
|
||||
.path("/org/deepin/dde/Audio1")
|
||||
.interface("org.deepin.dde.Audio1")
|
||||
.property("DefaultSink").get();
|
||||
defaultSinkCall.waitForFinished();
|
||||
QDBusReply<QVariant> path = defaultSinkCall.reply();
|
||||
@ -184,8 +184,8 @@ bool SoundPlugin::eventHandler(QEvent *event)
|
||||
return false;
|
||||
|
||||
// 获取当前默认声音设备的音量
|
||||
DDBusSender sinkDBus = DDBusSender().service("org.deepin.daemon.Audio1")
|
||||
.path(defaultSinkPath).interface("org.deepin.daemon.Audio1.Sink");
|
||||
DDBusSender sinkDBus = DDBusSender().service("org.deepin.dde.Audio1")
|
||||
.path(defaultSinkPath).interface("org.deepin.dde.Audio1.Sink");
|
||||
QDBusPendingCall volumeCall = sinkDBus.property("Volume").get();
|
||||
volumeCall.waitForFinished();
|
||||
QDBusReply<QVariant> volumePath = volumeCall.reply();
|
||||
|
Loading…
x
Reference in New Issue
Block a user