Changeset 10790


Ignore:
Timestamp:
Jun 17, 2010, 5:56:48 AM (12 years ago)
Author:
Longinus00
Message:

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

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r10770 r10790  
    9191    myStatsDialog( new StatsDialog( session, this ) ),
    9292    myDetailsDialog( 0 ),
    93     myFileDialog( 0 ),
    9493    myFilterModel( prefs ),
    9594    myTorrentDelegate( new TorrentDelegate( this ) ),
     
    11131112TrMainWindow :: openTorrent( )
    11141113{
    1115     if( myFileDialog == 0 )
    1116     {
    1117         myFileDialog = new QFileDialog( this,
    1118                                         tr( "Add Torrent" ),
    1119                                         myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ),
    1120                                         tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
    1121         myFileDialog->setFileMode( QFileDialog::ExistingFiles );
    1122 
    1123 
    1124         QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) );
    1125         button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) );
    1126         QGridLayout * layout = dynamic_cast<QGridLayout*>(myFileDialog->layout());
    1127         layout->addWidget( button, layout->rowCount( ), 0, 1, -1, Qt::AlignLeft );
    1128         myFileDialogOptionsCheck = button;
    1129 
    1130         connect( myFileDialog, SIGNAL(filesSelected(const QStringList&)),
    1131                  this, SLOT(addTorrents(const QStringList&)));
    1132     }
     1114    QFileDialog * myFileDialog;
     1115    myFileDialog = new QFileDialog( this,
     1116                                    tr( "Add Torrent" ),
     1117                                    myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ),
     1118                                    tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
     1119    myFileDialog->setFileMode( QFileDialog::ExistingFiles );
     1120
     1121    QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) );
     1122    button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) );
     1123    QGridLayout * layout = dynamic_cast<QGridLayout*>(myFileDialog->layout());
     1124    layout->addWidget( button, layout->rowCount( ), 0, 1, -1, Qt::AlignLeft );
     1125    myFileDialogOptionsCheck = button;
     1126
     1127    connect( myFileDialog, SIGNAL(filesSelected(const QStringList&)),
     1128             this, SLOT(addTorrents(const QStringList&)));
    11331129
    11341130    myFileDialog->show( );
  • trunk/qt/mainwin.h

    r10630 r10790  
    1616#include <ctime>
    1717#include <QCheckBox>
    18 #include <QFileDialog>
    1918#include <QLineEdit>
    2019#include <QIcon>
    2120#include <QMainWindow>
    2221#include <QMap>
     22#include <QPushButton>
    2323#include <QSet>
    2424#include <QSystemTrayIcon>
     
    6161        QDialog * myStatsDialog;
    6262        Details * myDetailsDialog;
    63         QFileDialog * myFileDialog;
    6463        QCheckBox * myFileDialogOptionsCheck;
    6564        QSystemTrayIcon myTrayIcon;
Note: See TracChangeset for help on using the changeset viewer.