From 4c867dc3257855f98be4acd2837377c119907a53 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Thu, 29 Sep 2011 17:36:38 +0200 Subject: [PATCH] Added a button for loading a different Cue Sheet to the Cue Sheet importer dialog. --- etc/Translation/Blank.ts | 640 +---------------------------------- etc/Translation/LameXP_DE.ts | 4 + etc/Translation/LameXP_ES.ts | 4 + etc/Translation/LameXP_FR.ts | 4 + etc/Translation/LameXP_IT.ts | 4 + etc/Translation/LameXP_KR.ts | 4 + etc/Translation/LameXP_RU.ts | 4 + etc/Translation/LameXP_UK.ts | 4 + gui/CueSheetImport.ui | 23 +- src/Config.h | 2 +- src/Dialog_CueImport.cpp | 9 +- src/Dialog_CueImport.h | 1 + src/Dialog_MainWindow.cpp | 47 +-- 13 files changed, 90 insertions(+), 660 deletions(-) diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index dbcdc0b1..ce53ec1b 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -4,294 +4,226 @@ AboutDialog - LameXP &minus; Audio Encoder Front-end - Please visit %1 for news and updates! - Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left. - Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!! - Special thanks go out to "John33" from %1 for his continuous support. - About LameXP - Show License Text - Accept License - Decline License - 3rd Party S/W - Contributors - About Qt4 - - - Discard - The following people have contributed to LameXP: - Translators: - If you are willing to contribute a LameXP translation, feel free to contact us! - About Contributors - The following third-party software is used in LameXP: - LAME &minus; OpenSource mp3 Encoder - - - - - - - - - - - Released under the terms of the GNU Lesser General Public License. - OggEnc &minus; Ogg Vorbis Encoder - Completely open and patent-free audio encoding technology. - Nero AAC Reference MPEG-4 Encoder - Freeware state-of-the-art HE-AAC encoder with 2-Pass support. - Available from vendor web-site as free download: - Aften &minus; A/52 audio encoder - FLAC &minus; Free Lossless Audio Codec - Open and patent-free lossless audio compression technology. - mpg123 &minus; Fast Console MPEG Audio Player/Decoder - FAAD &minus; OpenSource MPEG-4 and MPEG-2 AAC Decoder - Released under the terms of the GNU General Public License. - AC3Filter Tools &minus; AC3/DTS Decoder - WavPack &minus; Hybrid Lossless Compression - Completely open audio compression format. - Musepack &minus; Living Audio Compression - Monkey's Audio &minus; Lossless Audio Compressor - Freely available source code, simple SDK and non-restrictive licensing. - Shorten &minus; Lossless Audio Compressor - Speex &minus; Free Codec For Free Speech - Open Source patent-free audio format designed for speech. - The True Audio &minus; Lossless Audio Codec - ALAC Decoder - Copyright (c) 2004 David Hammerton. Contributions by Cody Brocious. - wma2wav &minus; Dump WMA files to Wave Audio - Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved. - avs2wav &minus; Avisynth to Wave Audio converter - By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>. - MediaInfo &minus; Media File Analysis Tool - SoX &minus; Sound eXchange - GnuPG &minus; The GNU Privacy Guard - GNU Wget &minus; Software for retrieving files using HTTP - Silk Icons &minus; Over 700 icons in PNG format - By Mark James, released under the Creative Commons 'by' License. - LameXP as a whole is copyrighted by LoRd_MuldeR. The copyright of thrird-party software used in LameXP belongs to the individual authors. - About Third-party Software - n/a @@ -299,50 +231,38 @@ AudioFileModel - - Profile - Channels - Samplerate - Bitdepth - Type - Version - - - Bitrate - Constant - Variable @@ -350,153 +270,118 @@ CueImportDialog - Import Cue Sheet - The following Cue Sheet will be split and imported into LameXP. - Loading Cue Sheet file, please be patient... - - Failed to load the Cue Sheet file: - The specified file could not be found! - - - - Cue Sheet Error - An unknown error has occured! - The file could not be opened for reading. Make sure you have the required rights! - The provided file does not look like a valid Cue Sheet disc image file! - Could not find any supported audio track in the Cue Sheet image! - Note that LameXP can not handle "binary" Cue Sheet images. - The selected Cue Sheet file contains inconsistent information. Take care! - - Choose Output Directory - - LameXP - Error: The selected output directory could not be created! - Error: The selected output directory is not writable! - Low Diskspace Warning - There are less than %1 GB of free diskspace available in the selected output directory. - It is highly recommend to free up more diskspace before proceeding with the import! - Analyzing file(s), please wait... - Analysis Failed - Warning: The format of some of the input files could not be determined! - Continue Anyway - Abort - Splitting file(s), please wait... - Process was aborted by the user after %1 track(s)! - An unexpected error has occured while splitting the Cue Sheet! - Imported %1 track(s) from the Cue Sheet and skipped %2 track(s). - Cue Sheet Completed @@ -504,33 +389,30 @@ CueSheetImport - - Import Cue Sheet - Existing Source File - Missing Source File (Tracks will be skipped!) - Output Directory - Browse... - + Load a different Cue Sheet + + + Discard @@ -538,44 +420,34 @@ CueSheetModel - No. - File / Track - Index - Duration - File %1 - Track %1 - - Unknown Artist - - Unknown Title @@ -583,17 +455,14 @@ DecoderRegistry - All supported types - Playlists - All files @@ -601,7 +470,6 @@ DiskObserverThread - Low diskspace on drive '%1' detected (only %2 MB are free), problems can occur! @@ -609,22 +477,18 @@ DropBox - LameXP - DropBox - LameXP DropBox - You can add files to LameXP via Drag&amp;Drop here! - (Right-click to close the DropBox) @@ -632,12 +496,10 @@ FileListModel - Title - Full Path @@ -645,32 +507,26 @@ LogViewDialog - Log View - Discard - Save to File... - Copy to Clipboard - Log File - The log file shows detailed information about the selected job. @@ -678,1463 +534,1122 @@ MainWindow - LameXP - Audio Encoder Front-end - - Source Files - Add File(s) - Remove - Clear - - Show Details - - Output Directory - Goto Home Folder - Goto Music Folder - Goto Desktop Folder - Make New Folder - Save output files to the same location where the input file is located - Prepend relative source file path to output file - - Meta Data - Meta Information - Edit - Note: Meta information you enter here will <u>supersede</u> data from the source! - Reset - Options - Automatically generate playlist file (.m3u) - Write meta information to encoded files - - Compression - Encoder / Format - Lame MP3 - Ogg Vorbis - MPEG-4 AAC - Wave (PCM) - FLAC - Aften A/52 - Rate Control Method - Quality-based (VBR) - Average Bitrate (ABR) - Constant Bitrate (CBR) - Quality / Bitrate - Minimum - Maximum - - Advanced Options - Bitrate Management (LAME and OggEnc2) - Enable Bitrate Management - Minimum (kbps): - Maximum (kbps): - LAME Algorithm Quality - Faster Processing - Better quality - Warning: Audio quality will be very poor. Please do <u>not</u> complain about audio quality! - Warning: Processing speed will be very slow. Please do <u>not</u> complain about processing speed! - Channel Mode / Sampling Rate - - Auto Select (Default) - Joint Stereo - Forced Joint Stereo - Simple - Dual Mono - Mono - MP3 Channel Mode: - Sampling Rate (Hz): - 16.000 - 22.050 - 24.000 - 32.000 - 44.100 - 48.000 - Enforce Stereo Downmix of Surround (Multi-Channel) Sources - AAC Encoder-Options - Enable 2-Pass Processing (ABR Mode) - Select AAC Profile: - Auto Select (Recommended) - Enforce LC-AAC - Enforce HE-AAC (AAC + SBR) - Enforce HE-AAC v2 (AAC + SBR + PS) - Volume Normalization - Enable Normalization Filter - Peak Volume (dB): - Tone Adjustment - Adjust Treble (dB): - Adjust Bass (dB): - Custom Encoder Parameters - - - - - You can eneter custom parameters here! - Lame MP3: - OggEnc2: - MPEG-4 AAC: - FLAC: - Warning: Custom parameters won't be checked at all. Use them at your own risk !!! - Aften A/52: - Multi-Threading - Choose the number of parallel instances based on the number of CPU cores (Recommended) - Fewer Instances - More Instances - Temp Directory - Browse... - Store temporary files in your system's default TEMP directory (Recommended) - Aften A/52 Options - Film Light - Film Standard - Music Light - Music Standard - Speech - None (Default) - Auto Select - 1+1 (Ch1,Ch2) - 1/0 (C) - 2/0 (L,R) - 3/0 (L,R,C) - 2/1 (L,R,S) - 3/1 (L,R,C,S) - 2/2 (L,R,SL,SR) - 3/2 (L,R,C,SL,SR) - Audio Coding Mode: - Dynamic Range Compression: - Fast Bit Allocation (Less Accurate) - Exponent Search Size: - Rename Output Files - Entere the pattern to rename the output files here! - Rename Output Files - <a href="reset">Reset</a> &nbsp; <a href="#">Show List of Macros</a> - Rename Pattern: - Example File Name: - Reset Advanced Options - Encode Now! - - About... - Exit Program - File - ? - View - Style - Language - Tools - Configuration - Quit - Open File(s)... - - Visit Official Web-Site - - - - Check for Updates - Open Folder... - Clear All - Plastique - Cleanlooks - Windows Vista ("Aero") - Windows Classic - Windows XP ("Luna") - - Disable Update Reminder - - Disable Sound Effects - Install WMA Decoder - Disable Nero AAC Notifications - Show DropBox - From File... - Encode! - Disable Shell Integration - Frequently Asked Questions - Changelog - Translator's Guide - Help && Support - Open Folder Recursively... - Check for Beta Updates - Import Cue Sheet - Disable Slow Startup Notifications - Adding file(s), please wait... - - Access Denied - %1 file(s) have been rejected, because read access was not granted! - This usually means the file is locked by another process. - CDDA Files - %1 file(s) have been rejected, because they are dummy CDDA files! - Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present. - We recommend using %1 for that purpose. - Cue Sheet - %1 file(s) have been rejected, because they appear to be Cue Sheet images! - Please use LameXP's Cue Sheet wizard for importing Cue Sheet files. - Files Rejected - %1 file(s) have been rejected, because the file format could not be recognized! - This usually means the file is damaged or the file format is not supported. - Scanning folder(s) for files, please wait... - DEMO VERSION - You can drop in audio files here! - Open File in External Application - Browse File Location - Browse Selected Folder - Bookmark Current Output Folder - License Declined - You have declined the license. Consequently the application will exit now! - Goodbye! - LameXP - Expired - This demo (pre-release) version of LameXP has expired at %1. - LameXP is free software and release versions won't expire. - - Exit Program - It seems that a bogus anti-virus software is slowing down the startup of LameXP. - Please refer to the %1 document for details and solutions! - Slow Startup - - - - - - Discard - - Don't Show Again - Urgent Update - Your version of LameXP is more than a year old. Time for an update! - - - Update Reminder - Your last update check was more than 14 days ago. Check for updates now? - Your did not check for LameXP updates yet. Check for updates now? - Postpone - LameXP detected that your version of the Nero AAC encoder is outdated! - The current version available is %1 (or later), but you still have version %2 installed. - n/a - You can download the latest version of the Nero AAC encoder from the Nero website at: - AAC Encoder Outdated - The Nero AAC encoder could not be found. AAC encoding support will be disabled. - Please put 'neroAacEnc.exe', 'neroAacDec.exe' and 'neroAacTag.exe' into the LameXP directory! - Your LameXP directory is located here: - You can download the Nero AAC encoder for free from the official Nero website at: - AAC Support Disabled - - - LameXP - You must add at least one file to the list before proceeding! - Not Found - Your currently selected TEMP folder does not exist anymore: - Restore Default - Cancel - Low Diskspace Warning - There are less than %1 GB of free diskspace available on your system's TEMP folder. - It is highly recommend to free up more diskspace before proceeding with the encode! - Your TEMP folder is located at: - Abort Encoding Process - Clean Disk Now - Ignore - Low Diskspace - You are proceeding with low diskspace. Problems might occur! - Sorry, an unsupported encoder has been chosen! - Cannot write to the selected output directory. - Please choose a different directory! - Load Translation - Translation Files - Do you really want to disable the update reminder? - - - - - - Yes - - - - - - No - The update reminder has been disabled. - Please remember to check for updates at regular intervals! - The update reminder has been re-enabled. - Do you really want to disable all sound effects? - - Sound Effects - All sound effects have been disabled. - The sound effects have been re-enabled. - - - Nero AAC Notifications - Do you really want to disable all Nero AAC Encoder notifications? - All Nero AAC Encoder notifications have been disabled. - The Nero AAC Encoder notifications have been re-enabled. - - - Slow Startup Notifications - Do you really want to disable the slow startup notifications? - The slow startup notifications have been disabled. - The slow startup notifications have been re-enabled. - - Open Cue Sheet - - Cue Sheet File - - - Beta Updates - Do you really want LameXP to check for Beta (pre-release) updates? - LameXP will check for Beta (pre-release) updates from now on. - Check Now - LameXP will <i>not</i> check for Beta (pre-release) updates from now on. - - - Shell Integration - Do you really want to disable the LameXP shell integration? - The LameXP shell integration has been disabled. - The LameXP shell integration has been re-enabled. - - Add file(s) - - Add Folder - - New Folder - Enter the name of the new folder: - Failed to create folder - The new folder could not be created: - Drive is read-only or insufficient access rights! - - - - Quality Level %1 - - - Compression %1 - - - Uncompressed - Best Quality (Very Slow) - High Quality (Recommended) - Average Quality (Default) - Low Quality (Fast) - Poor Quality (Very Fast) - File name without extension - Track number with leading zero - Track title - Artist name - Album name - Year with (at least) four digits - Comment - Characters forbidden in file names: - Rename Macros - %1 Instance(s) - Cannot write to the selected directory. Please choose another directory! - Already Running - LameXP is already running, please use the running instance! @@ -2142,22 +1657,18 @@ MetaInfo - Meta Information - Artwork - Edit - Close @@ -2165,52 +1676,42 @@ MetaInfoDialog - Edit this Information - Copy everything to Meta Info tab - Clear all Meta Info - Load Artwork From File - Clear Artwork - Meta Information - The following meta information have been extracted from the original file. - Load Artwork - Artwork Error - Sorry, failed to load artwork from selected file! @@ -2218,204 +1719,158 @@ MetaInfoModel - - Unknown - - Not Specified - Full Path - Format - Container - Compression - Duration - Title - Artist - Album - Genre - Year - Position - - Generate from list position - Comment - Property - Value - Unspecified - OK - Cancel - - Edit Title - Please enter the title for this file: - The title must not be empty. Generating title from file name! - Edit Artist - Please enter the artist for this file: - Edit Album - Please enter the album for this file: - Edit Genre - Please enter the genre for this file: - Edit Year - Please enter the year for this file: - - Edit Position - - Please enter the position (track no.) for this file: - Unspecified (copy from source file) - Edit Comment - Please enter the comment for this file: - - Encoded with LameXP - Not editable - Sorry, this property of the source file cannot be edited! @@ -2423,107 +1878,86 @@ ProcessThread - Starting... - Not found! - The format of this file is NOT supported: - Container Format: - Audio Format: - Unsupported! - Done. - Aborted! - Failed! - Encoding - Filtering - Decoding - The source audio file could not be found: - The source audio file could not be opened for reading: - The target output directory doesn't exist and could NOT be created: - The target output directory is NOT writable: - Unknown File Name - Unknown Title - Unknown Artist - Unknown Album - Unknown Comment @@ -2531,139 +1965,110 @@ ProcessingDialog - LameXP - Processing - Initializing, please wait... - Shutdown the computer as soon as all files have been converted - Abort - Close - Show details for selected job - Browse Output File Location - Encoding Files - Your files are being encoded, please be patient... - Encoding files, please wait... - Multi-threading enabled: Running %1 instances in parallel! - Aborted! Waiting for running jobs to terminate... - Encoding: %1 files of %2 completed so far, please wait... - Creating the playlist file, please wait... - Process was aborted by the user after %1 file(s)! - Process was aborted prematurely by the user! - LameXP - Aborted - Process was aborted by the user. - Error: %1 of %2 files failed. Double-click failed items for detailed information! - LameXP - Error - At least one file has failed! - - All files completed successfully. - LameXP - Done - Playlist creation failed - The playlist file could not be created: - Warning: Computer will shutdown in %1 seconds... - - Cancel Shutdown @@ -2671,12 +2076,10 @@ ProgressModel - Job - Status @@ -2684,17 +2087,14 @@ QApplication - Executable '%1' doesn't support Windows compatibility mode. - Executable '%1' requires Qt v%2, but found Qt v%3. - Executable '%1' requires Windows 2000 or later. @@ -2702,12 +2102,10 @@ ShellIntegration - Audio File supported by LameXP - Convert this file with LameXP v%1 @@ -2715,7 +2113,6 @@ SplashScreen - LameXP is launching... @@ -2723,143 +2120,114 @@ UpdateDialog - LameXP Update Manager - Please wait... - Latest version available: - Currently installed version: - Retry - Show Log - Download && Install - Close - - Build - Unknown - Testing your internet connection, please wait... - It appears that the computer currently is offline! - Please make sure your computer is connected to the internet and try again. - Network connectivity test has failed! - Please make sure your internet connection is working properly and try again. - Checking for new updates online, please wait... - Failed to fetch update information from server! - Sorry, the update server might be busy at this time. Plase try again later. - More information available at: - A new version of LameXP is available! - We highly recommend all users to install this update as soon as possible. - No new updates available at this time. - Your version of LameXP is still up-to-date. Please check for updates regularly! - Your version appears to be newer than the latest release. - This usually indicates your are currently using a pre-release version of LameXP. - Update is being downloaded, please be patient... - Update ready to install. Applicaion will quit... - Update failed. Please try again or download manually! diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index e3399865..ccb57303 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -412,6 +412,10 @@ Missing Source File (Tracks will be skipped!) Fehlende Quelldatei (Tracks werden übersprungen!) + + Load a different Cue Sheet + Ein anderes Cuesheet laden + CueSheetModel diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts index bc364069..54486503 100644 --- a/etc/Translation/LameXP_ES.ts +++ b/etc/Translation/LameXP_ES.ts @@ -412,6 +412,10 @@ Missing Source File (Tracks will be skipped!) El archivo de origen no existe (¡Se saltarán pistas!) + + Load a different Cue Sheet + + CueSheetModel diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts index 44d72ef9..dc814990 100644 --- a/etc/Translation/LameXP_FR.ts +++ b/etc/Translation/LameXP_FR.ts @@ -416,6 +416,10 @@ Missing Source File (Tracks will be skipped!) Fichier source manquant (les pistes seront ignorées !) + + Load a different Cue Sheet + + CueSheetModel diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts index 1cc472f9..10070751 100644 --- a/etc/Translation/LameXP_IT.ts +++ b/etc/Translation/LameXP_IT.ts @@ -412,6 +412,10 @@ Missing Source File (Tracks will be skipped!) + + Load a different Cue Sheet + + CueSheetModel diff --git a/etc/Translation/LameXP_KR.ts b/etc/Translation/LameXP_KR.ts index 91f7d9ac..3b77490d 100644 --- a/etc/Translation/LameXP_KR.ts +++ b/etc/Translation/LameXP_KR.ts @@ -412,6 +412,10 @@ Missing Source File (Tracks will be skipped!) + + Load a different Cue Sheet + + CueSheetModel diff --git a/etc/Translation/LameXP_RU.ts b/etc/Translation/LameXP_RU.ts index 7b4df2da..f3e51885 100644 --- a/etc/Translation/LameXP_RU.ts +++ b/etc/Translation/LameXP_RU.ts @@ -414,6 +414,10 @@ Missing Source File (Tracks will be skipped!) Файл не найден (будет пропущен!) + + Load a different Cue Sheet + + CueSheetModel diff --git a/etc/Translation/LameXP_UK.ts b/etc/Translation/LameXP_UK.ts index d618d737..9a119050 100644 --- a/etc/Translation/LameXP_UK.ts +++ b/etc/Translation/LameXP_UK.ts @@ -413,6 +413,10 @@ Discard Відмінити + + Load a different Cue Sheet + + CueSheetModel diff --git a/gui/CueSheetImport.ui b/gui/CueSheetImport.ui index 2e281b9b..05e9a195 100644 --- a/gui/CueSheetImport.ui +++ b/gui/CueSheetImport.ui @@ -514,6 +514,26 @@ + + + + + 175 + 0 + + + + Load a different Cue Sheet + + + + :/icons/folder_explore.png:/icons/folder_explore.png + + + false + + + @@ -626,13 +646,14 @@ + abortButton clicked() CueSheetImport - close() + reject() 688 diff --git a/src/Config.h b/src/Config.h index e906f76b..63726dde 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 2 -#define VER_LAMEXP_BUILD 699 +#define VER_LAMEXP_BUILD 700 /////////////////////////////////////////////////////////////////////////////// // Tools versions diff --git a/src/Dialog_CueImport.cpp b/src/Dialog_CueImport.cpp index 92739b9a..efaec198 100644 --- a/src/Dialog_CueImport.cpp +++ b/src/Dialog_CueImport.cpp @@ -71,6 +71,7 @@ CueImportDialog::CueImportDialog(QWidget *parent, FileListModel *fileList, const //Enable up/down button connect(imprtButton, SIGNAL(clicked()), this, SLOT(importButtonClicked())); connect(browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked())); + connect(loadOtherButton, SIGNAL(clicked()), this, SLOT(loadOtherButtonClicked())); //Translate labelHeaderText->setText(QString("%1
%2").arg(tr("Import Cue Sheet"), tr("The following Cue Sheet will be split and imported into LameXP."))); @@ -226,6 +227,11 @@ void CueImportDialog::importButtonClicked(void) accept(); } +void CueImportDialog::loadOtherButtonClicked(void) +{ + done(-1); +} + void CueImportDialog::analyzedFile(const AudioFileModel &file) { qDebug("Received result: <%s> <%s/%s>", file.filePath().toLatin1().constData(), file.formatContainerType().toLatin1().constData(), file.formatAudioType().toLatin1().constData()); @@ -263,8 +269,7 @@ void CueImportDialog::importCueSheet(void) //Now split files according to Cue Sheet splitFiles(); } - - + //Release locks while(!m_locks.isEmpty()) { diff --git a/src/Dialog_CueImport.h b/src/Dialog_CueImport.h index 025934c2..b809ecf3 100644 --- a/src/Dialog_CueImport.h +++ b/src/Dialog_CueImport.h @@ -46,6 +46,7 @@ protected: private slots: void browseButtonClicked(void); void importButtonClicked(void); + void loadOtherButtonClicked(void); void modelChanged(void); void analyzedFile(const AudioFileModel &file); diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 2a7336b7..63cb59c0 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -1570,30 +1570,37 @@ void MainWindow::importCueSheetActionTriggered(bool checked) TEMP_HIDE_DROPBOX ( - QString selectedCueFile; + while(true) + { + int result = 0; + QString selectedCueFile; - if(USE_NATIVE_FILE_DIALOG) - { - selectedCueFile = QFileDialog::getOpenFileName(this, tr("Open Cue Sheet"), m_settings->mostRecentInputPath(), QString("%1 (*.cue)").arg(tr("Cue Sheet File"))); - } - else - { - QFileDialog dialog(this, tr("Open Cue Sheet")); - dialog.setFileMode(QFileDialog::ExistingFile); - dialog.setNameFilter(QString("%1 (*.cue)").arg(tr("Cue Sheet File"))); - dialog.setDirectory(m_settings->mostRecentInputPath()); - if(dialog.exec()) + if(USE_NATIVE_FILE_DIALOG) { - selectedCueFile = dialog.selectedFiles().first(); + selectedCueFile = QFileDialog::getOpenFileName(this, tr("Open Cue Sheet"), m_settings->mostRecentInputPath(), QString("%1 (*.cue)").arg(tr("Cue Sheet File"))); + } + else + { + QFileDialog dialog(this, tr("Open Cue Sheet")); + dialog.setFileMode(QFileDialog::ExistingFile); + dialog.setNameFilter(QString("%1 (*.cue)").arg(tr("Cue Sheet File"))); + dialog.setDirectory(m_settings->mostRecentInputPath()); + if(dialog.exec()) + { + selectedCueFile = dialog.selectedFiles().first(); + } } - } - if(!selectedCueFile.isEmpty()) - { - m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath()); - CueImportDialog *cueImporter = new CueImportDialog(this, m_fileListModel, selectedCueFile); - cueImporter->exec(); - LAMEXP_DELETE(cueImporter); + if(!selectedCueFile.isEmpty()) + { + m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath()); + CueImportDialog *cueImporter = new CueImportDialog(this, m_fileListModel, selectedCueFile); + result = cueImporter->exec(); + LAMEXP_DELETE(cueImporter); + } + + qWarning("Result was %d", result); + if(result != (-1)) break; } ) }