Changeset 8327


Ignore:
Timestamp:
May 3, 2009, 10:00:56 PM (12 years ago)
Author:
charles
Message:

(trunk qt) session dialog improvements from W4pp

Location:
trunk/qt
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r8325 r8327  
    8080TrMainWindow :: TrMainWindow( Session& session, Prefs& prefs, TorrentModel& model, bool minimized ):
    8181    myLastFullUpdateTime( 0 ),
     82    mySessionDialog( new SessionDialog( session, prefs, this ) ),
    8283    myPrefsDialog( new PrefsDialog( session, prefs, this ) ),
    8384    myAboutDialog( new AboutDialog( this ) ),
     
    158159    connect( ui.action_OpenFolder, SIGNAL(triggered()), this, SLOT(openFolder()));
    159160    connect( ui.action_Properties, SIGNAL(triggered()), this, SLOT(openProperties()));
    160     connect( ui.action_SessionDialog, SIGNAL(triggered()), this, SLOT(openSessionDialog()));
     161    connect( ui.action_SessionDialog, SIGNAL(triggered()), mySessionDialog, SLOT(show()));
    161162    connect( ui.listView, SIGNAL(activated(const QModelIndex&)), ui.action_Properties, SLOT(trigger()));
    162163
     
    256257    connect( &mySession, SIGNAL(dataReadProgress()), this, SLOT(dataReadProgress()) );
    257258    connect( &mySession, SIGNAL(dataSendProgress()), this, SLOT(dataSendProgress()) );
     259    connect( &mySession, SIGNAL(httpAuthenticationRequired()), this, SLOT(wrongAuthentication()) );
    258260
    259261    if( mySession.isServer( ) )
     
    598600
    599601void
    600 TrMainWindow :: openSessionDialog( )
    601 {
    602     SessionDialog * d = new SessionDialog( mySession, myPrefs, this );
    603     d->show( );
    604 }
    605 
    606 void
    607602TrMainWindow :: openFolder( )
    608603{
     
    10951090    updateNetworkIcon( );
    10961091}
     1092
     1093void
     1094TrMainWindow :: wrongAuthentication( )
     1095{
     1096    mySession.stop( );
     1097    mySessionDialog->show( );
     1098}
  • trunk/qt/mainwin.h

    r8325 r8327  
    5353    private:
    5454        time_t myLastFullUpdateTime;
     55        QDialog * mySessionDialog;
    5556        QDialog * myPrefsDialog;
    5657        QDialog * myAboutDialog;
     
    114115        void openFolder( );
    115116        void openProperties( );
    116         void openSessionDialog( );
    117117        void toggleSpeedMode( );
    118118        void dataReadProgress( );
     
    181181        void setMinimalView( bool );
    182182        void refreshActionSensitivity( );
     183        void wrongAuthentication( );
    183184
    184185    public:
  • trunk/qt/options.cc

    r8188 r8327  
    126126    connect( myTree, SIGNAL(priorityChanged(const QSet<int>&,int)), this, SLOT(onPriorityChanged(const QSet<int>&,int)));
    127127    connect( myTree, SIGNAL(wantedChanged(const QSet<int>&,bool)), this, SLOT(onWantedChanged(const QSet<int>&,bool)));
    128     connect( myVerifyButton, SIGNAL(clicked(bool)), this, SLOT(onVerify()));
     128    if( session.isLocal( ) )
     129        connect( myVerifyButton, SIGNAL(clicked(bool)), this, SLOT(onVerify()));
     130
    129131    connect( &myVerifyTimer, SIGNAL(timeout()), this, SLOT(onTimeout()));
    130132
  • trunk/qt/session-dialog.cc

    r8324 r8327  
    3838    myPrefs.set( Prefs::SESSION_REMOTE_PASSWORD, myPasswordLineEdit->text( ) );
    3939    mySession.restart( );
    40     deleteLater( );
     40    hide( );
    4141}
    4242
     
    112112
    113113    QDialogButtonBox * buttons = new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Ok );
    114     connect( buttons, SIGNAL(rejected()), this, SLOT(deleteLater()));
     114    connect( buttons, SIGNAL(rejected()), this, SLOT(hide()));
    115115    connect( buttons, SIGNAL(accepted()), this, SLOT(onAccepted()));
    116116    top->addWidget( buttons, 0 );
  • trunk/qt/session.cc

    r8323 r8327  
    194194    connect( &myHttp, SIGNAL(dataReadProgress(int,int)), this, SIGNAL(dataReadProgress()));
    195195    connect( &myHttp, SIGNAL(dataSendProgress(int,int)), this, SIGNAL(dataSendProgress()));
     196    connect( &myHttp, SIGNAL(authenticationRequired(QString, quint16, QAuthenticator*)), this, SIGNAL(httpAuthenticationRequired()) );
    196197    connect( &myPrefs, SIGNAL(changed(int)), this, SLOT(updatePref(int)) );
    197198
  • trunk/qt/session.h

    r8323 r8327  
    123123        void dataReadProgress( );
    124124        void dataSendProgress( );
     125        void httpAuthenticationRequired( );
    125126
    126127    private:
Note: See TracChangeset for help on using the changeset viewer.