summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
authorharlekin <harlekin>2002-10-15 10:46:40 (UTC)
committer harlekin <harlekin>2002-10-15 10:46:40 (UTC)
commitdaae7a75b0e9ccbf1ea4c699c631ad77825e6301 (patch) (unidiff)
tree94bd75c58f42d8752b62a2281a5175a8e746f9ff /noncore/apps/opie-console/mainwindow.cpp
parente09b7ab685d29eba947c3bb021192408acae70be (diff)
downloadopie-daae7a75b0e9ccbf1ea4c699c631ad77825e6301.zip
opie-daae7a75b0e9ccbf1ea4c699c631ad77825e6301.tar.gz
opie-daae7a75b0e9ccbf1ea4c699c631ad77825e6301.tar.bz2
- more menu handling \n - added 2 more color shemes
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp31
1 files changed, 22 insertions, 9 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 6dc9e6e..b770551 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -314,15 +314,20 @@ void MainWindow::slotRunScript() {
314void MainWindow::slotConnect() { 314void MainWindow::slotConnect() {
315 if ( currentSession() ) { 315 if ( currentSession() ) {
316 bool ret = currentSession()->layer()->open(); 316 bool ret = currentSession()->layer()->open();
317 if(!ret) QMessageBox::warning(currentSession()->widgetStack(), 317 if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
318 QObject::tr("Failed"), 318 QObject::tr("Failed"),
319 QObject::tr("Connecting failed for this session.")); 319 QObject::tr("Connecting failed for this session."));
320 } 320 m_connect->setEnabled( false );
321 m_disconnect->setEnabled( true );
322 }
321} 323}
322 324
323void MainWindow::slotDisconnect() { 325void MainWindow::slotDisconnect() {
324 if ( currentSession() ) 326 if ( currentSession() ) {
325 currentSession()->layer()->close(); 327 currentSession()->layer()->close();
328 m_connect->setEnabled( true );
329 m_disconnect->setEnabled( false );
330 }
326} 331}
327 332
328void MainWindow::slotTerminate() { 333void MainWindow::slotTerminate() {
@@ -405,7 +410,7 @@ void MainWindow::create( const Profile& prof ) {
405 410
406 // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it 411 // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it
407 m_connect->setEnabled( true ); 412 m_connect->setEnabled( true );
408 m_disconnect->setEnabled( true ); 413 m_disconnect->setEnabled( false );
409 m_terminate->setEnabled( true ); 414 m_terminate->setEnabled( true );
410 m_transfer->setEnabled( true ); 415 m_transfer->setEnabled( true );
411 m_recordScript->setEnabled( true ); 416 m_recordScript->setEnabled( true );
@@ -417,11 +422,11 @@ void MainWindow::create( const Profile& prof ) {
417 422
418void MainWindow::slotTransfer() 423void MainWindow::slotTransfer()
419{ 424{
420 // if ( currentSession() ) { 425 if ( currentSession() ) {
421 TransferDialog dlg(this); 426 TransferDialog dlg(this);
422 dlg.showMaximized(); 427 dlg.showMaximized();
423 dlg.exec(); 428 dlg.exec();
424 // } 429 }
425} 430}
426 431
427 432
@@ -435,6 +440,14 @@ void MainWindow::slotSessionChanged( Session* ses ) {
435 if ( ses ) { 440 if ( ses ) {
436 qWarning("changing %s", ses->name().latin1() ); 441 qWarning("changing %s", ses->name().latin1() );
437 m_curSession = ses; 442 m_curSession = ses;
443
444 if ( m_curSession->isConnected() ) {
445 m_connect->setEnabled( false );
446 m_disconnect->setEnabled( true );
447 } else {
448 m_connect->setEnabled( true );
449 m_disconnect->setEnabled( false );
450 }
438 } 451 }
439} 452}
440 453
@@ -455,7 +468,7 @@ void MainWindow::slotFullscreen() {
455 ( m_curSession->widgetStack() )->setFocus(); 468 ( m_curSession->widgetStack() )->setFocus();
456 ( m_curSession->widgetStack() )->show(); 469 ( m_curSession->widgetStack() )->show();
457 470
458 // QPushButton *cornerButton = new QPushButton( this ); 471 //QPushButton *cornerButton = new QPushButton( );
459 //cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); 472 //cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) );
460 //connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 473 //connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
461 // need teh scrollbar 474 // need teh scrollbar