summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profilemanager.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/profilemanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index 5d39d96..cad2567 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -90,12 +90,13 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) {
90 QWidget* dummy = new QHBox( stack ); 90 QWidget* dummy = new QHBox( stack );
91 stack->raiseWidget( dummy ); 91 stack->raiseWidget( dummy );
92 92
93 EmulationHandler* handler = new EmulationHandler(prof,dummy ); 93 EmulationHandler* handler = new EmulationHandler(prof,dummy );
94 session->setEmulationHandler( handler ); 94 session->setEmulationHandler( handler );
95 session->connect(); 95 session->connect();
96 session->setProfile( prof );
96 97
97 return session; 98 return session;
98} 99}
99void ProfileManager::save( ) { 100void ProfileManager::save( ) {
100 QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); 101 QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) );
101 ProfileConfig conf("opie-console-profiles"); 102 ProfileConfig conf("opie-console-profiles");
@@ -118,12 +119,15 @@ void ProfileManager::save( ) {
118 conf.writeEntry( "autoConnect", (*it2).autoConnect()); 119 conf.writeEntry( "autoConnect", (*it2).autoConnect());
119 conf.writeEntry( "back", (*it2).background() ); 120 conf.writeEntry( "back", (*it2).background() );
120 conf.writeEntry( "fore", (*it2).foreground() ); 121 conf.writeEntry( "fore", (*it2).foreground() );
121 conf.writeEntry( "terminal", (*it2).terminal() ); 122 conf.writeEntry( "terminal", (*it2).terminal() );
122 } 123 }
123} 124}
125void ProfileManager::add( const Profile& prof) {
126 m_list.append( prof );
127}
124void ProfileManager::setProfiles( const Profile::ValueList& list ) { 128void ProfileManager::setProfiles( const Profile::ValueList& list ) {
125 m_list = list; 129 m_list = list;
126}; 130};
127Profile ProfileManager::profile( const QString& name )const { 131Profile ProfileManager::profile( const QString& name )const {
128 Profile prof; 132 Profile prof;
129 Profile::ValueList::ConstIterator it; 133 Profile::ValueList::ConstIterator it;