summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditordialog.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 094c871..b709cf3 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -106,28 +106,24 @@ void ProfileEditorDialog::initUI()
106 list = m_fact->terminalWidgets(); 106 list = m_fact->terminalWidgets();
107 for (it =list.begin(); it != list.end(); ++it ) { 107 for (it =list.begin(); it != list.end(); ++it ) {
108 m_termCmb->insertItem( (*it) ); 108 m_termCmb->insertItem( (*it) );
109 } 109 }
110 110
111 // load profile values 111 // load profile values
112 m_name->setText(m_prof.name()); 112 m_name->setText(m_prof.name());
113 slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); 113 slotConActivated( m_fact->external(m_prof.ioLayerName() ) );
114 slotTermActivated( m_fact->external(m_prof.terminalName() ) ); 114 slotTermActivated( m_fact->external(m_prof.terminalName() ) );
115 setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); 115 setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb );
116 setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); 116 setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb );
117 117
118 qWarning("Layer: %s %s", m_prof.ioLayerName().data(),
119 m_fact->external(m_prof.ioLayerName() ).latin1() );
120 qWarning("Term: %s %s", m_prof.terminalName().data(),
121 m_fact->external(m_prof.terminalName() ).latin1() );
122 118
123 // signal and slots 119 // signal and slots
124 connect(m_conCmb, SIGNAL(activated(const QString& ) ), 120 connect(m_conCmb, SIGNAL(activated(const QString& ) ),
125 this, SLOT(slotConActivated(const QString&) ) ); 121 this, SLOT(slotConActivated(const QString&) ) );
126 connect(m_termCmb, SIGNAL(activated(const QString& ) ), 122 connect(m_termCmb, SIGNAL(activated(const QString& ) ),
127 this, SLOT(slotTermActivated(const QString& ) ) ); 123 this, SLOT(slotTermActivated(const QString& ) ) );
128 124
129} 125}
130 126
131ProfileEditorDialog::~ProfileEditorDialog() { 127ProfileEditorDialog::~ProfileEditorDialog() {
132 128
133} 129}
@@ -138,26 +134,24 @@ void ProfileEditorDialog::accept()
138 QMessageBox::information(this, 134 QMessageBox::information(this,
139 QObject::tr("Invalid profile"), 135 QObject::tr("Invalid profile"),
140 QObject::tr("Please enter a profile name.")); 136 QObject::tr("Please enter a profile name."));
141 return; 137 return;
142 } 138 }
143 // Save profile and plugin profile 139 // Save profile and plugin profile
144 //if(plugin_plugin) plugin_plugin->save(); 140 //if(plugin_plugin) plugin_plugin->save();
145 141
146 // Save general values 142 // Save general values
147 m_prof.setName(profName()); 143 m_prof.setName(profName());
148 m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) ); 144 m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) );
149 m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); 145 m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) );
150 qWarning("Term %s %s", m_fact->internal(m_termCmb->currentText() ).data(),
151 m_termCmb->currentText().latin1() );
152 146
153 if (m_con ) 147 if (m_con )
154 m_con->save( m_prof ); 148 m_con->save( m_prof );
155 if (m_term ) 149 if (m_term )
156 m_term->save( m_prof ); 150 m_term->save( m_prof );
157 151
158 QDialog::accept(); 152 QDialog::accept();
159} 153}
160 154
161 155
162QString ProfileEditorDialog::profName()const 156QString ProfileEditorDialog::profName()const
163{ 157{
@@ -181,20 +175,19 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) {
181 175
182 if (m_con ) { 176 if (m_con ) {
183 m_con->load( m_prof ); 177 m_con->load( m_prof );
184 m_layCon->addWidget( m_con ); 178 m_layCon->addWidget( m_con );
185 } 179 }
186} 180}
187/* 181/*
188 * we need to switch the widget 182 * we need to switch the widget
189 */ 183 */
190void ProfileEditorDialog::slotTermActivated( const QString& str ) { 184void ProfileEditorDialog::slotTermActivated( const QString& str ) {
191 delete m_term; 185 delete m_term;
192 m_term = m_fact->newTerminalPlugin( str, m_tabTerm ); 186 m_term = m_fact->newTerminalPlugin( str, m_tabTerm );
193 qWarning("past");
194 187
195 if (m_term) { 188 if (m_term) {
196 m_term->load(m_prof ); 189 m_term->load(m_prof );
197 m_layTerm->addWidget( m_term ); 190 m_layTerm->addWidget( m_term );
198 } 191 }
199} 192}
200 193