cleanup preferences file keys

This commit is contained in:
Charles Kerr 2007-07-23 15:33:04 +00:00
parent 9296e088f3
commit d2401c0a5e
2 changed files with 4 additions and 6 deletions

View File

@ -97,10 +97,10 @@ namespace
int_v getTorrentColumns( wxConfig * config )
{
const wxString key = _T("TorrentListColumns");
const wxString key = _T("torrent-list-columns");
wxString columnStr;
if( !config->Read( key, &columnStr ) )
columnStr = _T("name|download-speed|upload-speed|eta|peers|size|done|status|seeds");
if( !config->Read( key, &columnStr, _T("name|download-speed|upload-speed|eta|peers|size|done|status|seeds") ) )
config->Write( key, columnStr );
int_v cols;
while( !columnStr.IsEmpty() )
@ -184,7 +184,6 @@ TorrentListCtrl :: TorrentListCtrl( tr_handle_t * handle,
myConfig->Read( _T("torrent-sort-is-descending"), &descending, FALSE );
if( descending )
prevSortCol = -prevSortCol;
std::cerr << __FILE__ << ':' << __LINE__ << " sort col is " << prevSortCol << std::endl;
Rebuild ();
}
@ -528,7 +527,6 @@ void
TorrentListCtrl :: Add( const torrents_t& add )
{
myTorrents.insert( myTorrents.end(), add.begin(), add.end() );
std::cerr << " myTorrents.size() " << myTorrents.size() << std::endl;
Repopulate ();
}

View File

@ -83,7 +83,7 @@ enum
void MyFrame :: OnOpen( wxCommandEvent& event )
{
const wxString key = _T("LastDirectory");
const wxString key = _T("prev-directory");
wxString directory;
myConfig->Read( key, &directory );
wxFileDialog * w = new wxFileDialog( this, _T("message"),