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
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
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""
|
AdditionalDependencies=""$(ProjectDir)\res\localization\LameXP_DE.qm""
|
||||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||||
/>
|
/>
|
||||||
@ -1722,7 +1722,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
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=""
|
AdditionalDependencies=""
|
||||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||||
/>
|
/>
|
||||||
@ -1733,7 +1733,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
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""
|
AdditionalDependencies=""$(ProjectDir)\res\localization\LameXP_DE.qm""
|
||||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||||
/>
|
/>
|
||||||
|
@ -166,6 +166,17 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</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>
|
<context>
|
||||||
<name>LogViewDialog</name>
|
<name>LogViewDialog</name>
|
||||||
<message>
|
<message>
|
||||||
@ -707,6 +718,14 @@
|
|||||||
<source>Do you really want to disable the update reminder?</source>
|
<source>Do you really want to disable the update reminder?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Yes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>No</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>The update reminder has been disabled.</source>
|
<source>The update reminder has been disabled.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -166,6 +166,18 @@
|
|||||||
<translation>(Rechts-klicken um die DropBox zu schließen)</translation>
|
<translation>(Rechts-klicken um die DropBox zu schließen)</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</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>
|
<context>
|
||||||
<name>LogViewDialog</name>
|
<name>LogViewDialog</name>
|
||||||
<message>
|
<message>
|
||||||
@ -811,6 +823,14 @@
|
|||||||
<source>Already Running</source>
|
<source>Already Running</source>
|
||||||
<translation>Wird Bereits Ausgeführt</translation>
|
<translation>Wird Bereits Ausgeführt</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Yes</source>
|
||||||
|
<translation>Ja</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>No</source>
|
||||||
|
<translation>Nein</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<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_MAJOR 4
|
||||||
#define VER_LAMEXP_MINOR_HI 0
|
#define VER_LAMEXP_MINOR_HI 0
|
||||||
#define VER_LAMEXP_MINOR_LO 0
|
#define VER_LAMEXP_MINOR_LO 0
|
||||||
#define VER_LAMEXP_BUILD 210
|
#define VER_LAMEXP_BUILD 212
|
||||||
#define VER_LAMEXP_SUFFIX TechPreview
|
#define VER_LAMEXP_SUFFIX TechPreview
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -242,8 +242,8 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
|||||||
actionStyleWindowsXP->setUserData(0, new Index(3));
|
actionStyleWindowsXP->setUserData(0, new Index(3));
|
||||||
actionStyleWindowsClassic->setUserData(0, new Index(4));
|
actionStyleWindowsClassic->setUserData(0, new Index(4));
|
||||||
actionStylePlastique->setChecked(true);
|
actionStylePlastique->setChecked(true);
|
||||||
actionStyleWindowsXP->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_XP);
|
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);
|
actionStyleWindowsVista->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA && lamexp_themes_enabled());
|
||||||
connect(m_styleActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(styleActionActivated(QAction*)));
|
connect(m_styleActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(styleActionActivated(QAction*)));
|
||||||
styleActionActivated(NULL);
|
styleActionActivated(NULL);
|
||||||
|
|
||||||
@ -947,21 +947,33 @@ void MainWindow::styleActionActivated(QAction *action)
|
|||||||
switch(m_settings->interfaceStyle())
|
switch(m_settings->interfaceStyle())
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
if(actionStyleCleanlooks->isEnabled())
|
||||||
|
{
|
||||||
actionStyleCleanlooks->setChecked(true);
|
actionStyleCleanlooks->setChecked(true);
|
||||||
QApplication::setStyle(new QCleanlooksStyle());
|
QApplication::setStyle(new QCleanlooksStyle());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 2:
|
case 2:
|
||||||
|
if(actionStyleWindowsVista->isEnabled())
|
||||||
|
{
|
||||||
actionStyleWindowsVista->setChecked(true);
|
actionStyleWindowsVista->setChecked(true);
|
||||||
QApplication::setStyle(new QWindowsVistaStyle());
|
QApplication::setStyle(new QWindowsVistaStyle());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 3:
|
case 3:
|
||||||
|
if(actionStyleWindowsXP->isEnabled())
|
||||||
|
{
|
||||||
actionStyleWindowsXP->setChecked(true);
|
actionStyleWindowsXP->setChecked(true);
|
||||||
QApplication::setStyle(new QWindowsXPStyle());
|
QApplication::setStyle(new QWindowsXPStyle());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 4:
|
case 4:
|
||||||
|
if(actionStyleWindowsClassic->isEnabled())
|
||||||
|
{
|
||||||
actionStyleWindowsClassic->setChecked(true);
|
actionStyleWindowsClassic->setChecked(true);
|
||||||
QApplication::setStyle(new QWindowsStyle());
|
QApplication::setStyle(new QWindowsStyle());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
actionStylePlastique->setChecked(true);
|
actionStylePlastique->setChecked(true);
|
||||||
QApplication::setStyle(new QPlastiqueStyle());
|
QApplication::setStyle(new QPlastiqueStyle());
|
||||||
@ -1615,7 +1627,7 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked)
|
|||||||
{
|
{
|
||||||
if(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!")));
|
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);
|
m_settings->autoUpdateEnabled(false);
|
||||||
@ -1641,7 +1653,7 @@ void MainWindow::disableSoundsActionTriggered(bool checked)
|
|||||||
{
|
{
|
||||||
if(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."));
|
QMessageBox::information(this, tr("Sound Effects"), tr("All sound effects have been disabled."));
|
||||||
m_settings->soundsEnabled(false);
|
m_settings->soundsEnabled(false);
|
||||||
@ -1667,7 +1679,7 @@ void MainWindow::disableNeroAacNotificationsActionTriggered(bool checked)
|
|||||||
{
|
{
|
||||||
if(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."));
|
QMessageBox::information(this, tr("Nero AAC Notifications"), tr("All Nero AAC Encoder notifications have been disabled."));
|
||||||
m_settings->neroAacNotificationsEnabled(false);
|
m_settings->neroAacNotificationsEnabled(false);
|
||||||
@ -1693,7 +1705,7 @@ void MainWindow::disableWmaDecoderNotificationsActionTriggered(bool checked)
|
|||||||
{
|
{
|
||||||
if(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."));
|
QMessageBox::information(this, tr("WMA Decoder Notifications"), tr("All WMA Decoder notifications have been disabled."));
|
||||||
m_settings->wmaDecoderNotificationsEnabled(false);
|
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
|
* 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);
|
QString lamexp_known_folder(lamexp_known_folder_t folder_id);
|
||||||
__int64 lamexp_free_diskspace(const QString &path);
|
__int64 lamexp_free_diskspace(const QString &path);
|
||||||
bool lamexp_remove_file(const QString &filename);
|
bool lamexp_remove_file(const QString &filename);
|
||||||
|
bool lamexp_themes_enabled(void);
|
||||||
|
|
||||||
//Debug-only functions
|
//Debug-only functions
|
||||||
SIZE_T lamexp_dbg_private_bytes(void);
|
SIZE_T lamexp_dbg_private_bytes(void);
|
||||||
|
@ -87,10 +87,10 @@ QVariant FileListModel::headerData(int section, Qt::Orientation orientation, int
|
|||||||
switch(section)
|
switch(section)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return QVariant("Title");
|
return QVariant(tr("Title"));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return QVariant("Full Path");
|
return QVariant(tr("Full Path"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QLocale>
|
||||||
|
|
||||||
//Constants
|
//Constants
|
||||||
static const char *g_settingsId_versionNumber = "VersionNumber";
|
static const char *g_settingsId_versionNumber = "VersionNumber";
|
||||||
@ -122,7 +123,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 is unknown, reverting to default language!");
|
qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
|
||||||
this->currentLanguage(defaultLanguage());
|
this->currentLanguage(defaultLanguage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,8 +140,8 @@ QString SettingsModel::defaultLanguage(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check if we can use the default translation
|
//Check if we can use the default translation
|
||||||
WORD systemLangId = PRIMARYLANGID(GetUserDefaultLangID());
|
QLocale systemLanguage= QLocale::system();
|
||||||
if(systemLangId == LANG_ENGLISH)
|
if(systemLanguage.language() == QLocale::English || systemLanguage.language() == QLocale::C)
|
||||||
{
|
{
|
||||||
m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
|
m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
|
||||||
return LAMEXP_DEFAULT_LANGID;
|
return LAMEXP_DEFAULT_LANGID;
|
||||||
@ -151,7 +152,7 @@ QString SettingsModel::defaultLanguage(void)
|
|||||||
while(!languages.isEmpty())
|
while(!languages.isEmpty())
|
||||||
{
|
{
|
||||||
QString currentLangId = languages.takeFirst();
|
QString currentLangId = languages.takeFirst();
|
||||||
if(lamexp_translation_sysid(currentLangId) == systemLangId)
|
if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
|
||||||
{
|
{
|
||||||
m_defaultLanguage = new QString(currentLangId);
|
m_defaultLanguage = new QString(currentLangId);
|
||||||
return currentLangId;
|
return currentLangId;
|
||||||
|
Loading…
Reference in New Issue
Block a user