Temporarily hide the "disque" widget in About dialog while showing one of the sub-dialogs.

This commit is contained in:
LoRd_MuldeR 2011-08-29 15:57:17 +02:00
parent 737be134d4
commit b687666ac9
4 changed files with 218 additions and 206 deletions

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 1
#define VER_LAMEXP_BUILD 678
#define VER_LAMEXP_BUILD 680
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -267,6 +267,9 @@ int AboutDialog::exec()
// Slots
////////////////////////////////////////////////////////////
#define TEMP_HIDE_DISQUE(CMD) \
if(m_disque) { bool _tmp = m_disque->isVisible(); if(_tmp) m_disque->hide(); {CMD}; if(_tmp) { m_disque->show(); m_disque->setWindowOpacity(0.01); } } else {CMD}
void AboutDialog::enableButtons(void)
{
const QList<QAbstractButton*> buttonList = buttons();
@ -286,11 +289,16 @@ void AboutDialog::openLicenseText(void)
void AboutDialog::showAboutQt(void)
{
TEMP_HIDE_DISQUE
(
QMessageBox::aboutQt(this);
);
}
void AboutDialog::showAboutContributors(void)
{
TEMP_HIDE_DISQUE
(
QString contributorsAboutText;
contributorsAboutText += QString("<h3><nobr>%1</nobr></h3>").arg(tr("The following people have contributed to LameXP:"));
@ -321,10 +329,13 @@ void AboutDialog::showAboutContributors(void)
contributorsAboutBox->exec();
LAMEXP_DELETE(contributorsAboutBox);
);
}
void AboutDialog::showMoreAbout(void)
{
TEMP_HIDE_DISQUE
(
QString moreAboutText;
moreAboutText += QString("<h3>%1</h3>").arg(tr("The following third-party software is used in LameXP:"));
@ -508,6 +519,7 @@ void AboutDialog::showMoreAbout(void)
moreAboutBox->exec();
LAMEXP_DELETE(moreAboutBox);
);
}
void AboutDialog::moveDisque(void)

View File

@ -947,7 +947,7 @@ void MainWindow::windowShown(void)
if(QDate::currentDate() >= lamexp_version_date().addYears(1))
{
qWarning("Binary is more than a year old, time to update!");
if(QMessageBox::warning(this, tr("Urgent Update"), QString("<nobr>%1</nobr>").arg(tr("Your version of LameXP is more than a year old. Time for an update!")), tr("Check for Updates"), tr("Exit Program")) == 0)
if(QMessageBox::warning(this, tr("Urgent Update"), QString("<nobr>%1</nobr>").arg(tr("Your version of LameXP is more than a year old. Time for an update!")).replace("-", "&minus;"), tr("Check for Updates"), tr("Exit Program")) == 0)
{
if(checkForUpdates())
{
@ -966,7 +966,7 @@ void MainWindow::windowShown(void)
QDate lastUpdateCheck = QDate::fromString(m_settings->autoUpdateLastCheck(), Qt::ISODate);
if(!lastUpdateCheck.isValid() || QDate::currentDate() >= lastUpdateCheck.addDays(14))
{
if(QMessageBox::information(this, tr("Update Reminder"), QString("<nobr>%1</nobr>").arg(lastUpdateCheck.isValid() ? tr("Your last update check was more than 14 days ago. Check for updates now?") : tr("Your did not check for LameXP updates yet. Check for updates now?")), tr("Check for Updates"), tr("Postpone")) == 0)
if(QMessageBox::information(this, tr("Update Reminder"), QString("<nobr>%1</nobr>").arg(lastUpdateCheck.isValid() ? tr("Your last update check was more than 14 days ago. Check for updates now?") : tr("Your did not check for LameXP updates yet. Check for updates now?")).replace("-", "&minus;"), tr("Check for Updates"), tr("Postpone")) == 0)
{
if(checkForUpdates())
{