From d2401c0a5e350987f010417586525e837fde10a6 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 23 Jul 2007 15:33:04 +0000 Subject: [PATCH] cleanup preferences file keys --- wx/torrent-list.cc | 8 +++----- wx/xmission.cc | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/wx/torrent-list.cc b/wx/torrent-list.cc index 15fba6666..af0781270 100644 --- a/wx/torrent-list.cc +++ b/wx/torrent-list.cc @@ -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 (); } diff --git a/wx/xmission.cc b/wx/xmission.cc index cbd73a81a..f76c914df 100755 --- a/wx/xmission.cc +++ b/wx/xmission.cc @@ -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"),