mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
cleanup preferences file keys
This commit is contained in:
parent
9296e088f3
commit
d2401c0a5e
2 changed files with 4 additions and 6 deletions
|
@ -97,10 +97,10 @@ namespace
|
||||||
|
|
||||||
int_v getTorrentColumns( wxConfig * config )
|
int_v getTorrentColumns( wxConfig * config )
|
||||||
{
|
{
|
||||||
const wxString key = _T("TorrentListColumns");
|
const wxString key = _T("torrent-list-columns");
|
||||||
wxString columnStr;
|
wxString columnStr;
|
||||||
if( !config->Read( key, &columnStr ) )
|
if( !config->Read( key, &columnStr, _T("name|download-speed|upload-speed|eta|peers|size|done|status|seeds") ) )
|
||||||
columnStr = _T("name|download-speed|upload-speed|eta|peers|size|done|status|seeds");
|
config->Write( key, columnStr );
|
||||||
|
|
||||||
int_v cols;
|
int_v cols;
|
||||||
while( !columnStr.IsEmpty() )
|
while( !columnStr.IsEmpty() )
|
||||||
|
@ -184,7 +184,6 @@ TorrentListCtrl :: TorrentListCtrl( tr_handle_t * handle,
|
||||||
myConfig->Read( _T("torrent-sort-is-descending"), &descending, FALSE );
|
myConfig->Read( _T("torrent-sort-is-descending"), &descending, FALSE );
|
||||||
if( descending )
|
if( descending )
|
||||||
prevSortCol = -prevSortCol;
|
prevSortCol = -prevSortCol;
|
||||||
std::cerr << __FILE__ << ':' << __LINE__ << " sort col is " << prevSortCol << std::endl;
|
|
||||||
Rebuild ();
|
Rebuild ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,7 +527,6 @@ void
|
||||||
TorrentListCtrl :: Add( const torrents_t& add )
|
TorrentListCtrl :: Add( const torrents_t& add )
|
||||||
{
|
{
|
||||||
myTorrents.insert( myTorrents.end(), add.begin(), add.end() );
|
myTorrents.insert( myTorrents.end(), add.begin(), add.end() );
|
||||||
std::cerr << " myTorrents.size() " << myTorrents.size() << std::endl;
|
|
||||||
Repopulate ();
|
Repopulate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ enum
|
||||||
|
|
||||||
void MyFrame :: OnOpen( wxCommandEvent& event )
|
void MyFrame :: OnOpen( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
const wxString key = _T("LastDirectory");
|
const wxString key = _T("prev-directory");
|
||||||
wxString directory;
|
wxString directory;
|
||||||
myConfig->Read( key, &directory );
|
myConfig->Read( key, &directory );
|
||||||
wxFileDialog * w = new wxFileDialog( this, _T("message"),
|
wxFileDialog * w = new wxFileDialog( this, _T("message"),
|
||||||
|
|
Loading…
Reference in a new issue