diff --git a/src/audiosettingsmodel.cpp b/src/audiosettingsmodel.cpp index 2797701388ec75e4fece52c4d1f43342280cba5f..362f18314562a725dc5a3985a5fa9b9138cc3e24 100644 --- a/src/audiosettingsmodel.cpp +++ b/src/audiosettingsmodel.cpp @@ -192,6 +192,18 @@ void AudioSettingsModel::setCaptureVolume(int volume) emit captureVolumeChanged(volume); } +void AudioSettingsModel::setDTMFMuted(bool muted) +{ + //TODO + DBus::ConfigurationManager::instance().muteDtmf(muted); + emit DTMFMutedChanged(muted); +} + +bool AudioSettingsModel::areDTMFMuted() const +{ + return DBus::ConfigurationManager::instance().isDtmfMuted(); +} + /**************************************************************** * * * AlsaPluginModel * diff --git a/src/audiosettingsmodel.h b/src/audiosettingsmodel.h index f3b61c7e55d09af3291dfc2d3fb9bc2302cc9510..6655739e1cd3efc1bd43a9d96c9bb0885c7b2570 100644 --- a/src/audiosettingsmodel.h +++ b/src/audiosettingsmodel.h @@ -56,6 +56,7 @@ public: bool isNoiseSuppressEnabled () const; bool isPlaybackMuted() const; bool isCaptureMuted () const; + bool areDTMFMuted () const; int playbackVolume () const; int captureVolume () const; @@ -80,17 +81,19 @@ public: void stopRoomTone() const; public Q_SLOTS: - void reload(); - void mutePlayback(bool m); - void muteCapture (bool m); - void setPlaybackVolume(int volume); - void setCaptureVolume(int volume); + void reload ( ); + void mutePlayback ( bool m ); + void muteCapture ( bool m ); + void setPlaybackVolume( int volume ); + void setCaptureVolume ( int volume ); + void setDTMFMuted ( bool muted ); Q_SIGNALS: void captureMuted(bool); void playbackMuted(bool); void playbackVolumeChanged(int); void captureVolumeChanged(int); + void DTMFMutedChanged(bool); private: //Constructor diff --git a/src/contactproxymodel.cpp b/src/contactproxymodel.cpp index ebd31831a9664bae46fbb063f73f585f101a7988..f78b0c4db530d467a4727414b78b61ec28eb8f19 100644 --- a/src/contactproxymodel.cpp +++ b/src/contactproxymodel.cpp @@ -204,16 +204,17 @@ void ContactProxyModel::reloadCategories() void ContactProxyModel::slotContactAdded(Contact* c) { + if (!c) return; const QString val = category(c); TopLevelItem* item = getTopLevelItem(val); ContactTreeNode* contactNode = new ContactTreeNode(c,this); contactNode->m_pParent3 = item; contactNode->m_Index = item->m_lChildren.size(); - emit layoutAboutToBeChanged(); + //emit layoutAboutToBeChanged(); beginInsertRows(index(item->m_Index,0,QModelIndex()),item->m_lChildren.size(),item->m_lChildren.size()); { item->m_lChildren << contactNode; } endInsertRows(); - emit layoutChanged(); + //emit layoutChanged(); } bool ContactProxyModel::setData( const QModelIndex& index, const QVariant &value, int role) @@ -503,6 +504,8 @@ int ContactProxyModel::acceptedPayloadTypes() QString ContactProxyModel::category(Contact* ct) const { + if (!ct) + return QString(); QString cat; switch (m_Role) { case AbstractContactBackend::Role::Organization: diff --git a/src/dbus/configurationmanager-introspec.xml b/src/dbus/configurationmanager-introspec.xml index fb97a427f0da281fcfdcb6bb46f6de5d7b433222..72f1365af9dc85da0a374177bdbb65817f0da429 100644 --- a/src/dbus/configurationmanager-introspec.xml +++ b/src/dbus/configurationmanager-introspec.xml @@ -267,6 +267,13 @@ </arg> </signal> + <!-- For now only expose these two options to clients --> + <method name="muteDtmf" tp:name-for-bindings="muteDtmf"> + <arg type="b" name="muteDtmf" direction="in"/> + </method> + <method name="isDtmfMuted" tp:name-for-bindings="isDtmfMuted"> + <arg type="b" name="muted" direction="out"/> + </method> <method name="muteCapture" tp:name-for-bindings="muteCapture"> <arg type="b" name="mute" direction="in">