Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index b770551..94c99bc 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -254,25 +254,24 @@ MetaFactory* MainWindow::factory() { | |||
254 | return m_factory; | 254 | return m_factory; |
255 | } | 255 | } |
256 | 256 | ||
257 | Session* MainWindow::currentSession() { | 257 | Session* MainWindow::currentSession() { |
258 | return m_curSession; | 258 | return m_curSession; |
259 | } | 259 | } |
260 | 260 | ||
261 | QList<Session> MainWindow::sessions() { | 261 | QList<Session> MainWindow::sessions() { |
262 | return m_sessions; | 262 | return m_sessions; |
263 | } | 263 | } |
264 | 264 | ||
265 | void MainWindow::slotNew() { | 265 | void MainWindow::slotNew() { |
266 | qWarning("New Connection"); | ||
267 | ProfileEditorDialog dlg(factory() ); | 266 | ProfileEditorDialog dlg(factory() ); |
268 | dlg.showMaximized(); | 267 | dlg.showMaximized(); |
269 | int ret = dlg.exec(); | 268 | int ret = dlg.exec(); |
270 | 269 | ||
271 | if ( ret == QDialog::Accepted ) { | 270 | if ( ret == QDialog::Accepted ) { |
272 | create( dlg.profile() ); | 271 | create( dlg.profile() ); |
273 | } | 272 | } |
274 | } | 273 | } |
275 | 274 | ||
276 | void MainWindow::slotRecordScript() { | 275 | void MainWindow::slotRecordScript() { |
277 | /* if (currentSession()) { | 276 | /* if (currentSession()) { |
278 | currentSession()->emulationLayer()->startRecording(); | 277 | currentSession()->emulationLayer()->startRecording(); |
@@ -330,46 +329,43 @@ void MainWindow::slotDisconnect() { | |||
330 | } | 329 | } |
331 | } | 330 | } |
332 | 331 | ||
333 | void MainWindow::slotTerminate() { | 332 | void MainWindow::slotTerminate() { |
334 | if ( currentSession() ) | 333 | if ( currentSession() ) |
335 | currentSession()->layer()->close(); | 334 | currentSession()->layer()->close(); |
336 | 335 | ||
337 | slotClose(); | 336 | slotClose(); |
338 | /* FIXME move to the next session */ | 337 | /* FIXME move to the next session */ |
339 | } | 338 | } |
340 | 339 | ||
341 | void MainWindow::slotConfigure() { | 340 | void MainWindow::slotConfigure() { |
342 | qWarning("configure"); | ||
343 | ConfigDialog conf( manager()->all(), factory() ); | 341 | ConfigDialog conf( manager()->all(), factory() ); |
344 | conf.showMaximized(); | 342 | conf.showMaximized(); |
345 | 343 | ||
346 | int ret = conf.exec(); | 344 | int ret = conf.exec(); |
347 | 345 | ||
348 | if ( QDialog::Accepted == ret ) { | 346 | if ( QDialog::Accepted == ret ) { |
349 | qWarning("conf %d", conf.list().count() ); | ||
350 | manager()->setProfiles( conf.list() ); | 347 | manager()->setProfiles( conf.list() ); |
351 | manager()->save(); | 348 | manager()->save(); |
352 | populateProfiles(); | 349 | populateProfiles(); |
353 | } | 350 | } |
354 | } | 351 | } |
355 | /* | 352 | /* |
356 | * we will remove | 353 | * we will remove |
357 | * this window from the tabwidget | 354 | * this window from the tabwidget |
358 | * remove it from the list | 355 | * remove it from the list |
359 | * delete it | 356 | * delete it |
360 | * and set the currentSession() | 357 | * and set the currentSession() |
361 | */ | 358 | */ |
362 | void MainWindow::slotClose() { | 359 | void MainWindow::slotClose() { |
363 | qWarning("close"); | ||
364 | if (!currentSession() ) | 360 | if (!currentSession() ) |
365 | return; | 361 | return; |
366 | 362 | ||
367 | tabWidget()->remove( currentSession() ); | 363 | tabWidget()->remove( currentSession() ); |
368 | /*it's autodelete */ | 364 | /*it's autodelete */ |
369 | m_sessions.remove( m_curSession ); | 365 | m_sessions.remove( m_curSession ); |
370 | m_curSession = m_sessions.first(); | 366 | m_curSession = m_sessions.first(); |
371 | tabWidget()->setCurrent( m_curSession ); | 367 | tabWidget()->setCurrent( m_curSession ); |
372 | 368 | ||
373 | if (!currentSession() ) { | 369 | if (!currentSession() ) { |
374 | m_connect->setEnabled( false ); | 370 | m_connect->setEnabled( false ); |
375 | m_disconnect->setEnabled( false ); | 371 | m_disconnect->setEnabled( false ); |
@@ -429,25 +425,24 @@ void MainWindow::slotTransfer() | |||
429 | } | 425 | } |
430 | } | 426 | } |
431 | 427 | ||
432 | 428 | ||
433 | void MainWindow::slotOpenKeb(bool state) { | 429 | void MainWindow::slotOpenKeb(bool state) { |
434 | 430 | ||
435 | if (state) m_keyBar->show(); | 431 | if (state) m_keyBar->show(); |
436 | else m_keyBar->hide(); | 432 | else m_keyBar->hide(); |
437 | 433 | ||
438 | } | 434 | } |
439 | void MainWindow::slotSessionChanged( Session* ses ) { | 435 | void MainWindow::slotSessionChanged( Session* ses ) { |
440 | if ( ses ) { | 436 | if ( ses ) { |
441 | qWarning("changing %s", ses->name().latin1() ); | ||
442 | m_curSession = ses; | 437 | m_curSession = ses; |
443 | 438 | ||
444 | if ( m_curSession->isConnected() ) { | 439 | if ( m_curSession->isConnected() ) { |
445 | m_connect->setEnabled( false ); | 440 | m_connect->setEnabled( false ); |
446 | m_disconnect->setEnabled( true ); | 441 | m_disconnect->setEnabled( true ); |
447 | } else { | 442 | } else { |
448 | m_connect->setEnabled( true ); | 443 | m_connect->setEnabled( true ); |
449 | m_disconnect->setEnabled( false ); | 444 | m_disconnect->setEnabled( false ); |
450 | } | 445 | } |
451 | } | 446 | } |
452 | } | 447 | } |
453 | 448 | ||