-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 9be4674..275a9a8 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -595,53 +595,51 @@ void Konsole::changeColumns(int columns) | |||
595 | 595 | ||
596 | //FIXME: If a child dies during session swap, | 596 | //FIXME: If a child dies during session swap, |
597 | // this routine might be called before | 597 | // this routine might be called before |
598 | // session swap is completed. | 598 | // session swap is completed. |
599 | 599 | ||
600 | void Konsole::doneSession(TESession*, int ) | 600 | void Konsole::doneSession(TESession*, int ) |
601 | { | 601 | { |
602 | TEWidget *te = getTe(); | 602 | TEWidget *te = getTe(); |
603 | if (te != 0) { | 603 | if (te != 0) { |
604 | te->currentSession->setConnect(FALSE); | 604 | te->currentSession->setConnect(FALSE); |
605 | tab->removeTab(te); | 605 | tab->removeTab(te); |
606 | delete te->currentSession; | 606 | delete te->currentSession; |
607 | delete te; | 607 | delete te; |
608 | nsessions--; | 608 | nsessions--; |
609 | } | 609 | } |
610 | 610 | ||
611 | if (nsessions == 0) { | 611 | if (nsessions == 0) { |
612 | close(); | 612 | close(); |
613 | } | 613 | } |
614 | } | 614 | } |
615 | 615 | ||
616 | void Konsole::newSession() { | 616 | void Konsole::newSession() { |
617 | if(nsessions < 15) { // seems to be something weird about 16 tabs on the Zaurus.... memory? | 617 | if(nsessions < 15) { // seems to be something weird about 16 tabs on the Zaurus.... memory? |
618 | TEWidget* te = new TEWidget(tab); | 618 | TEWidget* te = new TEWidget(tab); |
619 | if(nsessions == 0) { //set this the first time only | 619 | Config c("Konsole"); |
620 | Config c("Konsole"); | 620 | c.setGroup("Menubar"); |
621 | c.setGroup("Menubar"); | 621 | te->useBeep=c.readBoolEntry("useBeep",0); |
622 | te->useBeep=c.readBoolEntry("useBeep",0); | ||
623 | } | ||
624 | 622 | ||
625 | // te->setBackgroundMode(PaletteBase); //we want transparent!! | 623 | // te->setBackgroundMode(PaletteBase); //we want transparent!! |
626 | te->setVTFont(fonts.at(cfont)->getFont()); | 624 | te->setVTFont(fonts.at(cfont)->getFont()); |
627 | tab->addTab(te); | 625 | tab->addTab(te); |
628 | TESession* se = new TESession(this, te, se_pgm, se_args, "xterm"); | 626 | TESession* se = new TESession(this, te, se_pgm, se_args, "xterm"); |
629 | te->currentSession = se; | 627 | te->currentSession = se; |
630 | connect( se, SIGNAL(done(TESession*,int)), this, SLOT(doneSession(TESession*,int)) ); | 628 | connect( se, SIGNAL(done(TESession*,int)), this, SLOT(doneSession(TESession*,int)) ); |
631 | se->run(); | 629 | se->run(); |
632 | se->setConnect(TRUE); | 630 | se->setConnect(TRUE); |
633 | se->setHistory(b_scroll); | 631 | se->setHistory(b_scroll); |
634 | tab->setCurrentPage(nsessions); | 632 | tab->setCurrentPage(nsessions); |
635 | nsessions++; | 633 | nsessions++; |
636 | doWrap(); | 634 | doWrap(); |
637 | setColor(); | 635 | setColor(); |
638 | } | 636 | } |
639 | } | 637 | } |
640 | 638 | ||
641 | TEWidget* Konsole::getTe() { | 639 | TEWidget* Konsole::getTe() { |
642 | if (nsessions) { | 640 | if (nsessions) { |
643 | return (TEWidget *) tab->currentPage(); | 641 | return (TEWidget *) tab->currentPage(); |
644 | } else { | 642 | } else { |
645 | return 0; | 643 | return 0; |
646 | } | 644 | } |
647 | } | 645 | } |