1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

(qt) #3268:Within each session, each torrent added presents options dialog for that and all previous torrents added in that sesssion

This commit is contained in:
Daniel Lee 2010-06-17 05:56:48 +00:00
parent fb8bcfb05d
commit 14cfd0fac0
2 changed files with 14 additions and 19 deletions

View file

@ -90,7 +90,6 @@ TrMainWindow :: TrMainWindow( Session& session, Prefs& prefs, TorrentModel& mode
myAboutDialog( new AboutDialog( this ) ),
myStatsDialog( new StatsDialog( session, this ) ),
myDetailsDialog( 0 ),
myFileDialog( 0 ),
myFilterModel( prefs ),
myTorrentDelegate( new TorrentDelegate( this ) ),
myTorrentDelegateMin( new TorrentDelegateMin( this ) ),
@ -1112,15 +1111,13 @@ TrMainWindow :: newTorrent( )
void
TrMainWindow :: openTorrent( )
{
if( myFileDialog == 0 )
{
QFileDialog * myFileDialog;
myFileDialog = new QFileDialog( this,
tr( "Add Torrent" ),
myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ),
tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
myFileDialog->setFileMode( QFileDialog::ExistingFiles );
QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) );
button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) );
QGridLayout * layout = dynamic_cast<QGridLayout*>(myFileDialog->layout());
@ -1129,7 +1126,6 @@ TrMainWindow :: openTorrent( )
connect( myFileDialog, SIGNAL(filesSelected(const QStringList&)),
this, SLOT(addTorrents(const QStringList&)));
}
myFileDialog->show( );
}

View file

@ -15,11 +15,11 @@
#include <ctime>
#include <QCheckBox>
#include <QFileDialog>
#include <QLineEdit>
#include <QIcon>
#include <QMainWindow>
#include <QMap>
#include <QPushButton>
#include <QSet>
#include <QSystemTrayIcon>
#include <QTimer>
@ -60,7 +60,6 @@ class TrMainWindow: public QMainWindow
QDialog * myAboutDialog;
QDialog * myStatsDialog;
Details * myDetailsDialog;
QFileDialog * myFileDialog;
QCheckBox * myFileDialogOptionsCheck;
QSystemTrayIcon myTrayIcon;
TorrentFilter myFilterModel;