summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index b403b4d..b160604 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -9,6 +9,7 @@
9#include "function_keyboard.h" 9#include "function_keyboard.h"
10#include "emulation_handler.h" 10#include "emulation_handler.h"
11#include "script.h" 11#include "script.h"
12#include "fixit.h"
12 13
13/* OPIE */ 14/* OPIE */
14#include <opie2/odebug.h> 15#include <opie2/odebug.h>
@@ -29,6 +30,12 @@ using namespace Opie::Ui;
29#include <assert.h> 30#include <assert.h>
30 31
31MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 32MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
33#ifdef FSCKED_DISTRI
34 FixIt fix;
35 fix.fixIt();
36#endif
37
38 setCaption(QObject::tr("Opie Console") );
32 KeyTrans::loadAll(); 39 KeyTrans::loadAll();
33 for (int i = 0; i < KeyTrans::count(); i++ ) { 40 for (int i = 0; i < KeyTrans::count(); i++ ) {
34 KeyTrans* s = KeyTrans::find(i ); 41 KeyTrans* s = KeyTrans::find(i );
@@ -298,6 +305,10 @@ void MainWindow::populateScripts() {
298MainWindow::~MainWindow() { 305MainWindow::~MainWindow() {
299 delete m_factory; 306 delete m_factory;
300 manager()->save(); 307 manager()->save();
308#ifdef FSCKED_DISTRI
309 FixIt fix;
310 fix.breakIt();
311#endif
301} 312}
302 313
303MetaFactory* MainWindow::factory() { 314MetaFactory* MainWindow::factory() {
@@ -449,13 +460,13 @@ void MainWindow::slotClose() {
449 return; 460 return;
450 461
451 Session* ses = currentSession(); 462 Session* ses = currentSession();
452 owarn << "removing! currentSession " << currentSession()->name().latin1() << "" << oendl; 463 owarn << "removing! currentSession " << currentSession()->name().latin1() << "" << oendl;
453 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ 464 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */
454 m_curSession = NULL; 465 m_curSession = NULL;
455 tabWidget()->remove( /*currentSession()*/ses ); 466 tabWidget()->remove( /*currentSession()*/ses );
456 /*it's autodelete */ 467 /*it's autodelete */
457 m_sessions.remove( ses ); 468 m_sessions.remove( ses );
458 owarn << "after remove!!" << oendl; 469 owarn << "after remove!!" << oendl;
459 470
460 if (!currentSession() ) { 471 if (!currentSession() ) {
461 m_connect->setEnabled( false ); 472 m_connect->setEnabled( false );
@@ -573,7 +584,7 @@ void MainWindow::slotOpenButtons( bool state ) {
573 584
574 585
575void MainWindow::slotSessionChanged( Session* ses ) { 586void MainWindow::slotSessionChanged( Session* ses ) {
576 owarn << "changed!" << oendl; 587 owarn << "changed!" << oendl;
577 588
578 if(m_curSession) 589 if(m_curSession)
579 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 590 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
@@ -582,7 +593,7 @@ void MainWindow::slotSessionChanged( Session* ses ) {
582 593
583 if ( ses ) { 594 if ( ses ) {
584 m_curSession = ses; 595 m_curSession = ses;
585 odebug << QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) << oendl; 596 odebug << QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) << oendl;
586 if ( m_curSession->layer()->isConnected() ) { 597 if ( m_curSession->layer()->isConnected() ) {
587 m_connect->setEnabled( false ); 598 m_connect->setEnabled( false );
588 m_disconnect->setEnabled( true ); 599 m_disconnect->setEnabled( true );