mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
(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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user