(trunk) first draft of changing the FreeSpace API to behave as https://trac.transmissionbt.com/ticket/4076#comment:25 -- libT, rpc, qt, and gtk implementations.

This commit is contained in:
Jordan Lee
2013-02-09 04:05:03 +00:00
parent 794a0c1d80
commit cd09204a6e
31 changed files with 552 additions and 190 deletions

View File

@@ -36,6 +36,7 @@
#include <QTimer>
#include <QVBoxLayout>
#include "freespace-label.h"
#include "formatter.h"
#include "hig.h"
#include "prefs.h"
@@ -588,6 +589,13 @@ PrefsDialog :: createDownloadingTab( )
connect( b, SIGNAL(clicked(bool)), this, SLOT(onDestinationClicked(void)) );
hig->addRow( tr( "Save to &Location:" ), b );
const QString downloadDir (myPrefs.getString(Prefs::DOWNLOAD_DIR));
l = myFreespaceLabel = new FreespaceLabel (mySession, downloadDir, this);
QHBoxLayout * h = new QHBoxLayout ();
h->addStretch (1);
h->addWidget (l);
hig->addWideControl (h);
hig->addSectionDivider( );
hig->addSectionTitle( tr( "Download Queue" ) );
@@ -746,8 +754,9 @@ PrefsDialog :: refreshPref( int key )
break;
case Prefs :: DOWNLOAD_DIR: {
QString path( myPrefs.getString( key ) );
const QString path( myPrefs.getString( key ) );
myDestinationButton->setText( QFileInfo(path).fileName() );
myFreespaceLabel->setPath (path);
break;
}