Try to detect "Disable visual themes" + four new strings to translate
This commit is contained in:
parent
b964c3a53b
commit
8f4fae7fda
@ -1711,7 +1711,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)"
"
|
||||
AdditionalDependencies=""$(ProjectDir)\res\localization\LameXP_DE.qm""
|
||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
/>
|
||||
@ -1722,7 +1722,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)"
"
|
||||
AdditionalDependencies=""
|
||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
/>
|
||||
@ -1733,7 +1733,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)"
"
|
||||
AdditionalDependencies=""$(ProjectDir)\res\localization\LameXP_DE.qm""
|
||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
/>
|
||||
|
@ -166,6 +166,17 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FileListModel</name>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Full Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogViewDialog</name>
|
||||
<message>
|
||||
@ -707,6 +718,14 @@
|
||||
<source>Do you really want to disable the update reminder?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The update reminder has been disabled.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -166,6 +166,18 @@
|
||||
<translation>(Rechts-klicken um die DropBox zu schließen)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FileListModel</name>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translatorcomment>Titel</translatorcomment>
|
||||
<translation>Titel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Full Path</source>
|
||||
<translation>Datei Pfad</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogViewDialog</name>
|
||||
<message>
|
||||
@ -811,6 +823,14 @@
|
||||
<source>Already Running</source>
|
||||
<translation>Wird Bereits Ausgeführt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yes</source>
|
||||
<translation>Ja</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No</source>
|
||||
<translation>Nein</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
7,Deutsch
|
||||
42,Deutsch
|
@ -1 +1 @@
|
||||
12,Française
|
||||
37,Française
|
@ -1 +1 @@
|
||||
16,Italiano
|
||||
58,Italiano
|
@ -25,7 +25,7 @@
|
||||
#define VER_LAMEXP_MAJOR 4
|
||||
#define VER_LAMEXP_MINOR_HI 0
|
||||
#define VER_LAMEXP_MINOR_LO 0
|
||||
#define VER_LAMEXP_BUILD 210
|
||||
#define VER_LAMEXP_BUILD 212
|
||||
#define VER_LAMEXP_SUFFIX TechPreview
|
||||
|
||||
/*
|
||||
|
@ -242,8 +242,8 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
||||
actionStyleWindowsXP->setUserData(0, new Index(3));
|
||||
actionStyleWindowsClassic->setUserData(0, new Index(4));
|
||||
actionStylePlastique->setChecked(true);
|
||||
actionStyleWindowsXP->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_XP);
|
||||
actionStyleWindowsVista->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA);
|
||||
actionStyleWindowsXP->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_XP && lamexp_themes_enabled());
|
||||
actionStyleWindowsVista->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA && lamexp_themes_enabled());
|
||||
connect(m_styleActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(styleActionActivated(QAction*)));
|
||||
styleActionActivated(NULL);
|
||||
|
||||
@ -947,21 +947,33 @@ void MainWindow::styleActionActivated(QAction *action)
|
||||
switch(m_settings->interfaceStyle())
|
||||
{
|
||||
case 1:
|
||||
actionStyleCleanlooks->setChecked(true);
|
||||
QApplication::setStyle(new QCleanlooksStyle());
|
||||
break;
|
||||
if(actionStyleCleanlooks->isEnabled())
|
||||
{
|
||||
actionStyleCleanlooks->setChecked(true);
|
||||
QApplication::setStyle(new QCleanlooksStyle());
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
actionStyleWindowsVista->setChecked(true);
|
||||
QApplication::setStyle(new QWindowsVistaStyle());
|
||||
break;
|
||||
if(actionStyleWindowsVista->isEnabled())
|
||||
{
|
||||
actionStyleWindowsVista->setChecked(true);
|
||||
QApplication::setStyle(new QWindowsVistaStyle());
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
actionStyleWindowsXP->setChecked(true);
|
||||
QApplication::setStyle(new QWindowsXPStyle());
|
||||
break;
|
||||
if(actionStyleWindowsXP->isEnabled())
|
||||
{
|
||||
actionStyleWindowsXP->setChecked(true);
|
||||
QApplication::setStyle(new QWindowsXPStyle());
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
actionStyleWindowsClassic->setChecked(true);
|
||||
QApplication::setStyle(new QWindowsStyle());
|
||||
break;
|
||||
if(actionStyleWindowsClassic->isEnabled())
|
||||
{
|
||||
actionStyleWindowsClassic->setChecked(true);
|
||||
QApplication::setStyle(new QWindowsStyle());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
actionStylePlastique->setChecked(true);
|
||||
QApplication::setStyle(new QPlastiqueStyle());
|
||||
@ -1615,7 +1627,7 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
if(QMessageBox::Yes == QMessageBox::question(this, tr("Disable Update Reminder"), tr("Do you really want to disable the update reminder?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No))
|
||||
if(0 == QMessageBox::question(this, tr("Disable Update Reminder"), tr("Do you really want to disable the update reminder?"), tr("Yes"), tr("No"), QString(), 1))
|
||||
{
|
||||
QMessageBox::information(this, tr("Update Reminder"), QString("%1<br>%2").arg(tr("The update reminder has been disabled."), tr("Please remember to check for updates at regular intervals!")));
|
||||
m_settings->autoUpdateEnabled(false);
|
||||
@ -1641,7 +1653,7 @@ void MainWindow::disableSoundsActionTriggered(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
if(QMessageBox::Yes == QMessageBox::question(this, tr("Disable Sound Effects"), tr("Do you really want to disable all sound effects?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No))
|
||||
if(0 == QMessageBox::question(this, tr("Disable Sound Effects"), tr("Do you really want to disable all sound effects?"), tr("Yes"), tr("No"), QString(), 1))
|
||||
{
|
||||
QMessageBox::information(this, tr("Sound Effects"), tr("All sound effects have been disabled."));
|
||||
m_settings->soundsEnabled(false);
|
||||
@ -1667,7 +1679,7 @@ void MainWindow::disableNeroAacNotificationsActionTriggered(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
if(QMessageBox::Yes == QMessageBox::question(this, tr("Nero AAC Notifications"), tr("Do you really want to disable all Nero AAC Encoder notifications?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No))
|
||||
if(0 == QMessageBox::question(this, tr("Nero AAC Notifications"), tr("Do you really want to disable all Nero AAC Encoder notifications?"), tr("Yes"), tr("No"), QString(), 1))
|
||||
{
|
||||
QMessageBox::information(this, tr("Nero AAC Notifications"), tr("All Nero AAC Encoder notifications have been disabled."));
|
||||
m_settings->neroAacNotificationsEnabled(false);
|
||||
@ -1693,7 +1705,7 @@ void MainWindow::disableWmaDecoderNotificationsActionTriggered(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
if(QMessageBox::Yes == QMessageBox::question(this, tr("WMA Decoder Notifications"), tr("Do you really want to disable all WMA Decoder notifications?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No))
|
||||
if(0 == QMessageBox::question(this, tr("WMA Decoder Notifications"), tr("Do you really want to disable all WMA Decoder notifications?"), tr("Yes"), tr("No"), QString(), 1))
|
||||
{
|
||||
QMessageBox::information(this, tr("WMA Decoder Notifications"), tr("All WMA Decoder notifications have been disabled."));
|
||||
m_settings->wmaDecoderNotificationsEnabled(false);
|
||||
|
@ -1081,6 +1081,29 @@ bool lamexp_remove_file(const QString &filename)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if visual themes are enabled (WinXP and later)
|
||||
*/
|
||||
bool lamexp_themes_enabled(void)
|
||||
{
|
||||
typedef int (WINAPI *IsAppThemedFun)(void);
|
||||
|
||||
bool isAppThemed = false;
|
||||
QLibrary uxTheme(QString("%1/UxTheme.dll").arg(lamexp_known_folder(lamexp_folder_systemfolder)));
|
||||
IsAppThemedFun IsAppThemedPtr = (IsAppThemedFun) uxTheme.resolve("IsAppThemed");
|
||||
|
||||
if(IsAppThemedPtr)
|
||||
{
|
||||
isAppThemed = IsAppThemedPtr();
|
||||
if(!isAppThemed)
|
||||
{
|
||||
qWarning("Theme support is disabled for this process!");
|
||||
}
|
||||
}
|
||||
|
||||
return isAppThemed;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get number of free bytes on disk
|
||||
*/
|
||||
|
@ -105,6 +105,7 @@ const QString lamexp_version2string(const QString &pattern, unsigned int version
|
||||
QString lamexp_known_folder(lamexp_known_folder_t folder_id);
|
||||
__int64 lamexp_free_diskspace(const QString &path);
|
||||
bool lamexp_remove_file(const QString &filename);
|
||||
bool lamexp_themes_enabled(void);
|
||||
|
||||
//Debug-only functions
|
||||
SIZE_T lamexp_dbg_private_bytes(void);
|
||||
|
@ -87,10 +87,10 @@ QVariant FileListModel::headerData(int section, Qt::Orientation orientation, int
|
||||
switch(section)
|
||||
{
|
||||
case 0:
|
||||
return QVariant("Title");
|
||||
return QVariant(tr("Title"));
|
||||
break;
|
||||
case 1:
|
||||
return QVariant("Full Path");
|
||||
return QVariant(tr("Full Path"));
|
||||
break;
|
||||
default:
|
||||
return QVariant();
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <QString>
|
||||
#include <QFileInfo>
|
||||
#include <QStringList>
|
||||
#include <QLocale>
|
||||
|
||||
//Constants
|
||||
static const char *g_settingsId_versionNumber = "VersionNumber";
|
||||
@ -122,7 +123,7 @@ void SettingsModel::validate(void)
|
||||
|
||||
if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive))
|
||||
{
|
||||
qWarning("Current language is unknown, reverting to default language!");
|
||||
qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
|
||||
this->currentLanguage(defaultLanguage());
|
||||
}
|
||||
}
|
||||
@ -139,8 +140,8 @@ QString SettingsModel::defaultLanguage(void)
|
||||
}
|
||||
|
||||
//Check if we can use the default translation
|
||||
WORD systemLangId = PRIMARYLANGID(GetUserDefaultLangID());
|
||||
if(systemLangId == LANG_ENGLISH)
|
||||
QLocale systemLanguage= QLocale::system();
|
||||
if(systemLanguage.language() == QLocale::English || systemLanguage.language() == QLocale::C)
|
||||
{
|
||||
m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
|
||||
return LAMEXP_DEFAULT_LANGID;
|
||||
@ -151,7 +152,7 @@ QString SettingsModel::defaultLanguage(void)
|
||||
while(!languages.isEmpty())
|
||||
{
|
||||
QString currentLangId = languages.takeFirst();
|
||||
if(lamexp_translation_sysid(currentLangId) == systemLangId)
|
||||
if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
|
||||
{
|
||||
m_defaultLanguage = new QString(currentLangId);
|
||||
return currentLangId;
|
||||
|
Loading…
Reference in New Issue
Block a user