From: lordmulder Date: Thu, 5 Apr 2012 14:24:33 +0000 (+0200) Subject: Don't check for elevation on Wine. It seems Wine always runs the process elevated... X-Git-Tag: Release_404~35 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=65423ba1253815320e0ced7ce2226a1cca697c7d;p=lamexp%2FLameXP.git Don't check for elevation on Wine. It seems Wine always runs the process elevated (tested under Wine 1.4 on Ubuntu 12.04). --- diff --git a/src/Config.h b/src/Config.h index 937b356e..be6855cd 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 12 -#define VER_LAMEXP_BUILD 952 +#define VER_LAMEXP_BUILD 953 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 7b65856c..f4ff09f6 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -199,6 +199,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S m_outputFolderNoteBox->hide(); } + outputFolderViewClicked(QModelIndex()); refreshFavorites(); //Setup "Meta Data" tab @@ -2376,13 +2377,17 @@ void MainWindow::outputFolderViewClicked(const QModelIndex &index) outputFolderView->setCurrentIndex(index); } - if(m_fileSystemModel) + if(m_fileSystemModel && index.isValid()) { QString selectedDir = m_fileSystemModel->filePath(index); if(selectedDir.length() < 3) selectedDir.append(QDir::separator()); outputFolderLabel->setText(QDir::toNativeSeparators(selectedDir)); m_settings->outputDir(selectedDir); } + else + { + outputFolderLabel->setText(QDir::toNativeSeparators(m_settings->outputDir())); + } } /* diff --git a/src/Global.cpp b/src/Global.cpp index bcaf941a..323d6e14 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -1117,7 +1117,7 @@ bool lamexp_init_qt(int argc, char* argv[]) g_lamexp_translation.names.insert(LAMEXP_DEFAULT_LANGID, "English"); //Check for process elevation - if(!lamexp_check_elevation()) + if((!lamexp_check_elevation()) && (!lamexp_detect_wine())) { if(QMessageBox::warning(NULL, "LameXP", "LameXP was started with elevated rights. This is a potential security risk!", "Quit Program (Recommended)", "Ignore") == 0) {