Mercurial > mercurial > hgweb_searcher2.cgi
comparison src/main.cpp @ 16:b67c74848dd0
fix bugs.
| author | pyon@macmini |
|---|---|
| date | Sat, 09 Jul 2011 08:30:00 +0900 |
| parents | 24e0775af32e |
| children | 710be7b6a873 |
comparison
equal
deleted
inserted
replaced
| 15:168531d2c45f | 16:b67c74848dd0 |
|---|---|
| 1 // Filename : main.cpp | 1 // Filename : main.cpp |
| 2 // Last Change: 22-Jun-2011. | 2 // Last Change: 06-Jul-2011. |
| 3 // | 3 // |
| 4 | 4 |
| 5 #include "common.h" | 5 #include "common.h" |
| 6 #include "main.h" | 6 #include "main.h" |
| 7 #include "myframe.h" | 7 #include "myframe.h" |
| 46 config->Write( wxT("w"), rect.width ); | 46 config->Write( wxT("w"), rect.width ); |
| 47 config->Write( wxT("h"), rect.height ); | 47 config->Write( wxT("h"), rect.height ); |
| 48 | 48 |
| 49 wxString key; | 49 wxString key; |
| 50 config->SetPath( wxT("/SearchHistory") ); | 50 config->SetPath( wxT("/SearchHistory") ); |
| 51 for ( int i=0; i<5; i++ ) { | 51 for ( int i=0; i<10; i++ ) { |
| 52 key.Printf( wxT("h%02d"), i ); | 52 key.Printf( wxT("h%02d"), i ); |
| 53 config->Write( key, searchhist[i] ); | 53 config->Write( key, searchhist[i] ); |
| 54 } | 54 } |
| 55 | |
| 56 | 55 |
| 57 delete config; | 56 delete config; |
| 58 | 57 |
| 59 return 0; | 58 return 0; |
| 60 } | 59 } |
| 71 config->Read( wxT("h"), &rect.height ); | 70 config->Read( wxT("h"), &rect.height ); |
| 72 | 71 |
| 73 wxString key; | 72 wxString key; |
| 74 wxString value; | 73 wxString value; |
| 75 config->SetPath( wxT("/SearchHistory") ); | 74 config->SetPath( wxT("/SearchHistory") ); |
| 76 for ( int i=0; i<5; i++ ) { | 75 for ( int i=0; i<10; i++ ) { |
| 77 key.Printf( wxT("h%02d"), i ); | 76 key.Printf( wxT("h%02d"), i ); |
| 78 config->Read( key, &value ); | 77 config->Read( key, &value ); |
| 79 searchhist.Add( value ); | 78 searchhist.Add( value ); |
| 80 } | 79 } |
| 81 | 80 |
