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_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 1 #define VER_LAMEXP_PATCH 1
#define VER_LAMEXP_BUILD 678 #define VER_LAMEXP_BUILD 680
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tools versions // Tools versions

View File

@ -63,7 +63,7 @@ g_lamexp_contributors[] =
{"es", L"Español", L"Rub3nCT", "Rub3nCT@gmail.com" }, {"es", L"Español", L"Rub3nCT", "Rub3nCT@gmail.com" },
{"fr", L"Française", L"Dodich Informatique", "Dodich@live.fr" }, {"fr", L"Française", L"Dodich Informatique", "Dodich@live.fr" },
{"it", L"Italiano", L"Roberto", "Gulliver_69@libero.it"}, {"it", L"Italiano", L"Roberto", "Gulliver_69@libero.it"},
{"kr", L"한국어", L"JaeHyung Lee", "Kolanp@gmail.com" }, {"kr", L"한국어", L"JaeHyung Lee", "Kolanp@gmail.com" },
{"ru", L"Русский", L"Neonailol", "Neonailol@gmail.com" }, {"ru", L"Русский", L"Neonailol", "Neonailol@gmail.com" },
{"uk", L"Українська", L"Arestarh", "Arestarh@ukr.net" }, {"uk", L"Українська", L"Arestarh", "Arestarh@ukr.net" },
{NULL, NULL, NULL, NULL} {NULL, NULL, NULL, NULL}
@ -267,6 +267,9 @@ int AboutDialog::exec()
// Slots // 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) void AboutDialog::enableButtons(void)
{ {
const QList<QAbstractButton*> buttonList = buttons(); const QList<QAbstractButton*> buttonList = buttons();
@ -286,228 +289,237 @@ void AboutDialog::openLicenseText(void)
void AboutDialog::showAboutQt(void) void AboutDialog::showAboutQt(void)
{ {
QMessageBox::aboutQt(this); TEMP_HIDE_DISQUE
(
QMessageBox::aboutQt(this);
);
} }
void AboutDialog::showAboutContributors(void) void AboutDialog::showAboutContributors(void)
{ {
QString contributorsAboutText; TEMP_HIDE_DISQUE
(
QString contributorsAboutText;
contributorsAboutText += QString("<h3><nobr>%1</nobr></h3>").arg(tr("The following people have contributed to LameXP:")); contributorsAboutText += QString("<h3><nobr>%1</nobr></h3>").arg(tr("The following people have contributed to LameXP:"));
contributorsAboutText += QString("<b>%1</b>").arg(tr("Translators:")); contributorsAboutText += QString("<b>%1</b>").arg(tr("Translators:"));
contributorsAboutText += "<table style=\"margin-top:5px\">"; contributorsAboutText += "<table style=\"margin-top:5px\">";
for(int i = 0; g_lamexp_contributors[i].pcName; i++) for(int i = 0; g_lamexp_contributors[i].pcName; i++)
{ {
QString flagIcon = (strlen(g_lamexp_contributors[i].pcFlag) > 0) ? QString("<img src=\":/flags/%1.png\">").arg(g_lamexp_contributors[i].pcFlag) : QString(); QString flagIcon = (strlen(g_lamexp_contributors[i].pcFlag) > 0) ? QString("<img src=\":/flags/%1.png\">").arg(g_lamexp_contributors[i].pcFlag) : QString();
contributorsAboutText += QString("<tr><td valign=\"middle\">%1</td><td>&nbsp;&nbsp;</td>").arg(flagIcon); contributorsAboutText += QString("<tr><td valign=\"middle\">%1</td><td>&nbsp;&nbsp;</td>").arg(flagIcon);
contributorsAboutText += QString("<td valign=\"middle\">%2</td><td>&nbsp;&nbsp;</td>").arg(WCHAR2QSTR(g_lamexp_contributors[i].pcLanguage)); contributorsAboutText += QString("<td valign=\"middle\">%2</td><td>&nbsp;&nbsp;</td>").arg(WCHAR2QSTR(g_lamexp_contributors[i].pcLanguage));
contributorsAboutText += QString("<td valign=\"middle\">%3</td><td>&nbsp;&nbsp;</td><td>&lt;%4&gt;</td></tr>").arg(WCHAR2QSTR(g_lamexp_contributors[i].pcName), g_lamexp_contributors[i].pcMail); contributorsAboutText += QString("<td valign=\"middle\">%3</td><td>&nbsp;&nbsp;</td><td>&lt;%4&gt;</td></tr>").arg(WCHAR2QSTR(g_lamexp_contributors[i].pcName), g_lamexp_contributors[i].pcMail);
} }
contributorsAboutText += "</table>"; contributorsAboutText += "</table>";
contributorsAboutText += "<br><br>"; contributorsAboutText += "<br><br>";
contributorsAboutText += QString("<nobr><i>%1</i></nobr><br>").arg(tr("If you are willing to contribute a LameXP translation, feel free to contact us!")); contributorsAboutText += QString("<nobr><i>%1</i></nobr><br>").arg(tr("If you are willing to contribute a LameXP translation, feel free to contact us!"));
QMessageBox *contributorsAboutBox = new QMessageBox(this); QMessageBox *contributorsAboutBox = new QMessageBox(this);
contributorsAboutBox->setText(contributorsAboutText); contributorsAboutBox->setText(contributorsAboutText);
contributorsAboutBox->setIconPixmap(dynamic_cast<QApplication*>(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); contributorsAboutBox->setIconPixmap(dynamic_cast<QApplication*>(QApplication::instance())->windowIcon().pixmap(QSize(64,64)));
QPushButton *closeButton = contributorsAboutBox->addButton(tr("Discard"), QMessageBox::AcceptRole); QPushButton *closeButton = contributorsAboutBox->addButton(tr("Discard"), QMessageBox::AcceptRole);
closeButton->setIcon(QIcon(":/icons/cross.png")); closeButton->setIcon(QIcon(":/icons/cross.png"));
closeButton->setMinimumWidth(90); closeButton->setMinimumWidth(90);
contributorsAboutBox->setWindowTitle(tr("About Contributors")); contributorsAboutBox->setWindowTitle(tr("About Contributors"));
contributorsAboutBox->setIconPixmap(QIcon(":/images/Logo_Contributors.png").pixmap(QSize(64,74))); contributorsAboutBox->setIconPixmap(QIcon(":/images/Logo_Contributors.png").pixmap(QSize(64,74)));
contributorsAboutBox->setWindowIcon(QIcon(":/icons/user_suit.png")); contributorsAboutBox->setWindowIcon(QIcon(":/icons/user_suit.png"));
contributorsAboutBox->exec(); contributorsAboutBox->exec();
LAMEXP_DELETE(contributorsAboutBox); LAMEXP_DELETE(contributorsAboutBox);
);
} }
void AboutDialog::showMoreAbout(void) void AboutDialog::showMoreAbout(void)
{ {
QString moreAboutText; TEMP_HIDE_DISQUE
(
QString moreAboutText;
moreAboutText += QString("<h3>%1</h3>").arg(tr("The following third-party software is used in LameXP:")); moreAboutText += QString("<h3>%1</h3>").arg(tr("The following third-party software is used in LameXP:"));
moreAboutText += "<div style=\"margin-left:-25px;font-size:7pt;white-space:nowrap\"><table><tr><td><ul>"; moreAboutText += "<div style=\"margin-left:-25px;font-size:7pt;white-space:nowrap\"><table><tr><td><ul>";
moreAboutText += makeToolText moreAboutText += makeToolText
(
tr("LAME &minus; OpenSource mp3 Encoder"),
"lame.exe", "v?.??, Beta-?",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://lame.sourceforge.net/"
);
moreAboutText += makeToolText
(
tr("OggEnc &minus; Ogg Vorbis Encoder"),
"oggenc2.exe", "v?.??, aoTuV Beta-?.??",
tr("Completely open and patent-free audio encoding technology."),
"http://www.vorbis.com/"
);
moreAboutText += makeToolText
(
tr("Nero AAC Reference MPEG-4 Encoder"),
"neroAacEnc.exe", "v?.?.?.?",
tr("Freeware state-of-the-art HE-AAC encoder with 2-Pass support."),
neroAacUrl,
tr("Available from vendor web-site as free download:")
);
moreAboutText += makeToolText
(
tr("Aften &minus; A/52 audio encoder"),
"aften.exe", "v?.?.?",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://aften.sourceforge.net/"
);
moreAboutText += makeToolText
(
tr("FLAC &minus; Free Lossless Audio Codec"),
"flac.exe", "v?.?.?",
tr("Open and patent-free lossless audio compression technology."),
"http://flac.sourceforge.net/"
);
moreAboutText += makeToolText
(
tr("mpg123 &minus; Fast Console MPEG Audio Player/Decoder"),
"mpg123.exe", "v?.??.?",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://www.mpg123.de/"
);
moreAboutText += makeToolText
(
tr("FAAD &minus; OpenSource MPEG-4 and MPEG-2 AAC Decoder"),
"faad.exe", "v?.?",
tr("Released under the terms of the GNU General Public License."),
"http://www.audiocoding.com/"
);
moreAboutText += makeToolText
(
tr("AC3Filter Tools &minus; AC3/DTS Decoder"),
"valdec.exe", "v?.??",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://www.ac3filter.net/projects/tools"
);
moreAboutText += makeToolText
( (
tr("WavPack &minus; Hybrid Lossless Compression"), tr("LAME &minus; OpenSource mp3 Encoder"),
"wvunpack.exe", "v?.??.?", "lame.exe", "v?.??, Beta-?",
tr("Completely open audio compression format."), tr("Released under the terms of the GNU Lesser General Public License."),
"http://www.wavpack.com/" "http://lame.sourceforge.net/"
); );
moreAboutText += makeToolText moreAboutText += makeToolText
( (
tr("Musepack &minus; Living Audio Compression"), tr("OggEnc &minus; Ogg Vorbis Encoder"),
"mpcdec.exe", "r???", "oggenc2.exe", "v?.??, aoTuV Beta-?.??",
tr("Released under the terms of the GNU Lesser General Public License."), tr("Completely open and patent-free audio encoding technology."),
"http://www.musepack.net/" "http://www.vorbis.com/"
); );
moreAboutText += makeToolText moreAboutText += makeToolText
( (
tr("Monkey's Audio &minus; Lossless Audio Compressor"), tr("Nero AAC Reference MPEG-4 Encoder"),
"mac.exe", "v?.??", "neroAacEnc.exe", "v?.?.?.?",
tr("Freely available source code, simple SDK and non-restrictive licensing."), tr("Freeware state-of-the-art HE-AAC encoder with 2-Pass support."),
"http://www.monkeysaudio.com/" neroAacUrl,
); tr("Available from vendor web-site as free download:")
moreAboutText += QString );
( moreAboutText += makeToolText
"</ul></td><td><ul>" (
); tr("Aften &minus; A/52 audio encoder"),
moreAboutText += makeToolText "aften.exe", "v?.?.?",
( tr("Released under the terms of the GNU Lesser General Public License."),
tr("Shorten &minus; Lossless Audio Compressor"), "http://aften.sourceforge.net/"
"shorten.exe", "v?.?.?", );
tr("Released under the terms of the GNU Lesser General Public License."), moreAboutText += makeToolText
"http://etree.org/shnutils/shorten/" (
); tr("FLAC &minus; Free Lossless Audio Codec"),
moreAboutText += makeToolText "flac.exe", "v?.?.?",
( tr("Open and patent-free lossless audio compression technology."),
tr("Speex &minus; Free Codec For Free Speech"), "http://flac.sourceforge.net/"
"speexdec.exe", "v?.?", );
tr("Open Source patent-free audio format designed for speech."), moreAboutText += makeToolText
"http://www.speex.org/" (
); tr("mpg123 &minus; Fast Console MPEG Audio Player/Decoder"),
moreAboutText += makeToolText "mpg123.exe", "v?.??.?",
( tr("Released under the terms of the GNU Lesser General Public License."),
tr("The True Audio &minus; Lossless Audio Codec"), "http://www.mpg123.de/"
"tta.exe", "v?.?", );
tr("Released under the terms of the GNU Lesser General Public License."), moreAboutText += makeToolText
"http://tta.sourceforge.net/" (
); tr("FAAD &minus; OpenSource MPEG-4 and MPEG-2 AAC Decoder"),
moreAboutText += makeToolText "faad.exe", "v?.?",
( tr("Released under the terms of the GNU General Public License."),
tr("ALAC Decoder"), "http://www.audiocoding.com/"
"alac.exe", "v?.?.?", );
tr("Copyright (c) 2004 David Hammerton. Contributions by Cody Brocious."), moreAboutText += makeToolText
"http://craz.net/programs/itunes/alac.html" (
); tr("AC3Filter Tools &minus; AC3/DTS Decoder"),
moreAboutText += makeToolText "valdec.exe", "v?.??",
( tr("Released under the terms of the GNU Lesser General Public License."),
tr("wma2wav &minus; Dump WMA files to Wave Audio"), "http://www.ac3filter.net/projects/tools"
"wma2wav.exe", "????-??-??", );
tr("Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved."), moreAboutText += makeToolText
"http://forum.doom9.org/showthread.php?t=140273" (
); tr("WavPack &minus; Hybrid Lossless Compression"),
moreAboutText += makeToolText "wvunpack.exe", "v?.??.?",
( tr("Completely open audio compression format."),
tr("avs2wav &minus; Avisynth to Wave Audio converter"), "http://www.wavpack.com/"
"avs2wav.exe", "v?.?", );
tr("By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>."), moreAboutText += makeToolText
"http://forum.doom9.org/showthread.php?t=70882" (
); tr("Musepack &minus; Living Audio Compression"),
moreAboutText += makeToolText "mpcdec.exe", "r???",
( tr("Released under the terms of the GNU Lesser General Public License."),
tr("MediaInfo &minus; Media File Analysis Tool"), "http://www.musepack.net/"
"mediainfo.exe", "v?.?.??", );
tr("Released under the terms of the GNU Lesser General Public License."), moreAboutText += makeToolText
"http://mediainfo.sourceforge.net/" (
); tr("Monkey's Audio &minus; Lossless Audio Compressor"),
moreAboutText += makeToolText "mac.exe", "v?.??",
( tr("Freely available source code, simple SDK and non-restrictive licensing."),
tr("SoX &minus; Sound eXchange"), "http://www.monkeysaudio.com/"
"sox.exe", "v??.?.?", );
tr("Released under the terms of the GNU Lesser General Public License."), moreAboutText += QString
"http://sox.sourceforge.net/" (
); "</ul></td><td><ul>"
moreAboutText += makeToolText );
( moreAboutText += makeToolText
tr("GnuPG &minus; The GNU Privacy Guard"), (
"gpgv.exe", "v?.?.??", tr("Shorten &minus; Lossless Audio Compressor"),
tr("Released under the terms of the GNU Lesser General Public License."), "shorten.exe", "v?.?.?",
"http://www.gnupg.org/" tr("Released under the terms of the GNU Lesser General Public License."),
); "http://etree.org/shnutils/shorten/"
moreAboutText += makeToolText );
( moreAboutText += makeToolText
tr("GNU Wget &minus; Software for retrieving files using HTTP"), (
"wget.exe", "v?.??.?", tr("Speex &minus; Free Codec For Free Speech"),
tr("Released under the terms of the GNU Lesser General Public License."), "speexdec.exe", "v?.?",
"http://www.gnu.org/software/wget/" tr("Open Source patent-free audio format designed for speech."),
); "http://www.speex.org/"
moreAboutText += makeToolText );
( moreAboutText += makeToolText
tr("Silk Icons &minus; Over 700 icons in PNG format"), (
QString(), "v1.3", tr("The True Audio &minus; Lossless Audio Codec"),
tr("By Mark James, released under the Creative Commons 'by' License."), "tta.exe", "v?.?",
"http://www.famfamfam.com/lab/icons/silk/" tr("Released under the terms of the GNU Lesser General Public License."),
); "http://tta.sourceforge.net/"
moreAboutText += QString("</ul></td><td>&nbsp;</td></tr></table></div><i><nobr>%1</nobr></i><br>").arg );
( moreAboutText += makeToolText
tr("LameXP as a whole is copyrighted by LoRd_MuldeR. The copyright of thrird-party software used in LameXP belongs to the individual authors.").replace("-", "&minus;") (
); tr("ALAC Decoder"),
"alac.exe", "v?.?.?",
tr("Copyright (c) 2004 David Hammerton. Contributions by Cody Brocious."),
"http://craz.net/programs/itunes/alac.html"
);
moreAboutText += makeToolText
(
tr("wma2wav &minus; Dump WMA files to Wave Audio"),
"wma2wav.exe", "????-??-??",
tr("Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved."),
"http://forum.doom9.org/showthread.php?t=140273"
);
moreAboutText += makeToolText
(
tr("avs2wav &minus; Avisynth to Wave Audio converter"),
"avs2wav.exe", "v?.?",
tr("By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>."),
"http://forum.doom9.org/showthread.php?t=70882"
);
moreAboutText += makeToolText
(
tr("MediaInfo &minus; Media File Analysis Tool"),
"mediainfo.exe", "v?.?.??",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://mediainfo.sourceforge.net/"
);
moreAboutText += makeToolText
(
tr("SoX &minus; Sound eXchange"),
"sox.exe", "v??.?.?",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://sox.sourceforge.net/"
);
moreAboutText += makeToolText
(
tr("GnuPG &minus; The GNU Privacy Guard"),
"gpgv.exe", "v?.?.??",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://www.gnupg.org/"
);
moreAboutText += makeToolText
(
tr("GNU Wget &minus; Software for retrieving files using HTTP"),
"wget.exe", "v?.??.?",
tr("Released under the terms of the GNU Lesser General Public License."),
"http://www.gnu.org/software/wget/"
);
moreAboutText += makeToolText
(
tr("Silk Icons &minus; Over 700 icons in PNG format"),
QString(), "v1.3",
tr("By Mark James, released under the Creative Commons 'by' License."),
"http://www.famfamfam.com/lab/icons/silk/"
);
moreAboutText += QString("</ul></td><td>&nbsp;</td></tr></table></div><i><nobr>%1</nobr></i><br>").arg
(
tr("LameXP as a whole is copyrighted by LoRd_MuldeR. The copyright of thrird-party software used in LameXP belongs to the individual authors.").replace("-", "&minus;")
);
QMessageBox *moreAboutBox = new QMessageBox(this); QMessageBox *moreAboutBox = new QMessageBox(this);
moreAboutBox->setText(moreAboutText); moreAboutBox->setText(moreAboutText);
moreAboutBox->setIconPixmap(dynamic_cast<QApplication*>(QApplication::instance())->windowIcon().pixmap(QSize(64,64))); moreAboutBox->setIconPixmap(dynamic_cast<QApplication*>(QApplication::instance())->windowIcon().pixmap(QSize(64,64)));
QPushButton *closeButton = moreAboutBox->addButton(tr("Discard"), QMessageBox::AcceptRole); QPushButton *closeButton = moreAboutBox->addButton(tr("Discard"), QMessageBox::AcceptRole);
closeButton->setIcon(QIcon(":/icons/cross.png")); closeButton->setIcon(QIcon(":/icons/cross.png"));
closeButton->setMinimumWidth(90); closeButton->setMinimumWidth(90);
moreAboutBox->setWindowTitle(tr("About Third-party Software")); moreAboutBox->setWindowTitle(tr("About Third-party Software"));
moreAboutBox->setIconPixmap(QIcon(":/images/Logo_Software.png").pixmap(QSize(64,71))); moreAboutBox->setIconPixmap(QIcon(":/images/Logo_Software.png").pixmap(QSize(64,71)));
moreAboutBox->setWindowIcon(QIcon(":/icons/page_white_cplusplus.png")); moreAboutBox->setWindowIcon(QIcon(":/icons/page_white_cplusplus.png"));
moreAboutBox->exec(); moreAboutBox->exec();
LAMEXP_DELETE(moreAboutBox); LAMEXP_DELETE(moreAboutBox);
);
} }
void AboutDialog::moveDisque(void) void AboutDialog::moveDisque(void)

View File

@ -947,7 +947,7 @@ void MainWindow::windowShown(void)
if(QDate::currentDate() >= lamexp_version_date().addYears(1)) if(QDate::currentDate() >= lamexp_version_date().addYears(1))
{ {
qWarning("Binary is more than a year old, time to update!"); 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()) if(checkForUpdates())
{ {
@ -966,7 +966,7 @@ void MainWindow::windowShown(void)
QDate lastUpdateCheck = QDate::fromString(m_settings->autoUpdateLastCheck(), Qt::ISODate); QDate lastUpdateCheck = QDate::fromString(m_settings->autoUpdateLastCheck(), Qt::ISODate);
if(!lastUpdateCheck.isValid() || QDate::currentDate() >= lastUpdateCheck.addDays(14)) 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()) if(checkForUpdates())
{ {

View File

@ -243,7 +243,7 @@ void SettingsModel::validate(void)
if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive)) if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive))
{ {
qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData()); qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
this->currentLanguage(defaultLanguage()); this->currentLanguage(defaultLanguage());
} }
} }