(trunk qt) #3917 "Text on QPushButton is not updated after selecting 'Torrent Done' script" -- fixed. patch by cantabile.

This commit is contained in:
Jordan Lee 2011-01-19 20:33:43 +00:00
parent 06884387da
commit f3e1c17261
1 changed files with 8 additions and 1 deletions

View File

@ -619,7 +619,8 @@ PrefsDialog :: PrefsDialog( Session& session, Prefs& prefs, QWidget * parent ):
<< Prefs :: DIR_WATCH << Prefs :: DIR_WATCH
<< Prefs :: DOWNLOAD_DIR << Prefs :: DOWNLOAD_DIR
<< Prefs :: INCOMPLETE_DIR << Prefs :: INCOMPLETE_DIR
<< Prefs :: INCOMPLETE_DIR_ENABLED; << Prefs :: INCOMPLETE_DIR_ENABLED
<< Prefs :: SCRIPT_TORRENT_DONE_FILENAME;
foreach( int key, keys ) foreach( int key, keys )
refreshPref( key ); refreshPref( key );
@ -694,6 +695,12 @@ PrefsDialog :: refreshPref( int key )
myWatchButton->setText( QFileInfo(myPrefs.getString(Prefs::DIR_WATCH)).fileName() ); myWatchButton->setText( QFileInfo(myPrefs.getString(Prefs::DIR_WATCH)).fileName() );
break; break;
case Prefs :: SCRIPT_TORRENT_DONE_FILENAME: {
const QString path( myPrefs.getString( key ) );
myTorrentDoneScriptButton->setText( QFileInfo(path).fileName() );
break;
}
case Prefs :: PEER_PORT: case Prefs :: PEER_PORT:
myPortLabel->setText( tr( "Status unknown" ) ); myPortLabel->setText( tr( "Status unknown" ) );
myPortButton->setEnabled( true ); myPortButton->setEnabled( true );