diff --git a/etc/NSIS/setup.nsi b/etc/NSIS/setup.nsi
index 52765a9b..a132425e 100644
--- a/etc/NSIS/setup.nsi
+++ b/etc/NSIS/setup.nsi
@@ -434,6 +434,13 @@ SectionEnd
Function CheckForUpdate
!insertmacro GetCommandlineParameter "Update" "error" $R0
StrCmp $R0 "error" 0 EnableUpdateMode
+
+ StrCmp "$INSTDIR" "" 0 +2
+ Return
+
+ IfFileExists "$INSTDIR\*.*" +2
+ Return
+
IfFileExists "$INSTDIR\LameXP.exe" EnableUpdateMode
Return
diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts
index 7041a6b6..81ed165e 100644
--- a/etc/Translation/Blank.ts
+++ b/etc/Translation/Blank.ts
@@ -871,6 +871,14 @@
MetaInfoModel
+
+
+
+
+
+
+
+
@@ -935,6 +943,14 @@
+
+
+
+
+
+
+
+
@@ -1129,6 +1145,10 @@
+
+
+
+
diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts
index 4875fed8..1baa5715 100644
--- a/etc/Translation/LameXP_DE.ts
+++ b/etc/Translation/LameXP_DE.ts
@@ -1012,6 +1012,22 @@
Keine Angabe
+
+
+ OK
+
+
+
+ Abbrechen
+
+
+
+ Keine Angabe
+
+
+
+ Unbekannt
+
ProcessThread
@@ -1170,6 +1186,10 @@
Die Wiedergabeliste konnte nicht erstellt werden:
+
+
+ Der Vorgang wurde vom Benutzer abgebrochen!
+
ProgressModel
diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts
index dc8301c9..7bee31ec 100644
--- a/etc/Translation/LameXP_FR.ts
+++ b/etc/Translation/LameXP_FR.ts
@@ -1016,6 +1016,22 @@ Votre dossier TEMP est situé ici:
Désolé, cette propriété du fichier source ne peut pas être modifiée!
+
+
+
+
+
+
+ Annuler
+
+
+
+
+
+
+
+ Inconnu
+
ProcessThread
@@ -1174,6 +1190,10 @@ Votre dossier TEMP est situé ici:
La liste de lecture n'a pas pu être créée:
+
+
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts
index 77d60c0a..7df507f7 100644
--- a/etc/Translation/LameXP_IT.ts
+++ b/etc/Translation/LameXP_IT.ts
@@ -1012,6 +1012,22 @@
Non specificato
+
+
+
+
+
+
+ Cancella
+
+
+
+
+
+
+
+ Sconosciuto
+
ProcessThread
@@ -1170,6 +1186,10 @@
+
+
+
+
ProgressModel
diff --git a/etc/Translation/update.bat b/etc/Translation/update.bat
index 9f331c99..39765d67 100644
--- a/etc/Translation/update.bat
+++ b/etc/Translation/update.bat
@@ -23,6 +23,8 @@ for %%f in (..\..\src\*.h) do (
)
REM ---------------------------
for %%f in (*.ts) do (
+ del %%f.bak 2> NUL
+ copy %%f %%f.bak
lupdate.exe @update.lst -no-obsolete -ts %%f
)
REM ---------------------------
diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm
index d0a69475..bbb61c78 100644
Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ
diff --git a/res/localization/LameXP_FR.qm b/res/localization/LameXP_FR.qm
index 8fd20b83..7a0eb9fa 100644
Binary files a/res/localization/LameXP_FR.qm and b/res/localization/LameXP_FR.qm differ
diff --git a/res/localization/LameXP_IT.qm b/res/localization/LameXP_IT.qm
index bf335d56..1b9c8001 100644
Binary files a/res/localization/LameXP_IT.qm and b/res/localization/LameXP_IT.qm differ
diff --git a/src/Config.h b/src/Config.h
index 75998e3a..c0fdcf57 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -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 228
+#define VER_LAMEXP_BUILD 231
#define VER_LAMEXP_SUFFIX TechPreview
/*
diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp
index cb6542ae..40954ec3 100644
--- a/src/Dialog_Processing.cpp
+++ b/src/Dialog_Processing.cpp
@@ -321,7 +321,7 @@ void ProcessingDialog::doneEncoding(void)
CHANGE_BACKGROUND_COLOR(frame_header, QColor("#FFF3BA"));
WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarErrorState);
WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/error.png"));
- SET_PROGRESS_TEXT((m_succeededJobs.count() > 0) ? tr("Process was aborted by the user after %1 file(s)!").arg(QString::number(m_succeededJobs.count())) : "Process was aborted prematurely by the user!");
+ SET_PROGRESS_TEXT((m_succeededJobs.count() > 0) ? tr("Process was aborted by the user after %1 file(s)!").arg(QString::number(m_succeededJobs.count())) : tr("Process was aborted prematurely by the user!"));
m_systemTray->showMessage(tr("LameXP - Aborted"), tr("Process was aborted by the user."), QSystemTrayIcon::Warning);
m_systemTray->setIcon(QIcon(":/icons/cd_delete.png"));
QApplication::processEvents();
diff --git a/src/Model_MetaInfo.cpp b/src/Model_MetaInfo.cpp
index 1b87f875..fe985e9d 100644
--- a/src/Model_MetaInfo.cpp
+++ b/src/Model_MetaInfo.cpp
@@ -28,8 +28,8 @@
#define MODEL_ROW_COUNT 12
-#define CHECK1(STR) (STR.isEmpty() ? (m_offset ? "(Not Specified)" : "(Unknown)") : STR)
-#define CHECK2(VAL) ((VAL > 0) ? QString::number(VAL) : (m_offset ? "(Not Specified)" : "(Unknown)"))
+#define CHECK1(STR) (STR.isEmpty() ? (m_offset ? m_textNotSpecified : m_textUnknown) : STR)
+#define CHECK2(VAL) ((VAL > 0) ? QString::number(VAL) : (m_offset ? m_textNotSpecified : m_textUnknown))
#define CHECK3(STR) (STR.isEmpty() ? Qt::darkGray : QVariant())
#define CHECK4(VAL) ((VAL == 0) ? Qt::darkGray : QVariant())
@@ -46,6 +46,9 @@ MetaInfoModel::MetaInfoModel(AudioFileModel *file, unsigned int offset)
throw "Offset is out of range!";
}
+ m_textUnknown = QString("(%1)").arg(tr("Unknown"));
+ m_textNotSpecified = QString("(%1)").arg(tr("Not Specified"));
+
m_audioFile = file;
m_offset = offset;
}
@@ -247,13 +250,21 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
int val = -1;
QStringList generes(QString("(%1)").arg(tr("Unspecified")));
QString temp;
-
+
+ QInputDialog input(parent);
+ input.setOkButtonText(tr("OK"));
+ input.setCancelButtonText(tr("Cancel"));
+ input.setTextEchoMode(QLineEdit::Normal);
+
switch(index.row() + m_offset)
{
case 5:
- temp = QInputDialog::getText(parent, tr("Edit Title"), EXPAND(tr("Please enter the title for this file:")), QLineEdit::Normal, m_audioFile->fileName(), &ok).simplified();
- if(ok)
+ input.setWindowTitle(tr("Edit Title"));
+ input.setLabelText(EXPAND(tr("Please enter the title for this file:")));
+ input.setTextValue(m_audioFile->fileName());
+ if(input.exec() != 0)
{
+ temp = input.textValue().simplified();
if(temp.isEmpty())
{
QMessageBox::warning(parent, tr("Edit Title"), tr("The title must not be empty. Generating title from file name!"));
@@ -267,37 +278,52 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
}
break;
case 6:
- temp = QInputDialog::getText(parent, tr("Edit Artist"), EXPAND(tr("Please enter the artist for this file:")), QLineEdit::Normal, m_audioFile->fileArtist(), &ok).simplified();
- if(ok)
+ input.setWindowTitle(tr("Edit Artist"));
+ input.setLabelText(EXPAND(tr("Please enter the artist for this file:")));
+ input.setTextValue(m_audioFile->fileArtist());
+ if(input.exec() != 0)
{
+ temp = input.textValue().simplified();
beginResetModel();
m_audioFile->setFileArtist(temp.isEmpty() ? QString() : temp);
endResetModel();
}
break;
case 7:
- temp = QInputDialog::getText(parent, tr("Edit Album"), EXPAND(tr("Please enter the album for this file:")), QLineEdit::Normal, m_audioFile->fileAlbum(), &ok).simplified();
- if(ok)
+ input.setWindowTitle(tr("Edit Album"));
+ input.setLabelText(EXPAND(tr("Please enter the album for this file:")));
+ input.setTextValue(m_audioFile->fileAlbum());
+ if(input.exec() != 0)
{
+ temp = input.textValue().simplified();
beginResetModel();
m_audioFile->setFileAlbum(temp.isEmpty() ? QString() : temp);
endResetModel();
}
break;
case 8:
+ input.setWindowTitle(tr("Edit Genre"));
+ input.setLabelText(EXPAND(tr("Please enter the genre for this file:")));
for(int i = 0; g_lamexp_generes[i]; i++) generes << g_lamexp_generes[i];
- temp = QInputDialog::getItem(parent, tr("Edit Genre"), EXPAND(tr("Please enter the genre for this file:")), generes, (m_audioFile->fileGenre().isEmpty() ? 1 : generes.indexOf(m_audioFile->fileGenre())), false, &ok);
- if(ok)
+ input.setComboBoxItems(generes);
+ input.setTextValue(m_audioFile->fileGenre());
+ if(input.exec() != 0)
{
+ temp = input.textValue().simplified();
beginResetModel();
m_audioFile->setFileGenre((temp.isEmpty() || !temp.compare(generes.at(0), Qt::CaseInsensitive)) ? QString() : temp);
endResetModel();
}
break;
case 9:
- val = QInputDialog::getInt(parent, tr("Edit Year"), EXPAND(tr("Please enter the year for this file:")), (m_audioFile->fileYear() ? m_audioFile->fileYear() : 1900), 0, 2100, 1, &ok);
- if(ok)
+ input.setWindowTitle(tr("Edit Year"));
+ input.setLabelText(EXPAND(tr("Please enter the year for this file:")));
+ input.setIntRange(0, 2100);
+ input.setIntValue((m_audioFile->fileYear() ? m_audioFile->fileYear() : 1900));
+ input.setIntStep(1);
+ if(input.exec() != 0)
{
+ val = input.intValue();
beginResetModel();
m_audioFile->setFileYear(val);
endResetModel();
@@ -306,9 +332,14 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
case 10:
if(!m_offset)
{
- val = QInputDialog::getInt(parent, tr("Edit Position"), EXPAND(tr("Please enter the position (track no.) for this file:")), (m_audioFile->filePosition() ? m_audioFile->filePosition() : 1), 0, 99, 1, &ok);
- if(ok)
+ input.setWindowTitle(tr("Edit Position"));
+ input.setLabelText(EXPAND(tr("Please enter the position (track no.) for this file:")));
+ input.setIntRange(0, 99);
+ input.setIntValue((m_audioFile->filePosition() ? m_audioFile->filePosition() : 1));
+ input.setIntStep(1);
+ if(input.exec() != 0)
{
+ val = input.intValue();
beginResetModel();
m_audioFile->setFilePosition(val);
endResetModel();
@@ -318,9 +349,13 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
{
QStringList options;
options << tr("Unspecified (copy from source file)") << tr("Generate from list position");
- temp = QInputDialog::getItem(parent, tr("Edit Position"), EXPAND(tr("Please enter the position (track no.) for this file:")), options, ((m_audioFile->filePosition() == UINT_MAX) ? 1 : 0), false, &ok);
- if(ok)
+ input.setWindowTitle(tr("Edit Position"));
+ input.setLabelText(EXPAND(tr("Please enter the position (track no.) for this file:")));
+ input.setComboBoxItems(options);
+ input.setTextValue(options.value((m_audioFile->filePosition() == UINT_MAX) ? 1 : 0));
+ if(input.exec() != 0)
{
+ temp = input.textValue().simplified();
beginResetModel();
m_audioFile->setFilePosition((options.indexOf(temp) == 1) ? UINT_MAX : 0);
endResetModel();
@@ -328,9 +363,12 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent)
}
break;
case 11:
- temp = QInputDialog::getText(parent, tr("Edit Comment"), EXPAND(tr("Please enter the comment for this file:")), QLineEdit::Normal, (m_audioFile->fileComment().isEmpty() ? tr("Encoded with LameXP") : m_audioFile->fileComment()), &ok).simplified();
- if(ok)
+ input.setWindowTitle(tr("Edit Comment"));
+ input.setLabelText(EXPAND(tr("Please enter the comment for this file:")));
+ input.setTextValue((m_audioFile->fileComment().isEmpty() ? tr("Encoded with LameXP") : m_audioFile->fileComment()));
+ if(input.exec() != 0)
{
+ temp = input.textValue().simplified();
beginResetModel();
m_audioFile->setFileComment(temp.isEmpty() ? QString() : temp);
endResetModel();
@@ -346,6 +384,9 @@ void MetaInfoModel::clearData(void)
{
beginResetModel();
+ m_textUnknown = QString("(%1)").arg(tr("Unknown"));
+ m_textNotSpecified = QString("(%1)").arg(tr("Not Specified"));
+
m_audioFile->setFilePath(QString());
m_audioFile->setFileName(QString());
m_audioFile->setFileArtist(QString());
diff --git a/src/Model_MetaInfo.h b/src/Model_MetaInfo.h
index 77b6f79a..ff030228 100644
--- a/src/Model_MetaInfo.h
+++ b/src/Model_MetaInfo.h
@@ -46,4 +46,6 @@ public:
private:
AudioFileModel* m_audioFile;
unsigned int m_offset;
+ QString m_textNotSpecified;
+ QString m_textUnknown;
};