summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index eda3135..9c1167b 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -540,103 +540,103 @@ QSize Konsole::calcSize(int columns, int lines) {
540 540
541void Konsole::setColLin(int columns, int lines) 541void Konsole::setColLin(int columns, int lines)
542{ 542{
543 qDebug("konsole::setColLin:: Columns %d", columns); 543 qDebug("konsole::setColLin:: Columns %d", columns);
544 544
545 if ((columns==0) || (lines==0)) 545 if ((columns==0) || (lines==0))
546 { 546 {
547 if (defaultSize.isEmpty()) // not in config file : set default value 547 if (defaultSize.isEmpty()) // not in config file : set default value
548 { 548 {
549 defaultSize = calcSize(80,24); 549 defaultSize = calcSize(80,24);
550 // notifySize(24,80); // set menu items (strange arg order !) 550 // notifySize(24,80); // set menu items (strange arg order !)
551 } 551 }
552 resize(defaultSize); 552 resize(defaultSize);
553 } else { 553 } else {
554 resize(calcSize(columns, lines)); 554 resize(calcSize(columns, lines));
555 // notifySize(lines,columns); // set menu items (strange arg order !) 555 // notifySize(lines,columns); // set menu items (strange arg order !)
556 } 556 }
557} 557}
558 558
559/* 559/*
560void Konsole::setFont(int fontno) 560void Konsole::setFont(int fontno)
561{ 561{
562 QFont f; 562 QFont f;
563 if (fontno == 0) 563 if (fontno == 0)
564 f = defaultFont = QFont( "Helvetica", 12 ); 564 f = defaultFont = QFont( "Helvetica", 12 );
565 else 565 else
566 if (fonts[fontno][0] == '-') 566 if (fonts[fontno][0] == '-')
567 f.setRawName( fonts[fontno] ); 567 f.setRawName( fonts[fontno] );
568 else 568 else
569 { 569 {
570 f.setFamily(fonts[fontno]); 570 f.setFamily(fonts[fontno]);
571 f.setRawMode( TRUE ); 571 f.setRawMode( TRUE );
572 } 572 }
573 if ( !f.exactMatch() && fontno != 0) 573 if ( !f.exactMatch() && fontno != 0)
574 { 574 {
575 QString msg = i18n("Font `%1' not found.\nCheck README.linux.console for help.").arg(fonts[fontno]); 575 QString msg = i18n("Font `%1' not found.\nCheck README.linux.console for help.").arg(fonts[fontno]);
576 QMessageBox(this, msg); 576 QMessageBox(this, msg);
577 return; 577 return;
578 } 578 }
579 if (se) se->setFontNo(fontno); 579 if (se) se->setFontNo(fontno);
580 te->setVTFont(f); 580 te->setVTFont(f);
581 n_font = fontno; 581 n_font = fontno;
582} 582}
583*/ 583*/
584 584
585// --| color selection |------------------------------------------------------- 585// --| color selection |-------------------------------------------------------
586 586
587void Konsole::changeColumns(int columns) 587void Konsole::changeColumns(int columns)
588{ 588{ //FIXME this seems to cause silliness when reset command is executed
589 qDebug("change columns"); 589// qDebug("change columns");
590 TEWidget* te = getTe(); 590// TEWidget* te = getTe();
591 if (te != 0) { 591// if (te != 0) {
592 setColLin(columns,te->Lines()); 592// setColLin(columns,te->Lines());
593 te->update(); 593// te->update();
594 } 594// }
595} 595}
596 596
597//FIXME: If a child dies during session swap, 597//FIXME: If a child dies during session swap,
598// this routine might be called before 598// this routine might be called before
599// session swap is completed. 599// session swap is completed.
600 600
601void Konsole::doneSession(TESession*, int ) 601void Konsole::doneSession(TESession*, int )
602{ 602{
603 TEWidget *te = getTe(); 603 TEWidget *te = getTe();
604 if (te != 0) { 604 if (te != 0) {
605 te->currentSession->setConnect(FALSE); 605 te->currentSession->setConnect(FALSE);
606 tab->removeTab(te); 606 tab->removeTab(te);
607 delete te->currentSession; 607 delete te->currentSession;
608 delete te; 608 delete te;
609 nsessions--; 609 nsessions--;
610 } 610 }
611 611
612 if (nsessions == 0) { 612 if (nsessions == 0) {
613 close(); 613 close();
614 } 614 }
615} 615}
616 616
617void Konsole::newSession() { 617void Konsole::newSession() {
618 if(nsessions < 15) { // seems to be something weird about 16 tabs on the Zaurus.... memory? 618 if(nsessions < 15) { // seems to be something weird about 16 tabs on the Zaurus.... memory?
619 TEWidget* te = new TEWidget(tab); 619 TEWidget* te = new TEWidget(tab);
620 Config c("Konsole"); 620 Config c("Konsole");
621 c.setGroup("Menubar"); 621 c.setGroup("Menubar");
622 te->useBeep=c.readBoolEntry("useBeep",0); 622 te->useBeep=c.readBoolEntry("useBeep",0);
623 623
624// te->setBackgroundMode(PaletteBase); //we want transparent!! 624// te->setBackgroundMode(PaletteBase); //we want transparent!!
625 te->setVTFont(fonts.at(cfont)->getFont()); 625 te->setVTFont(fonts.at(cfont)->getFont());
626 tab->addTab(te); 626 tab->addTab(te);
627 TESession* se = new TESession(this, te, se_pgm, se_args, "xterm"); 627 TESession* se = new TESession(this, te, se_pgm, se_args, "xterm");
628 te->currentSession = se; 628 te->currentSession = se;
629 connect( se, SIGNAL(done(TESession*,int)), this, SLOT(doneSession(TESession*,int)) ); 629 connect( se, SIGNAL(done(TESession*,int)), this, SLOT(doneSession(TESession*,int)) );
630 se->run(); 630 se->run();
631 se->setConnect(TRUE); 631 se->setConnect(TRUE);
632 se->setHistory(b_scroll); 632 se->setHistory(b_scroll);
633 tab->setCurrentPage(nsessions); 633 tab->setCurrentPage(nsessions);
634 nsessions++; 634 nsessions++;
635 doWrap(); 635 doWrap();
636 setColor(); 636 setColor();
637 } 637 }
638} 638}
639 639
640TEWidget* Konsole::getTe() { 640TEWidget* Konsole::getTe() {
641 if (nsessions) { 641 if (nsessions) {
642 return (TEWidget *) tab->currentPage(); 642 return (TEWidget *) tab->currentPage();