summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cr22-action-kerberos_warningoverlay.pngbin436 -> 362 bytes
-rw-r--r--src/toplevel.cpp9
2 files changed, 7 insertions, 2 deletions
diff --git a/src/cr22-action-kerberos_warningoverlay.png b/src/cr22-action-kerberos_warningoverlay.png
index 38d2380..29040ad 100644
--- a/src/cr22-action-kerberos_warningoverlay.png
+++ b/src/cr22-action-kerberos_warningoverlay.png
Binary files differ
diff --git a/src/toplevel.cpp b/src/toplevel.cpp
index d998691..0193549 100644
--- a/src/toplevel.cpp
+++ b/src/toplevel.cpp
@@ -299,6 +299,9 @@ void TopLevel::paintEvent(TQPaintEvent *) {
bool some_tickets_expired = false;
bool all_tickets_expired = true;
+ int expired_tickets = 0;
+ int expiring_tickets = 0;
+
KerberosTicketInfoList::Iterator it;
for (it = m_ticketList.begin(); it != m_ticketList.end(); ++it) {
KerberosTicketInfo ticket = *it;
@@ -308,9 +311,11 @@ void TopLevel::paintEvent(TQPaintEvent *) {
all_tickets_expired = false;
}
else {
+ expired_tickets++;
some_tickets_expired = true;
}
if ((ticket.validEndTime > now) && (ticket.validEndTime < now.addSecs(notifyExpiryMinutes*60))) {
+ expiring_tickets++;
tickets_expiring_soon = true;
}
}
@@ -327,13 +332,13 @@ void TopLevel::paintEvent(TQPaintEvent *) {
else if (some_tickets_expired) {
p.drawPixmap(0, 0, partiallyExpiredTicketsPixmap);
p.drawPixmap(0, 0, warningOverlayPixmap);
- baseToolTip = baseToolTip + "\n" + i18n("Some ticket(s) have expired");
+ baseToolTip = baseToolTip + "\n" + i18n("%1 ticket(s) have expired").arg(expired_tickets);
}
else {
p.drawPixmap(0, 0, activeTicketsPixmap);
if (tickets_expiring_soon) {
p.drawPixmap(0, 0, timerOverlayPixmap);
- baseToolTip = baseToolTip + "\n" + i18n("All ticket(s) are active\nSome ticket(s) will expire shortly");
+ baseToolTip = baseToolTip + "\n" + i18n("All ticket(s) are active\n%1 ticket(s) will expire shortly").arg(expiring_tickets);
}
else {
baseToolTip = baseToolTip + "\n" + i18n("All ticket(s) are active");