diff --git a/dialer/package/contents/ui/Dialpad/Dialpad.qml b/dialer/package/contents/ui/Dialpad/Dialpad.qml index 1303be73..9fa5c49d 100644 --- a/dialer/package/contents/ui/Dialpad/Dialpad.qml +++ b/dialer/package/contents/ui/Dialpad/Dialpad.qml @@ -37,16 +37,16 @@ GridLayout { Layout.fillHeight: true DialerButton { id: one; text: "1" } - DialerButton { text: "2" } - DialerButton { text: "3" } + DialerButton { text: "2"; sub: "ABC" } + DialerButton { text: "3"; sub: "DEF" } - DialerButton { text: "4" } - DialerButton { text: "5" } - DialerButton { text: "6" } + DialerButton { text: "4"; sub: "GHI" } + DialerButton { text: "5"; sub: "JKL" } + DialerButton { text: "6"; sub: "MNO" } - DialerButton { text: "7" } - DialerButton { text: "8" } - DialerButton { text: "9" } + DialerButton { text: "7"; sub: "PQRS" } + DialerButton { text: "8"; sub: "TUV" } + DialerButton { text: "9"; sub: "WXYZ" } DialerButton { text: "*"; } DialerButton { text: "0"; sub: "+"; } diff --git a/dialer/package/contents/ui/main.qml b/dialer/package/contents/ui/main.qml index 8b381dc0..b3383ff9 100644 --- a/dialer/package/contents/ui/main.qml +++ b/dialer/package/contents/ui/main.qml @@ -54,6 +54,7 @@ ApplicationWindow { } else if (status == 5) { wasVisible = root.visible; root.visible = true; + dialerUtils.notifyRinging(); //Was STATUS_INCOMING now is STATUS_DISCONNECTED: Missed call! } else if (status == 7 && previousStatus == 5) { var prettyDate = Qt.formatTime(voiceCallmanager.activeVoiceCall.startedAt, Qt.locale().timeFormat(Locale.ShortFormat)); @@ -62,6 +63,8 @@ ApplicationWindow { insertCallInHistory(voiceCallmanager.activeVoiceCall.lineId, 0, 0); } else if (status == 7) { insertCallInHistory(voiceCallmanager.activeVoiceCall.lineId, voiceCallmanager.activeVoiceCall.duration, isIncoming ? 1 : 2); + } else { + dialerUtils.stopRinging(); } previousStatus = status; diff --git a/dialer/src/dialerutils.cpp b/dialer/src/dialerutils.cpp index 1d4b25c9..7c3c7eeb 100644 --- a/dialer/src/dialerutils.cpp +++ b/dialer/src/dialerutils.cpp @@ -76,4 +76,20 @@ void DialerUtils::resetMissedCalls() m_callsNotification.clear(); } +void DialerUtils::notifyRinging() +{ + if (!m_ringingNotification) { + m_ringingNotification = new KNotification("ringing", KNotification::Persistent|KNotification::LoopSound, 0); + m_ringingNotification->setComponentName("plasma_dialer"); + } + m_ringingNotification->sendEvent(); +} + +void DialerUtils::stopRinging() +{ + if (m_ringingNotification) { + m_ringingNotification->close(); + } +} + #include "moc_dialerutils.cpp" diff --git a/dialer/src/dialerutils.h b/dialer/src/dialerutils.h index 53ae5855..41cc218f 100644 --- a/dialer/src/dialerutils.h +++ b/dialer/src/dialerutils.h @@ -33,12 +33,15 @@ public: Q_INVOKABLE void notifyMissedCall(const QString &caller, const QString &description); Q_INVOKABLE void resetMissedCalls(); + Q_INVOKABLE void notifyRinging(); + Q_INVOKABLE void stopRinging(); Q_SIGNALS: void missedCallsActionTriggered(); private: QPointer m_callsNotification; + QPointer m_ringingNotification; int m_missedCalls; }; diff --git a/dialer/src/plasma_dialer.notifyrc b/dialer/src/plasma_dialer.notifyrc index 14865a2e..34ec63b5 100644 --- a/dialer/src/plasma_dialer.notifyrc +++ b/dialer/src/plasma_dialer.notifyrc @@ -7,3 +7,9 @@ Name=Missed Call Comment=A call has been missed Action=Popup +[Event/ringing] +Name=Ringing +Comment=The phone is ringing +Action=Sound +Sound=KDE-Sys-Question.ogg +