Mercurial > trustbridge
diff ui/trayicon.cpp @ 1151:22b3daa4e464
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 13:29:32 +0200 |
parents | a4282bc67a8b |
children | 5f4e77acb2f3 |
line wrap: on
line diff
--- a/ui/trayicon.cpp Thu Sep 18 13:27:57 2014 +0200 +++ b/ui/trayicon.cpp Thu Sep 18 13:29:32 2014 +0200 @@ -37,7 +37,8 @@ } void TrayIcon::showMessage(const QString &title, const QString &msg, - QSystemTrayIcon::MessageIcon msg_icon, int msecs) { + QSystemTrayIcon::MessageIcon msg_icon, int msecs, + const QString &okBtnText) { if (!useAlt) { QSystemTrayIcon::showMessage(title, msg, msg_icon, msecs); return; @@ -51,7 +52,11 @@ } mMessageBox->setIconPixmap(icon().pixmap(mMessageBox->iconPixmap().size())); mMessageBox->setWindowIcon(icon()); - mMessageBox->button(QMessageBox::Ok)->setText (tr("Install update")); + if (!okBtnText.isEmpty()) { + mMessageBox->button(QMessageBox::Ok)->setText (okBtnText); + } else { + mMessageBox->button(QMessageBox::Ok)->setText (tr("Install update")); + } mMessageBox->button(QMessageBox::No)->setText (tr("Remind me later")); mMessageBox->show(); }