From c80714b829dfed06d5005fcc874a740ad6d69c3f Mon Sep 17 00:00:00 2001 From: lordmulder Date: Wed, 10 Nov 2010 19:44:51 +0100 Subject: [PATCH] Use the MediaInfo model in MainWindow too --- LameXP.vcproj | 8 +- gui/MainWindow.ui | 653 +++++++++++--------------------------- res/Icons.qrc | 11 +- src/Config.h | 43 +++ src/Dialog_MainWindow.cpp | 69 +++- src/Dialog_MainWindow.h | 8 +- src/Model_MetaInfo.cpp | 77 ++++- src/Model_MetaInfo.h | 4 +- src/Resource.h | 23 +- 9 files changed, 364 insertions(+), 532 deletions(-) create mode 100644 src/Config.h diff --git a/LameXP.vcproj b/LameXP.vcproj index 8ad22241..e3c14ce1 100644 --- a/LameXP.vcproj +++ b/LameXP.vcproj @@ -93,7 +93,7 @@ @@ -261,6 +261,10 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + + diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index a0ec2bb7..1bfba613 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -7,7 +7,7 @@ 0 0 676 - 557 + 550 @@ -198,19 +198,19 @@ - + - 90 + 105 0 - Edit Meta + Show Details - :/icons/table_edit.png:/icons/table_edit.png + :/icons/zoom.png:/icons/zoom.png @@ -380,7 +380,7 @@ - + @@ -392,448 +392,95 @@ Meta Information + + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + false + + + true + + + false + + + + + + + + 90 + 16777215 + + + + Edit + + + + :/icons/table_edit.png:/icons/table_edit.png + + + + + + + Note: Meta information you enter here will <u>supersede</u> data from the source! + + + true + + + - - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 120 - 120 - 120 - - - - - - - - (Copy from Source File) - - - true - - - - - - - Artist: - - - - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 120 - 120 - 120 - - - - - - - - (Copy from Source File) - - - true - - - - - - - Album: - - - - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 120 - 120 - 120 - - - - - - - - (Copy from Source File) - - - true - - - - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 120 - 120 - 120 - - - - - - - - (Copy from Source File) - - - true - - - - - - - Genre: - - - - - - - Year: - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 4 - 2 - - - - - - - - - 32 - 16777215 - - - - ... - - - - - - - - 32 - 16777215 - - - - ... - - - - - - - - 32 - 16777215 - - - - ... - - - - - - - - 32 - 16777215 - - - - ... - - - - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 120 - 120 - 120 - - - - - - - - (Copy from Source File) - - - true - - - - - - - Comment: - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 4 - 2 - - - - - - - - - 32 - 16777215 - - - - ... - - - - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 85 - 85 - 127 - - - - - - - - - 120 - 120 - 120 - - - - - - - - (Copy from Source File) - - - true - - - - - - - - 32 - 16777215 - - - - ... - - - - - - - Position: - - - - + + + + 0 + 0 + + + + + + + :/icons/feed.png + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 90 + 16777215 + + + + Reset + + + + :/icons/bomb.png:/icons/bomb.png + + - + @@ -847,7 +494,7 @@ - + @@ -879,22 +526,6 @@ - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 4 - 2 - - - - @@ -902,19 +533,6 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -1431,6 +1049,9 @@ + + + @@ -1500,7 +1121,7 @@ sourceFileView doubleClicked(QModelIndex) - buttonEditMeta + buttonShowDetails click() @@ -1628,7 +1249,7 @@ writeMetaDataCheckBox clicked(bool) - metaDataGroupBox + metaDataView setEnabled(bool) @@ -1637,7 +1258,87 @@ 336 - 160 + 252 + + + + + writeMetaDataCheckBox + clicked(bool) + buttonEditMeta + setEnabled(bool) + + + 183 + 465 + + + 596 + 404 + + + + + writeMetaDataCheckBox + clicked(bool) + labelEditMetaHint + setEnabled(bool) + + + 183 + 465 + + + 299 + 404 + + + + + writeMetaDataCheckBox + clicked(bool) + labelEditMetaIcon + setEnabled(bool) + + + 183 + 465 + + + 39 + 404 + + + + + metaDataView + doubleClicked(QModelIndex) + buttonEditMeta + click() + + + 336 + 237 + + + 596 + 404 + + + + + writeMetaDataCheckBox + clicked(bool) + buttonClearMeta + setEnabled(bool) + + + 183 + 465 + + + 500 + 404 diff --git a/res/Icons.qrc b/res/Icons.qrc index e42b0045..55439acf 100644 --- a/res/Icons.qrc +++ b/res/Icons.qrc @@ -4,10 +4,10 @@ MainIcon.ico MainIcon.png icons/add.png - icons/application_view_list.png - icons/arrow_down.png - icons/arrow_up.png - icons/bin.png + icons/application_view_list.png + icons/arrow_down.png + icons/arrow_up.png + icons/bin.png icons/bomb.png icons/calendar.png icons/cancel.png @@ -25,7 +25,7 @@ icons/date.png icons/delete.png icons/door_out.png - icons/drive_cd.png + icons/drive_cd.png icons/feed.png icons/folder_add.png icons/folder_go.png @@ -46,5 +46,6 @@ icons/transmit_blue.png icons/user.png icons/world.png + icons/zoom.png diff --git a/src/Config.h b/src/Config.h new file mode 100644 index 00000000..080733ac --- /dev/null +++ b/src/Config.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2010 LoRd_MuldeR +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +/* + * LameXP Version Info + */ +#define VER_LAMEXP_MAJOR 4 +#define VER_LAMEXP_MINOR_HI 0 +#define VER_LAMEXP_MINOR_LO 0 +#define VER_LAMEXP_BUILD 10 +#define VER_LAMEXP_SUFFIX TechPreview + +/* + * Helper macros (aka: having fun with the C pre-processor) + */ +#define VER_LAMEXP_STR_HLP1(X) #X +#define VER_LAMEXP_STR_HLP2(V,W,X,Y,Z) VER_LAMEXP_STR_HLP1(v##V.W##X Z [Build Y]) +#define VER_LAMEXP_STR_HLP3(V,W,X,Y,Z) VER_LAMEXP_STR_HLP2(V,W,X,Y,Z) +#define VER_LAMEXP_STR VER_LAMEXP_STR_HLP3(VER_LAMEXP_MAJOR,VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO,VER_LAMEXP_BUILD,VER_LAMEXP_SUFFIX) +#define VER_LAMEXP_SUFFIX_STR_HLP1(X) #X +#define VER_LAMEXP_SUFFIX_STR_HLP2(X) VER_LAMEXP_SUFFIX_STR_HLP1(X) +#define VER_LAMEXP_SUFFIX_STR VER_LAMEXP_SUFFIX_STR_HLP2(VER_LAMEXP_SUFFIX) +#define VER_LAMEXP_MINOR_HLP1(X,Y) X##Y +#define VER_LAMEXP_MINOR_HLP2(X,Y) VER_LAMEXP_MINOR_HLP1(X,Y) +#define VER_LAMEXP_MINOR VER_LAMEXP_MINOR_HLP2(VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO) diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 1fddbd5c..c6600e91 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -28,6 +28,7 @@ #include "Dialog_MetaInfo.h" #include "Thread_FileAnalyzer.h" #include "Thread_MessageHandler.h" +#include "Model_MetaInfo.h" //Qt includes #include @@ -47,7 +48,14 @@ //Win32 includes #include +//Helper macros #define LINK(URL) QString("%2").arg(URL).arg(URL) +#define ABORT_IF_BUSY \ +if(m_banner->isVisible() || m_delayedFileTimer->isActive()) \ +{ \ + MessageBeep(MB_ICONEXCLAMATION); \ + return; \ +} \ //////////////////////////////////////////////////////////// // Constructor @@ -86,7 +94,7 @@ MainWindow::MainWindow(QWidget *parent) connect(buttonClearFiles, SIGNAL(clicked()), this, SLOT(clearFilesButtonClicked())); connect(buttonFileUp, SIGNAL(clicked()), this, SLOT(fileUpButtonClicked())); connect(buttonFileDown, SIGNAL(clicked()), this, SLOT(fileDownButtonClicked())); - connect(buttonEditMeta, SIGNAL(clicked()), this, SLOT(editMetaButtonClicked())); + connect(buttonShowDetails, SIGNAL(clicked()), this, SLOT(showDetailsButtonClicked())); //Setup "Output" tab m_fileSystemModel = new QFileSystemModel(); @@ -107,6 +115,17 @@ MainWindow::MainWindow(QWidget *parent) connect(buttonGotoDesktop, SIGNAL(clicked()), this, SLOT(gotoDesktopButtonClicked())); connect(buttonGotoMusic, SIGNAL(clicked()), this, SLOT(gotoMusicFolderButtonClicked())); + //Setup "Meta Data" tab + m_metaData = new AudioFileModel(); + m_metaInfoModel = new MetaInfoModel(m_metaData, 6); + m_metaInfoModel->clearData(); + metaDataView->setModel(m_metaInfoModel); + metaDataView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); + metaDataView->verticalHeader()->hide(); + metaDataView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); + connect(buttonEditMeta, SIGNAL(clicked()), this, SLOT(editMetaButtonClicked())); + connect(buttonClearMeta, SIGNAL(clicked()), this, SLOT(clearMetaButtonClicked())); + //Activate file menu actions connect(actionOpenFolder, SIGNAL(triggered()), this, SLOT(openFolderActionActivated())); @@ -171,6 +190,10 @@ MainWindow::~MainWindow(void) } } + //Unset models + sourceFileView->setModel(NULL); + metaDataView->setModel(NULL); + //Free memory LAMEXP_DELETE(m_tabActionGroup); LAMEXP_DELETE(m_styleActionGroup); @@ -180,6 +203,8 @@ MainWindow::~MainWindow(void) LAMEXP_DELETE(m_messageHandler); LAMEXP_DELETE(m_delayedFileList); LAMEXP_DELETE(m_delayedFileTimer); + LAMEXP_DELETE(m_metaData); + LAMEXP_DELETE(m_metaInfoModel); } //////////////////////////////////////////////////////////// @@ -236,8 +261,9 @@ void MainWindow::windowShown(void) */ void MainWindow::aboutButtonClicked(void) { - QString aboutText; + ABORT_IF_BUSY; + QString aboutText; aboutText += "

LameXP - Audio Encoder Front-end

"; aboutText += QString("Copyright (C) 2004-%1 LoRd_MuldeR <MuldeR2@GMX.de>. Some rights reserved.
").arg(max(lamexp_version_date().year(),QDate::currentDate().year())); aboutText += QString().sprintf("Version %d.%02d %s, Build %d [%s]

", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build(), lamexp_version_date().toString(Qt::ISODate).toLatin1().constData()); @@ -330,13 +356,7 @@ void MainWindow::aboutButtonClicked(void) */ void MainWindow::encodeButtonClicked(void) { - if(m_delayedFileTimer->isActive()) - { - - MessageBeep(MB_ICONERROR); - return; - } - + ABORT_IF_BUSY; QMessageBox::warning(this, "LameXP", "Not implemented yet, please try again with a later version!"); } @@ -345,6 +365,8 @@ void MainWindow::encodeButtonClicked(void) */ void MainWindow::addFilesButtonClicked(void) { + ABORT_IF_BUSY; + tabWidget->setCurrentIndex(0); QStringList selectedFiles = QFileDialog::getOpenFileNames(this, "Add file(s)", QString(), "All supported files (*.*)"); @@ -369,6 +391,8 @@ void MainWindow::addFilesButtonClicked(void) */ void MainWindow::openFolderActionActivated(void) { + ABORT_IF_BUSY; + tabWidget->setCurrentIndex(0); QString selectedFolder = QFileDialog::getExistingDirectory(this, "Add folder", QDesktopServices::storageLocation(QDesktopServices::MusicLocation)); @@ -443,10 +467,12 @@ void MainWindow::fileDownButtonClicked(void) } /* - * Edit meta button + * Show details button */ -void MainWindow::editMetaButtonClicked(void) +void MainWindow::showDetailsButtonClicked(void) { + ABORT_IF_BUSY; + int iResult = 0; MetaInfoDialog *metaInfoDialog = new MetaInfoDialog(this); QModelIndex index = sourceFileView->currentIndex(); @@ -574,6 +600,8 @@ void MainWindow::gotoMusicFolderButtonClicked(void) */ void MainWindow::makeFolderButtonClicked(void) { + ABORT_IF_BUSY; + QDir basePath(m_fileSystemModel->filePath(outputFolderView->currentIndex())); bool bApplied = true; @@ -614,6 +642,23 @@ void MainWindow::makeFolderButtonClicked(void) } } +/* + * Edit meta button clicked + */ +void MainWindow::editMetaButtonClicked(void) +{ + ABORT_IF_BUSY; + m_metaInfoModel->editItem(metaDataView->currentIndex(), this); +} + +/* + * Reset meta button clicked + */ +void MainWindow::clearMetaButtonClicked(void) +{ + ABORT_IF_BUSY; + m_metaInfoModel->clearData(); +} /* * Visit homepage action @@ -628,6 +673,8 @@ void MainWindow::visitHomepageActionActivated(void) */ void MainWindow::checkUpdatesActionActivated(void) { + ABORT_IF_BUSY; + m_banner->show("Checking for updates, please be patient..."); for(int i = 0; i < 300; i++) diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h index af05c946..f73d0c04 100644 --- a/src/Dialog_MainWindow.h +++ b/src/Dialog_MainWindow.h @@ -29,6 +29,8 @@ class QFileSystemModel; class WorkingBanner; class MessageHandlerThread; +class AudioFileModel; +class MetaInfoModel; class MainWindow: public QMainWindow, private Ui::MainWindow { @@ -47,7 +49,7 @@ private slots: void removeFileButtonClicked(void); void fileDownButtonClicked(void); void fileUpButtonClicked(void); - void editMetaButtonClicked(void); + void showDetailsButtonClicked(void); void tabPageChanged(int idx); void tabActionActivated(QAction *action); void styleActionActivated(QAction *action); @@ -62,6 +64,8 @@ private slots: void notifyOtherInstance(void); void addFileDelayed(const QString &filePath); void handleDelayedFiles(void); + void editMetaButtonClicked(void); + void clearMetaButtonClicked(void); protected: void showEvent(QShowEvent *event); @@ -75,4 +79,6 @@ private: MessageHandlerThread *m_messageHandler; QStringList *m_delayedFileList; QTimer *m_delayedFileTimer; + AudioFileModel *m_metaData; + MetaInfoModel *m_metaInfoModel; }; diff --git a/src/Model_MetaInfo.cpp b/src/Model_MetaInfo.cpp index 0bab3be7..e697e4d0 100644 --- a/src/Model_MetaInfo.cpp +++ b/src/Model_MetaInfo.cpp @@ -25,8 +25,10 @@ #include #include -#define CHECK1(STR) (STR.isEmpty() ? "(Unknown)" : STR) -#define CHECK2(VAL) ((VAL > 0) ? QString::number(VAL) : "(Unknown)") +#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 CHECK3(STR) (STR.isEmpty() ? Qt::darkGray : QVariant()) #define CHECK4(VAL) ((VAL == 0) ? Qt::darkGray : QVariant()) @@ -34,9 +36,15 @@ // Constructor & Destructor //////////////////////////////////////////////////////////// -MetaInfoModel::MetaInfoModel(AudioFileModel *file) +MetaInfoModel::MetaInfoModel(AudioFileModel *file, unsigned int offset) { + if(offset >= MODEL_ROW_COUNT) + { + throw "Offset is out of range!"; + } + m_audioFile = file; + m_offset = offset; } MetaInfoModel::~MetaInfoModel(void) @@ -54,14 +62,14 @@ int MetaInfoModel::columnCount(const QModelIndex &parent) const int MetaInfoModel::rowCount(const QModelIndex &parent) const { - return 12; + return MODEL_ROW_COUNT - m_offset; } QVariant MetaInfoModel::data(const QModelIndex &index, int role) const { if(role == Qt::DisplayRole) { - switch(index.row()) + switch(index.row() + m_offset) { case 0: return (!index.column()) ? "Full Path" : CHECK1(m_audioFile->filePath()); @@ -94,7 +102,7 @@ QVariant MetaInfoModel::data(const QModelIndex &index, int role) const return (!index.column()) ? "Year" : CHECK2(m_audioFile->fileYear()); break; case 10: - return (!index.column()) ? "Position" : CHECK2(m_audioFile->filePosition()); + return (!index.column()) ? "Position" : ((m_audioFile->filePosition() == UINT_MAX) ? "Generate from list position" : CHECK2(m_audioFile->filePosition())); break; case 11: return (!index.column()) ? "Comment" : CHECK1(m_audioFile->fileComment()); @@ -106,7 +114,7 @@ QVariant MetaInfoModel::data(const QModelIndex &index, int role) const } else if(role == Qt::DecorationRole && index.column() == 0) { - switch(index.row()) + switch(index.row() + m_offset) { case 0: return QIcon(":/icons/folder_page.png"); @@ -151,7 +159,7 @@ QVariant MetaInfoModel::data(const QModelIndex &index, int role) const } else if(role == Qt::TextColorRole && index.column() == 1) { - switch(index.row()) + switch(index.row() + m_offset) { case 0: return CHECK3(m_audioFile->filePath()); @@ -237,7 +245,7 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) QStringList generes("(Unspecified)"); QString temp; - switch(index.row()) + switch(index.row() + m_offset) { case 5: temp = QInputDialog::getText(parent, "Edit Title", "Please enter the title for this file:", QLineEdit::Normal, m_audioFile->fileName(), &ok).simplified(); @@ -286,12 +294,28 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } break; case 10: - val = QInputDialog::getInt(parent, "Edit Position", "Please enter the position (track no.) for this file:", (m_audioFile->filePosition() ? m_audioFile->filePosition() : 1), 0, 99, 1, &ok); - if(ok) + if(!m_offset) { - beginResetModel(); - m_audioFile->setFilePosition(val); - endResetModel(); + val = QInputDialog::getInt(parent, "Edit Position", "Please enter the position (track no.) for this file:", (m_audioFile->filePosition() ? m_audioFile->filePosition() : 1), 0, 99, 1, &ok); + if(ok) + { + beginResetModel(); + m_audioFile->setFilePosition(val); + endResetModel(); + } + } + else + { + QStringList options; + options << "Unspecified (copy from source file)"; + options << "Generate from list position"; + temp = QInputDialog::getItem(parent, "Edit Position", "Please enter the position (track no.) for this file:", options, ((m_audioFile->filePosition() == UINT_MAX) ? 1 : 0), false, &ok); + if(ok) + { + beginResetModel(); + m_audioFile->setFilePosition((options.indexOf(temp) == 1) ? UINT_MAX : 0); + endResetModel(); + } } break; case 11: @@ -309,6 +333,31 @@ void MetaInfoModel::editItem(const QModelIndex &index, QWidget *parent) } } +void MetaInfoModel::clearData(void) +{ + beginResetModel(); + + m_audioFile->setFilePath(QString()); + m_audioFile->setFileName(QString()); + m_audioFile->setFileArtist(QString()); + m_audioFile->setFileAlbum(QString()); + m_audioFile->setFileGenre(QString()); + m_audioFile->setFileComment("Encoded with LameXP"); + m_audioFile->setFileYear(0); + m_audioFile->setFilePosition(UINT_MAX); + m_audioFile->setFileDuration(0); + m_audioFile->setFormatContainerType(QString()); + m_audioFile->setFormatContainerProfile(QString()); + m_audioFile->setFormatAudioType(QString()); + m_audioFile->setFormatAudioProfile(QString()); + m_audioFile->setFormatAudioVersion(QString()); + m_audioFile->setFormatAudioSamplerate(0); + m_audioFile->setFormatAudioChannels(0); + m_audioFile->setFormatAudioBitdepth(0); + + endResetModel(); +} + Qt::ItemFlags MetaInfoModel::flags(const QModelIndex &index) const { return QAbstractTableModel::flags(index); diff --git a/src/Model_MetaInfo.h b/src/Model_MetaInfo.h index 8fd3a965..e04dfc0e 100644 --- a/src/Model_MetaInfo.h +++ b/src/Model_MetaInfo.h @@ -31,7 +31,7 @@ class MetaInfoModel : public QAbstractTableModel Q_OBJECT public: - MetaInfoModel(AudioFileModel *file); + MetaInfoModel(AudioFileModel *file, unsigned int offset = 0); ~MetaInfoModel(void); //Model functions @@ -41,7 +41,9 @@ public: QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex &index) const; void editItem(const QModelIndex &index, QWidget *parent); + void clearData(void); private: AudioFileModel* m_audioFile; + unsigned int m_offset; }; diff --git a/src/Resource.h b/src/Resource.h index 8ae72243..278f71c2 100644 --- a/src/Resource.h +++ b/src/Resource.h @@ -19,14 +19,7 @@ // http://www.gnu.org/licenses/gpl-2.0.txt /////////////////////////////////////////////////////////////////////////////// -/* - * LameXP Version Info - */ -#define VER_LAMEXP_MAJOR 4 -#define VER_LAMEXP_MINOR_HI 0 -#define VER_LAMEXP_MINOR_LO 0 -#define VER_LAMEXP_BUILD 9 -#define VER_LAMEXP_SUFFIX TechPreview +#include "Config.h" /* * Resource ID's @@ -45,17 +38,3 @@ #define _APS_NEXT_SYMED_VALUE 101 #endif #endif - -/* - * Helper macros (having fun with the C pre-processor) - */ -#define VER_LAMEXP_STR_HLP1(X) #X -#define VER_LAMEXP_STR_HLP2(V,W,X,Y,Z) VER_LAMEXP_STR_HLP1(v##V.W##X Z [Build Y]) -#define VER_LAMEXP_STR_HLP3(V,W,X,Y,Z) VER_LAMEXP_STR_HLP2(V,W,X,Y,Z) -#define VER_LAMEXP_STR VER_LAMEXP_STR_HLP3(VER_LAMEXP_MAJOR,VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO,VER_LAMEXP_BUILD,VER_LAMEXP_SUFFIX) -#define VER_LAMEXP_SUFFIX_STR_HLP1(X) #X -#define VER_LAMEXP_SUFFIX_STR_HLP2(X) VER_LAMEXP_SUFFIX_STR_HLP1(X) -#define VER_LAMEXP_SUFFIX_STR VER_LAMEXP_SUFFIX_STR_HLP2(VER_LAMEXP_SUFFIX) -#define VER_LAMEXP_MINOR_HLP1(X,Y) X##Y -#define VER_LAMEXP_MINOR_HLP2(X,Y) VER_LAMEXP_MINOR_HLP1(X,Y) -#define VER_LAMEXP_MINOR VER_LAMEXP_MINOR_HLP2(VER_LAMEXP_MINOR_HI,VER_LAMEXP_MINOR_LO)