diff options
author | Tobias Markmann <tm@ayena.de> | 2016-10-21 12:46:37 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-10-21 12:46:37 (GMT) |
commit | e7ea063f2d5e448d10111d14539c7b19b34243a6 (patch) | |
tree | c8b1c05c04bd35bded7b05a94ac36723a88b0d57 /Swift/QtUI | |
parent | 37c12b839fa3dc7ebe77b7b337e92440e8135058 (diff) | |
download | swift-e7ea063f2d5e448d10111d14539c7b19b34243a6.zip swift-e7ea063f2d5e448d10111d14539c7b19b34243a6.tar.bz2 |
Add delivery-warning SVG icon with a matching style
The delviery-warning.svg matches the style of
delivery-failure.svg and delivery-success.svg. It is a
yellowish circle with a white border and a white exclamation
mark in it.
Test-Information:
Build and checked the new icon is shown when a message
receipt is requested but no receipt is received.
Tested on macOS 10.12 with Qt 5.7.0 and QtWebKit TP4.
Change-Id: Ie715993eabd8f853ea0a6983645d7d89259f61a7
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtWebKitChatView.cpp | 2 | ||||
-rw-r--r-- | Swift/QtUI/Swift.qrc | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp index 414f098..c0ce3dc 100644 --- a/Swift/QtUI/QtWebKitChatView.cpp +++ b/Swift/QtUI/QtWebKitChatView.cpp @@ -935,57 +935,57 @@ void QtWebKitChatView::addMUCInvitation(const std::string& senderName, const JID addMessageBottom(std::make_shared<MessageSnippet>(htmlString, QtUtilities::htmlEscape(P2QSTRING(senderName)), B2QDATE(boost::posix_time::second_clock::universal_time()), qAvatarPath, false, appendToPrevious, theme_, id, ChatSnippet::getDirection(message))); previousMessageWasSelf_ = false; previousSenderName_ = P2QSTRING(senderName); previousMessageKind_ = PreviousMessageWasMUCInvite; } void QtWebKitChatView::setAckState(std::string const& id, ChatWindow::AckState state) { QString xml; switch (state) { case ChatWindow::Pending: xml = "<img src='qrc:/icons/throbber.gif' title='" + tr("This message has not been received by your server yet.") + "'/>"; displayReceiptInfo(P2QSTRING(id), false); break; case ChatWindow::Received: xml = ""; displayReceiptInfo(P2QSTRING(id), true); break; case ChatWindow::Failed: xml = "<img src='qrc:/icons/error.png' title='" + tr("This message may not have been transmitted.") + "'/>"; break; } setAckXML(P2QSTRING(id), xml); } void QtWebKitChatView::setMessageReceiptState(const std::string& id, ChatWindow::ReceiptState state) { QString xml; switch (state) { case ChatWindow::ReceiptReceived: xml = "<img src='qrc:/icons/delivery-success.svg' title='" + tr("The receipt for this message has been received.") + "'/>"; break; case ChatWindow::ReceiptRequested: - xml = "<img src='qrc:/icons/warn.png' title='" + tr("The receipt for this message has not yet been received. The recipient(s) might not have received this message.") + "'/>"; + xml = "<img src='qrc:/icons/delivery-warning.svg' title='" + tr("The receipt for this message has not yet been received. The recipient(s) might not have received this message.") + "'/>"; break; case ChatWindow::ReceiptFailed: xml = "<img src='qrc:/icons/delivery-failure.svg' title='" + tr("Failed to transmit message to the receipient(s).") + "'/>"; } setReceiptXML(P2QSTRING(id), xml); } bool QtWebKitChatView::appendToPreviousCheck(PreviousMessageKind messageKind, const std::string& senderName, bool senderIsSelf) { bool result = previousMessageKind_ == messageKind && ((senderIsSelf && previousMessageWasSelf_) || (!senderIsSelf && !previousMessageWasSelf_&& previousSenderName_ == P2QSTRING(senderName))); if (insertingLastLine_) { insertingLastLine_ = false; return false; } return result; } ChatSnippet::Direction QtWebKitChatView::getActualDirection(const ChatWindow::ChatMessage& message, ChatWindow::Direction direction) { if (direction == ChatWindow::DefaultDirection) { return QCoreApplication::translate("QApplication", "QT_LAYOUT_DIRECTION") == "RTL" ? ChatSnippet::RTL : ChatSnippet::LTR; } else { return ChatSnippet::getDirection(message); } } } diff --git a/Swift/QtUI/Swift.qrc b/Swift/QtUI/Swift.qrc index 6865d8e..cfb0fec 100644 --- a/Swift/QtUI/Swift.qrc +++ b/Swift/QtUI/Swift.qrc @@ -19,32 +19,33 @@ <file alias="icons/avatar.svg">../resources/icons/avatar.svg</file> <file alias="icons/no-avatar.png">../resources/icons/no-avatar.png</file> <file alias="icons/tray-standard.png">../resources/icons/tray-standard.png</file> <file alias="icons/new-chat.png">../resources/icons/new-chat.png</file> <file alias="icons/actions.png">../resources/icons/actions.png</file> <file alias="COPYING">COPYING</file> <file alias="ChangeLog.md">../ChangeLog.md</file> <file alias="icons/line.png">../resources/icons/line.png</file> <file alias="icons/rect.png">../resources/icons/rect.png</file> <file alias="icons/circle.png">../resources/icons/circle.png</file> <file alias="icons/handline.png">../resources/icons/handline.png</file> <file alias="icons/text.png">../resources/icons/text.png</file> <file alias="icons/polygon.png">../resources/icons/polygon.png</file> <file alias="icons/cursor.png">../resources/icons/cursor.png</file> <file alias="icons/eraser.png">../resources/icons/eraser.png</file> <file alias="emoticons/emoticons.txt">../resources/emoticons/emoticons.txt</file> <file alias="emoticons/evilgrin.png">../resources/emoticons/evilgrin.png</file> <file alias="emoticons/grin.png">../resources/emoticons/grin.png</file> <file alias="emoticons/happy.png">../resources/emoticons/happy.png</file> <file alias="emoticons/smile.png">../resources/emoticons/smile.png</file> <file alias="emoticons/surprised.png">../resources/emoticons/surprised.png</file> <file alias="emoticons/tongue.png">../resources/emoticons/tongue.png</file> <file alias="emoticons/unhappy.png">../resources/emoticons/unhappy.png</file> <file alias="emoticons/wink.png">../resources/emoticons/wink.png</file> <file alias="icons/star-checked.png">../resources/icons/star-checked2.png</file> <file alias="icons/star-unchecked.png">../resources/icons/star-unchecked2.png</file> <file alias="icons/zzz.png">../resources/icons/zzz.png</file> <file alias="icons/stop.png">../resources/icons/stop.png</file> <file alias="icons/delivery-success.svg">../resources/icons/delivery-success.svg</file> <file alias="icons/delivery-failure.svg">../resources/icons/delivery-failure.svg</file> + <file alias="icons/delivery-warning.svg">../resources/icons/delivery-warning.svg</file> </qresource> </RCC> |