-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 70acc42..9be4674 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -363,32 +363,33 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
363 | connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); | 363 | connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); |
364 | 364 | ||
365 | scrollMenu->insertItem(tr( "None" )); | 365 | scrollMenu->insertItem(tr( "None" )); |
366 | scrollMenu->insertItem(tr( "Left" )); | 366 | scrollMenu->insertItem(tr( "Left" )); |
367 | scrollMenu->insertItem(tr( "Right" )); | 367 | scrollMenu->insertItem(tr( "Right" )); |
368 | // scrollMenu->insertSeparator(4); | 368 | // scrollMenu->insertSeparator(4); |
369 | // scrollMenu->insertItem(tr( "Horizontal" )); | 369 | // scrollMenu->insertItem(tr( "Horizontal" )); |
370 | 370 | ||
371 | configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); | 371 | configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); |
372 | 372 | ||
373 | int jut = configMenu->insertItem(tr( "Wrap" )); | 373 | int jut = configMenu->insertItem(tr( "Wrap" )); |
374 | cfg.setGroup("ScrollBar"); | 374 | cfg.setGroup("ScrollBar"); |
375 | configMenu->setItemChecked(jut, cfg.readBoolEntry("HorzScroll",0)); | 375 | configMenu->setItemChecked(jut, cfg.readBoolEntry("HorzScroll",0)); |
376 | 376 | ||
377 | jut = configMenu->insertItem(tr( "Use Beep" )); | 377 | jut = configMenu->insertItem(tr( "Use Beep" )); |
378 | cfg.setGroup("Menubar"); | 378 | cfg.setGroup("Menubar"); |
379 | |||
379 | configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0)); | 380 | configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0)); |
380 | 381 | ||
381 | 382 | ||
382 | //scrollMenuSelected(-29); | 383 | //scrollMenuSelected(-29); |
383 | // cfg.setGroup("ScrollBar"); | 384 | // cfg.setGroup("ScrollBar"); |
384 | // if(cfg.readBoolEntry("HorzScroll",0)) { | 385 | // if(cfg.readBoolEntry("HorzScroll",0)) { |
385 | // if(cfg.readNumEntry("Position",2) == 0) | 386 | // if(cfg.readNumEntry("Position",2) == 0) |
386 | // te->setScrollbarLocation(1); | 387 | // te->setScrollbarLocation(1); |
387 | // else | 388 | // else |
388 | // te->setScrollbarLocation(0); | 389 | // te->setScrollbarLocation(0); |
389 | // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); | 390 | // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); |
390 | // te->setWrapAt(120); | 391 | // te->setWrapAt(120); |
391 | // } | 392 | // } |
392 | // create applications ///////////////////////////////////////////////////// | 393 | // create applications ///////////////////////////////////////////////////// |
393 | setCentralWidget(tab); | 394 | setCentralWidget(tab); |
394 | 395 | ||
@@ -602,32 +603,38 @@ void Konsole::doneSession(TESession*, int ) | |||
602 | if (te != 0) { | 603 | if (te != 0) { |
603 | te->currentSession->setConnect(FALSE); | 604 | te->currentSession->setConnect(FALSE); |
604 | tab->removeTab(te); | 605 | tab->removeTab(te); |
605 | delete te->currentSession; | 606 | delete te->currentSession; |
606 | delete te; | 607 | delete te; |
607 | nsessions--; | 608 | nsessions--; |
608 | } | 609 | } |
609 | 610 | ||
610 | if (nsessions == 0) { | 611 | if (nsessions == 0) { |
611 | close(); | 612 | close(); |
612 | } | 613 | } |
613 | } | 614 | } |
614 | 615 | ||
615 | void Konsole::newSession() { | 616 | void Konsole::newSession() { |
616 | 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? |
617 | TEWidget* te = new TEWidget(tab); | 618 | TEWidget* te = new TEWidget(tab); |
619 | if(nsessions == 0) { //set this the first time only | ||
620 | Config c("Konsole"); | ||
621 | c.setGroup("Menubar"); | ||
622 | te->useBeep=c.readBoolEntry("useBeep",0); | ||
623 | } | ||
624 | |||
618 | // te->setBackgroundMode(PaletteBase); //we want transparent!! | 625 | // te->setBackgroundMode(PaletteBase); //we want transparent!! |
619 | te->setVTFont(fonts.at(cfont)->getFont()); | 626 | te->setVTFont(fonts.at(cfont)->getFont()); |
620 | tab->addTab(te); | 627 | tab->addTab(te); |
621 | TESession* se = new TESession(this, te, se_pgm, se_args, "xterm"); | 628 | TESession* se = new TESession(this, te, se_pgm, se_args, "xterm"); |
622 | te->currentSession = se; | 629 | te->currentSession = se; |
623 | connect( se, SIGNAL(done(TESession*,int)), this, SLOT(doneSession(TESession*,int)) ); | 630 | connect( se, SIGNAL(done(TESession*,int)), this, SLOT(doneSession(TESession*,int)) ); |
624 | se->run(); | 631 | se->run(); |
625 | se->setConnect(TRUE); | 632 | se->setConnect(TRUE); |
626 | se->setHistory(b_scroll); | 633 | se->setHistory(b_scroll); |
627 | tab->setCurrentPage(nsessions); | 634 | tab->setCurrentPage(nsessions); |
628 | nsessions++; | 635 | nsessions++; |
629 | doWrap(); | 636 | doWrap(); |
630 | setColor(); | 637 | setColor(); |
631 | } | 638 | } |
632 | } | 639 | } |
633 | 640 | ||