From 8e92fcda21629a8b97f84677b4ac70571285d202 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Wed, 18 Dec 2013 21:21:19 +0100 Subject: [PATCH] Fixed wrong build info define names Tray popup delay is now only applied the first time --- src/mainwidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 00db5cc..f01cd1b 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -36,6 +36,8 @@ const QStringList MainWidget::path_list = QStringList() << "photoPath" << "musicPath" << "videoPath" << "appsPath" << "urlPath"; +bool sleptOnce = false; + MainWidget::MainWidget(QWidget *parent) : QWidget(parent) { @@ -137,7 +139,7 @@ void MainWidget::showAboutDialog() #ifndef QCMA_BUILD_HASH about.setInformativeText(tr("Copyright (C) 2013 Codestation") + "\n"); #else - about.setInformativeText(tr("Copyright (C) 2013 Codestation\n\nbuild hash: %1\nbuild branch: %2").arg(BUILD_HASH).arg(BUILD_BRANCH)); + about.setInformativeText(tr("Copyright (C) 2013 Codestation\n\nbuild hash: %1\nbuild branch: %2").arg(QCMA_BUILD_HASH).arg(QCMA_BUILD_BRANCH)); #endif about.setStandardButtons(QMessageBox::Ok); about.setIconPixmap(QPixmap(":/main/resources/images/qcma.png")); @@ -199,7 +201,11 @@ void MainWidget::receiveMessage(QString message) { // a timeout is added before the popups are displayed to prevent them from // appearing in the wrong location - Sleeper::msleep(500); + if(!sleptOnce) { + Sleeper::sleep(1); + sleptOnce = true; + } + if(trayIcon->isVisible()) { trayIcon->showMessage(tr("Information"), message); }