summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-26 11:53:47 (UTC)
committer harlekin <harlekin>2002-10-26 11:53:47 (UTC)
commit88504fa6ed3e4ec1c11d3e1cde13c821b1a9b846 (patch) (unidiff)
treeb3acc8683f44c7fa960c4d422ae781ed7b854f65
parent2dc92ada34785bbfff8ca1202e4d53eb0606c362 (diff)
downloadopie-88504fa6ed3e4ec1c11d3e1cde13c821b1a9b846.zip
opie-88504fa6ed3e4ec1c11d3e1cde13c821b1a9b846.tar.gz
opie-88504fa6ed3e4ec1c11d3e1cde13c821b1a9b846.tar.bz2
only enable tranfer if layer supports it
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 5f6dc12..e3c3c38 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -447,13 +447,20 @@ void MainWindow::slotConnect() {
447 if(!ret) QMessageBox::warning(currentSession()->widgetStack(), 447 if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
448 QObject::tr("Failed"), 448 QObject::tr("Failed"),
449 QObject::tr("Connecting failed for this session.")); 449 QObject::tr("Connecting failed for this session."));
450 else { 450 else {
451 m_connect->setEnabled( false ); 451 m_connect->setEnabled( false );
452 m_disconnect->setEnabled( true ); 452 m_disconnect->setEnabled( true );
453 m_transfer->setEnabled( true ); 453
454 // if it does not support file transfer, disable the menu entry
455 if ( ( m_curSession->layer() )->supports()[1] == 0 ) {
456 m_transfer->setEnabled( false );
457 } else {
458 m_transfer->setEnabled( true );
459 }
460
454 m_recordScript->setEnabled( true ); 461 m_recordScript->setEnabled( true );
455 m_scripts->setItemEnabled(m_runScript_id, true); 462 m_scripts->setItemEnabled(m_runScript_id, true);
456 } 463 }
457 } 464 }
458} 465}
459 466
@@ -568,13 +575,12 @@ void MainWindow::create( const Profile& prof ) {
568 //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { 575 //if ( ( m_curSession->layer() )->supports()[0] == 1 ) {
569 if (prof.autoConnect()) { 576 if (prof.autoConnect()) {
570 slotConnect(); 577 slotConnect();
571 } 578 }
572 579
573 580
574
575 QWidget *w = currentSession()->widget(); 581 QWidget *w = currentSession()->widget();
576 if(w) w->setFocus(); 582 if(w) w->setFocus();
577 583
578 m_kb->load(currentSession()->profile()); 584 m_kb->load(currentSession()->profile());
579} 585}
580 586