Mercurial > mercurial > hgweb_madnm.cgi
comparison src/appconf.cpp @ 1:f40a65687079
small fix.
author | pyon@macmini |
---|---|
date | Mon, 10 Jun 2019 05:56:36 +0900 |
parents | 2f5584f0d127 |
children |
comparison
equal
deleted
inserted
replaced
0:2f5584f0d127 | 1:f40a65687079 |
---|---|
1 // Filename : appconf.cpp | 1 // Filename : appconf.cpp |
2 // Last Change: 2019-06-07 ‹à 14:38:53. | 2 // Last Change: 2019-06-09 Sun 16:56:39. |
3 // | 3 // |
4 #include "appconf.h" | 4 #include "appconf.h" |
5 #include "util.h" | 5 #include "util.h" |
6 | 6 |
7 AppConf::AppConf() | 7 AppConf::AppConf() |
46 delete config; | 46 delete config; |
47 | 47 |
48 return Geo2Rect( buf ); | 48 return Geo2Rect( buf ); |
49 } | 49 } |
50 | 50 |
51 wxString AppConf::LoadWork( void ) | |
52 { | |
53 wxString dir; | |
54 config->SetPath( "/Misc" ); | |
55 config->Read( "workdir", &dir ); | |
56 | |
57 delete config; | |
58 | |
59 return dir; | |
60 } | |
61 | |
62 wxString AppConf::LoadScanner( void ) | |
63 { | |
64 wxString scan; | |
65 config->SetPath( "/Misc" ); | |
66 config->Read( "scanner", &scan ); | |
67 | |
68 delete config; | |
69 | |
70 return scan; | |
71 } | |
72 | |
51 | 73 |
52 /* Save */ | 74 /* Save */ |
53 void AppConf::SaveRect( wxRect rect ) | 75 void AppConf::SaveRect( wxRect rect ) |
54 { | 76 { |
55 config->SetPath( "/Geometry" ); | 77 config->SetPath( "/Geometry" ); |
56 config->Write( "geo", Rect2Geo( rect ) ); | 78 config->Write( "geo", Rect2Geo( rect ) ); |
57 | 79 |
58 delete config; | 80 delete config; |
59 } | 81 } |
60 | 82 |
83 void AppConf::SaveWork( wxString dir ) | |
84 { | |
85 config->SetPath( "/Misc" ); | |
86 config->Write( "workdir", dir ); | |
87 | |
88 delete config; | |
89 } | |
90 |