diff options
author | Timothy Pearson <[email protected]> | 2012-06-14 01:56:59 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-06-14 01:56:59 -0500 |
commit | 097429efb842718cff6b3cc38b23284b2fd4270d (patch) | |
tree | 4dda2f0010a46f31250d42d72a4bb7223fc12d23 | |
parent | c57a10113d7abc28a8e05d2cbf9ea9956bb5b58b (diff) | |
download | kerberostray-097429efb842718cff6b3cc38b23284b2fd4270d.tar.gz kerberostray-097429efb842718cff6b3cc38b23284b2fd4270d.zip |
Update warning overlay image and increase information in tooltip
-rw-r--r-- | src/cr22-action-kerberos_warningoverlay.png | bin | 436 -> 362 bytes | |||
-rw-r--r-- | src/toplevel.cpp | 9 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/cr22-action-kerberos_warningoverlay.png b/src/cr22-action-kerberos_warningoverlay.png Binary files differindex 38d2380..29040ad 100644 --- a/src/cr22-action-kerberos_warningoverlay.png +++ b/src/cr22-action-kerberos_warningoverlay.png 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"); |