Diffstat (limited to 'noncore/apps/opie-console/profilemanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index 6ad08b5..e66ebcc 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp | |||
@@ -1,3 +1,7 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | #include <qfile.h> | ||
1 | 5 | ||
2 | #include <qpe/config.h> | 6 | #include <qpe/config.h> |
3 | 7 | ||
@@ -30,6 +34,7 @@ void ProfileManager::load() { | |||
30 | prof.setName( conf.readEntry("name") ); | 34 | prof.setName( conf.readEntry("name") ); |
31 | prof.setIOLayer( conf.readEntry("iolayer").utf8() ); | 35 | prof.setIOLayer( conf.readEntry("iolayer").utf8() ); |
32 | prof.setTerminalName( conf.readEntry("term").utf8() ); | 36 | prof.setTerminalName( conf.readEntry("term").utf8() ); |
37 | qWarning(" %s %s", conf.readEntry("iolayer").latin1(), prof.ioLayerName().data() ); | ||
33 | prof.setBackground( conf.readNumEntry("back") ); | 38 | prof.setBackground( conf.readNumEntry("back") ); |
34 | prof.setForeground( conf.readNumEntry("fore") ); | 39 | prof.setForeground( conf.readNumEntry("fore") ); |
35 | prof.setTerminal( conf.readNumEntry("terminal") ); | 40 | prof.setTerminal( conf.readNumEntry("terminal") ); |
@@ -60,13 +65,13 @@ Session* ProfileManager::fromProfile( const Profile& prof) { | |||
60 | return session; | 65 | return session; |
61 | } | 66 | } |
62 | void ProfileManager::save( ) { | 67 | void ProfileManager::save( ) { |
68 | QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); | ||
63 | ProfileConfig conf("opie-console-profiles"); | 69 | ProfileConfig conf("opie-console-profiles"); |
64 | conf.clearAll(); | ||
65 | Profile::ValueList::Iterator it; | 70 | Profile::ValueList::Iterator it; |
66 | for (it = m_list.begin(); it != m_list.end(); ++it ) { | 71 | for (it = m_list.begin(); it != m_list.end(); ++it ) { |
67 | conf.setGroup( (*it).name() ); | 72 | conf.setGroup( (*it).name() ); |
68 | conf.writeEntry( "name", (*it).name() ); | 73 | conf.writeEntry( "name", (*it).name() ); |
69 | conf.writeEntry( "ioplayer", QString::fromUtf8( (*it).ioLayerName() ) ); | 74 | conf.writeEntry( "iolayer", QString::fromUtf8( (*it).ioLayerName() ) ); |
70 | conf.writeEntry( "term", QString::fromUtf8( (*it).terminalName() ) ); | 75 | conf.writeEntry( "term", QString::fromUtf8( (*it).terminalName() ) ); |
71 | conf.writeEntry( "back", (*it).background() ); | 76 | conf.writeEntry( "back", (*it).background() ); |
72 | conf.writeEntry( "fore", (*it).foreground() ); | 77 | conf.writeEntry( "fore", (*it).foreground() ); |