[SCM] ktp-approver packaging branch, master, updated. debian/15.12.1-1-299-g62cbbd7
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 09:13:07 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-approver.git;a=commitdiff;h=b6473cc
The following commit has been merged in the master branch:
commit b6473cc6164124250c91b6af014ec29e3b7cb712
Author: George Kiagiadakis <george.kiagiadakis at collabora.co.uk>
Date: Thu Jan 27 15:21:26 2011 +0200
Count the number of channels instead of the number of messages on the tooltip.
---
src/textchannelapprover.cpp | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/textchannelapprover.cpp b/src/textchannelapprover.cpp
index c0d1585..9298c1d 100644
--- a/src/textchannelapprover.cpp
+++ b/src/textchannelapprover.cpp
@@ -40,6 +40,8 @@ TextChannelApprover::TextChannelApprover(const Tp::TextChannelPtr & channel, QOb
SLOT(onMessageReceived(Tp::ReceivedMessage)));
connect(m_notifierItem.data(), SIGNAL(activateRequested(bool,QPoint)),
SIGNAL(channelAccepted()));
+
+ updateNotifierItemTooltip();
}
TextChannelApprover::~TextChannelApprover()
@@ -83,8 +85,6 @@ void TextChannelApprover::onMessageReceived(const Tp::ReceivedMessage & msg)
m_notifications.insert(notification);
connect(notification, SIGNAL(destroyed(QObject*)), SLOT(onNotificationDestroyed(QObject*)));
-
- updateNotifierItemTooltip();
}
void TextChannelApprover::onNotificationDestroyed(QObject *notification)
@@ -106,7 +106,7 @@ QSharedPointer<KStatusNotifierItem> TextChannelApprover::getNotifierItem()
notifierItem->setIconByName(QLatin1String("mail-unread"));
notifierItem->setAttentionIconByName(QLatin1String("mail-unread-new"));
notifierItem->setStandardActionsEnabled(false);
- notifierItem->setProperty("approver_new_messages_count", 0U);
+ notifierItem->setProperty("approver_new_channels_count", 0U);
*s_notifierItem = notifierItem;
}
@@ -115,12 +115,14 @@ QSharedPointer<KStatusNotifierItem> TextChannelApprover::getNotifierItem()
void TextChannelApprover::updateNotifierItemTooltip()
{
- QVariant numMessages = m_notifierItem->property("approver_new_messages_count");
- numMessages = QVariant(numMessages.toUInt() + 1);
- m_notifierItem->setProperty("approver_new_messages_count", numMessages);
+ QVariant channelsCount = m_notifierItem->property("approver_new_channels_count");
+ channelsCount = QVariant(channelsCount.toUInt() + 1);
+ m_notifierItem->setProperty("approver_new_channels_count", channelsCount);
m_notifierItem->setToolTip(QLatin1String("mail-unread-new"),
- i18n("You have %1 new unread messages", numMessages.toUInt()),
+ i18np("You have 1 incoming conversation",
+ "You have %1 incoming conversations",
+ channelsCount.toUInt()),
QString());
}
--
ktp-approver packaging
More information about the pkg-kde-commits
mailing list