summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/krfboptions.cpp
Side-by-side diff
Diffstat (limited to 'noncore/comm/keypebble/krfboptions.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/krfboptions.cpp48
1 files changed, 26 insertions, 22 deletions
diff --git a/noncore/comm/keypebble/krfboptions.cpp b/noncore/comm/keypebble/krfboptions.cpp
index 9daf3f0..8c4320b 100644
--- a/noncore/comm/keypebble/krfboptions.cpp
+++ b/noncore/comm/keypebble/krfboptions.cpp
@@ -4,38 +4,42 @@
KRFBOptions::KRFBOptions()
{
- Config config( "keypebble" );
- readSettings( &config );
+ readSettings();
}
KRFBOptions::~KRFBOptions()
{
- Config config( "keypebble" );
- writeSettings( &config );
+ writeSettings();
}
-void KRFBOptions::readSettings( Config *config )
+void KRFBOptions::readSettings()
{
- hexTile = config->readBoolEntry( "HexTile" );
- corre = config->readBoolEntry( "CORRE" );
- rre = config->readBoolEntry( "RRE" );
- copyrect = config->readBoolEntry( "CopyRect", true );
- colors256 = config->readBoolEntry( "Colors256" );
- shared = config->readBoolEntry( "Shared" );
- readOnly = config->readBoolEntry( "ReadOnly" );
- updateRate = config->readNumEntry( "UpdateRate", 50 );
+ Config config( "keypebble" );
+ config.setGroup("Settings");
+ hexTile = config.readBoolEntry( "HexTile", 0 );
+ corre = config.readBoolEntry( "CORRE", 0 );
+ rre = config.readBoolEntry( "RRE", 0 );
+ copyrect = config.readBoolEntry( "CopyRect", 1 );
+ colors256 = config.readBoolEntry( "Colors256", 0 );
+ shared = config.readBoolEntry( "Shared", 0 );
+ readOnly = config.readBoolEntry( "ReadOnly", 0 );
+ updateRate = config.readNumEntry( "UpdateRate", 50 );
+ deIconify = config.readBoolEntry( "DeIconify", 0 );
}
-void KRFBOptions::writeSettings( Config *config )
+void KRFBOptions::writeSettings()
{
- config->writeEntry( "HexTile", hexTile );
- config->writeEntry( "CORRE", corre );
- config->writeEntry( "RRE", rre );
- config->writeEntry( "CopyRect", copyrect );
- config->writeEntry( "Colors256", colors256 );
- config->writeEntry( "Shared", shared );
- config->writeEntry( "ReadOnly", readOnly );
- config->writeEntry( "UpdateRate", updateRate );
+ Config config( "keypebble" );
+ config.setGroup("Settings");
+ config.writeEntry( "HexTile", hexTile );
+ config.writeEntry( "CORRE", corre );
+ config.writeEntry( "RRE", rre );
+ config.writeEntry( "CopyRect", copyrect );
+ config.writeEntry( "Colors256", colors256 );
+ config.writeEntry( "Shared", shared );
+ config.writeEntry( "ReadOnly", readOnly );
+ config.writeEntry( "UpdateRate", updateRate );
+ config.writeEntry( "DeIconify", deIconify );
}
int KRFBOptions::encodings()