summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 7812e4c..b8f009d 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -547,216 +547,216 @@ void Konsole::init(const char* _pgm, QStrList & _args)
547 tab->getTabBar()->show(); 547 tab->getTabBar()->show();
548 tabPos = tm_bottom; 548 tabPos = tm_bottom;
549 } 549 }
550 else 550 else
551 { 551 {
552 tab->getTabBar()->hide(); 552 tab->getTabBar()->hide();
553 tab->setMargin(tab->margin()); 553 tab->setMargin(tab->margin());
554 tabPos = tm_hidden; 554 tabPos = tm_hidden;
555 } 555 }
556 556
557 cm_bw = colorMenu->insertItem(tr( "Black on White")); 557 cm_bw = colorMenu->insertItem(tr( "Black on White"));
558 cm_wb = colorMenu->insertItem(tr( "White on Black")); 558 cm_wb = colorMenu->insertItem(tr( "White on Black"));
559 cm_gb = colorMenu->insertItem(tr( "Green on Black")); 559 cm_gb = colorMenu->insertItem(tr( "Green on Black"));
560 // cm_bt = colorMenu->insertItem(tr( "Black on Transparent")); 560 // cm_bt = colorMenu->insertItem(tr( "Black on Transparent"));
561 cm_br = colorMenu->insertItem(tr( "Black on Pink")); 561 cm_br = colorMenu->insertItem(tr( "Black on Pink"));
562 cm_rb = colorMenu->insertItem(tr( "Pink on Black")); 562 cm_rb = colorMenu->insertItem(tr( "Pink on Black"));
563 cm_gy = colorMenu->insertItem(tr( "Green on Yellow")); 563 cm_gy = colorMenu->insertItem(tr( "Green on Yellow"));
564 cm_bm = colorMenu->insertItem(tr( "Blue on Magenta")); 564 cm_bm = colorMenu->insertItem(tr( "Blue on Magenta"));
565 cm_mb = colorMenu->insertItem(tr( "Magenta on Blue")); 565 cm_mb = colorMenu->insertItem(tr( "Magenta on Blue"));
566 cm_cw = colorMenu->insertItem(tr( "Cyan on White")); 566 cm_cw = colorMenu->insertItem(tr( "Cyan on White"));
567 cm_wc = colorMenu->insertItem(tr( "White on Cyan")); 567 cm_wc = colorMenu->insertItem(tr( "White on Cyan"));
568 cm_bb = colorMenu->insertItem(tr( "Blue on Black")); 568 cm_bb = colorMenu->insertItem(tr( "Blue on Black"));
569 cm_ab = colorMenu->insertItem(tr( "Amber on Black")); 569 cm_ab = colorMenu->insertItem(tr( "Amber on Black"));
570 cm_default = colorMenu->insertItem(tr("default")); 570 cm_default = colorMenu->insertItem(tr("default"));
571 571
572#ifdef QT_QWS_OPIE 572#ifdef QT_QWS_OPIE
573 573
574 colorMenu->insertItem(tr( "Custom")); 574 colorMenu->insertItem(tr( "Custom"));
575#endif 575#endif
576 576
577 configMenu->insertItem(tr( "Colors") ,colorMenu); 577 configMenu->insertItem(tr( "Colors") ,colorMenu);
578 578
579 sessionList = new QPopupMenu(this); 579 sessionList = new QPopupMenu(this);
580 sessionList-> insertItem ( Resource::loadPixmap ( "qkonsole/qkonsole" ), tr( "new session" ), this, 580 sessionList-> insertItem ( Resource::loadPixmap ( "qkonsole/qkonsole" ), tr( "new session" ), this,
581 SLOT(newSession()) ); 581 SLOT(newSession()) );
582 582
583 // connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); 583 // connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
584 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); 584 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
585 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) )); 585 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) ));
586 connect( tabMenu, SIGNAL( activated(int) ), this, SLOT( tabMenuSelected(int) )); 586 connect( tabMenu, SIGNAL( activated(int) ), this, SLOT( tabMenuSelected(int) ));
587 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); 587 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
588 connect( editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int))); 588 connect( editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int)));
589 connect( sessionList, SIGNAL(activated(int)), this, SLOT( sessionListSelected(int) ) ); 589 connect( sessionList, SIGNAL(activated(int)), this, SLOT( sessionListSelected(int) ) );
590 590
591 menuBar->insertItem( tr("View"), configMenu ); 591 menuBar->insertItem( tr("View"), configMenu );
592 menuBar->insertItem( tr("Fonts"), fontList ); 592 menuBar->insertItem( tr("Fonts"), fontList );
593 menuBar->insertItem( tr("Sessions"), sessionList ); 593 menuBar->insertItem( tr("Sessions"), sessionList );
594 594
595 toolBar = new QToolBar( this ); 595 toolBar = new QToolBar( this );
596 596
597 QAction *a; 597 QAction *a;
598 598
599 // Button Commands 599 // Button Commands
600 a = new QAction( tr("New"), Resource::loadPixmap( "konsole/Terminal" ), QString::null, 0, this, 0 ); 600 a = new QAction( tr("New"), Resource::loadPixmap( "konsole/Terminal" ), QString::null, 0, this, 0 );
601 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); 601 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) );
602 a->addTo( toolBar ); 602 a->addTo( toolBar );
603 603
604 a = new QAction( tr("Full Screen"), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 ); 604 a = new QAction( tr("Full Screen"), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 );
605 connect( a, SIGNAL( activated() ), this, SLOT( toggleFullScreen() ) ); 605 connect( a, SIGNAL( activated() ), this, SLOT( toggleFullScreen() ) );
606 a->addTo( toolBar ); 606 a->addTo( toolBar );
607 607
608 a = new QAction( tr("Zoom"), Resource::loadPixmap( "zoom" ), QString::null, 0, this, 0 ); 608 a = new QAction( tr("Zoom"), Resource::loadPixmap( "zoom" ), QString::null, 0, this, 0 );
609 connect( a, SIGNAL( activated() ), this, SLOT( cycleZoom() ) ); 609 connect( a, SIGNAL( activated() ), this, SLOT( cycleZoom() ) );
610 a->addTo( toolBar ); 610 a->addTo( toolBar );
611 611
612 612
613 /* 613 /*
614 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 ); 614 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 );
615 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolBar ); 615 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolBar );
616 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 ); 616 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 );
617 connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolBar ); 617 connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolBar );
618 a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 ); 618 a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 );
619 connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolBar ); 619 connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolBar );
620 */ 620 */
621 /* 621 /*
622 a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 ); 622 a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 );
623 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar ); 623 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar );
624 a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 ); 624 a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 );
625 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar ); 625 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar );
626 */ 626 */
627 a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 ); 627 a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 );
628 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); 628 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) );
629 a->addTo( toolBar ); 629 a->addTo( toolBar );
630 630
631 secondToolBar = new QToolBar( this ); 631 secondToolBar = new QToolBar( this );
632 secondToolBar->setHorizontalStretchable( TRUE ); 632 secondToolBar->setHorizontalStretchable( TRUE );
633 633
634 commonCombo = new QComboBox( secondToolBar ); 634 commonCombo = new QComboBox( secondToolBar );
635 // commonCombo->setMaximumWidth(236); 635 // commonCombo->setMaximumWidth(236);
636 636
637 ec_quick = editCommandListMenu->insertItem( tr( "Quick Edit" ) ); 637 ec_quick = editCommandListMenu->insertItem( tr( "Quick Edit" ) );
638 if( listHidden) 638 if( listHidden)
639 { 639 {
640 secondToolBar->hide(); 640 secondToolBar->hide();
641 editCommandListMenu->setItemEnabled(ec_quick ,FALSE); 641 editCommandListMenu->setItemEnabled(ec_quick ,FALSE);
642 } 642 }
643 ec_edit = editCommandListMenu->insertItem(tr( "Edit" ) ); 643 ec_edit = editCommandListMenu->insertItem(tr( "Edit..." ) );
644 644
645 cfg.setGroup("Commands"); 645 cfg.setGroup("Commands");
646 commonCombo->setInsertionPolicy(QComboBox::AtCurrent); 646 commonCombo->setInsertionPolicy(QComboBox::AtCurrent);
647 647
648 initCommandList(); 648 initCommandList();
649 // for (int i = 0; commonCmds[i] != NULL; i++) { 649 // for (int i = 0; commonCmds[i] != NULL; i++) {
650 // commonCombo->insertItem( commonCmds[i], i ); 650 // commonCombo->insertItem( commonCmds[i], i );
651 // tmp = cfg.readEntry( QString::number(i),""); 651 // tmp = cfg.readEntry( QString::number(i),"");
652 // if(tmp != "") 652 // if(tmp != "")
653 // commonCombo->changeItem( tmp,i ); 653 // commonCombo->changeItem( tmp,i );
654 // } 654 // }
655 655
656 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); 656 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) ));
657 657
658 sm_none = scrollMenu->insertItem(tr( "None" )); 658 sm_none = scrollMenu->insertItem(tr( "None" ));
659 sm_left = scrollMenu->insertItem(tr( "Left" )); 659 sm_left = scrollMenu->insertItem(tr( "Left" ));
660 sm_right = scrollMenu->insertItem(tr( "Right" )); 660 sm_right = scrollMenu->insertItem(tr( "Right" ));
661 // scrollMenu->insertSeparator(4); 661 // scrollMenu->insertSeparator(4);
662 // scrollMenu->insertItem(tr( "Horizontal" )); 662 // scrollMenu->insertItem(tr( "Horizontal" ));
663 663
664 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); 664 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu);
665 665
666 configMenu->insertItem(tr( "History" ), this, SLOT(historyDialog())); 666 configMenu->insertItem(tr( "History..." ), this, SLOT(historyDialog()));
667 667
668 cm_wrap = configMenu->insertItem(tr( "Wrap" )); 668 cm_wrap = configMenu->insertItem(tr( "Wrap" ));
669 cfg.setGroup("ScrollBar"); 669 cfg.setGroup("ScrollBar");
670 configMenu->setItemChecked(cm_wrap, cfg.readBoolEntry("HorzScroll",0)); 670 configMenu->setItemChecked(cm_wrap, cfg.readBoolEntry("HorzScroll",0));
671 671
672 cm_beep = configMenu->insertItem(tr( "Use Beep" )); 672 cm_beep = configMenu->insertItem(tr( "Use Beep" ));
673 cfg.setGroup("Menubar"); 673 cfg.setGroup("Menubar");
674 configMenu->setItemChecked(cm_beep, cfg.readBoolEntry("useBeep",0)); 674 configMenu->setItemChecked(cm_beep, cfg.readBoolEntry("useBeep",0));
675 675
676 fullscreen_msg = new QLabel(this); 676 fullscreen_msg = new QLabel(this);
677 fullscreen_msg-> setAlignment ( AlignCenter | SingleLine ); 677 fullscreen_msg-> setAlignment ( AlignCenter | SingleLine );
678 fullscreen_msg-> hide(); 678 fullscreen_msg-> hide();
679 fullscreen_msg-> setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding )); 679 fullscreen_msg-> setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ));
680 fullscreen_msg-> setAutoResize(true); 680 fullscreen_msg-> setAutoResize(true);
681 fullscreen_msg-> setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 681 fullscreen_msg-> setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
682 fullscreen_msg-> setText(tr("To exit fullscreen, tap here.")); 682 fullscreen_msg-> setText(tr("To exit fullscreen, tap here."));
683 683
684 fullscreen_timer = new QTimer(this); 684 fullscreen_timer = new QTimer(this);
685 connect(fullscreen_timer, SIGNAL(timeout()), 685 connect(fullscreen_timer, SIGNAL(timeout()),
686 this, SLOT(fullscreenTimeout())); 686 this, SLOT(fullscreenTimeout()));
687 show_fullscreen_msg = true; 687 show_fullscreen_msg = true;
688 688
689 //scrollMenuSelected(-29); 689 //scrollMenuSelected(-29);
690 // cfg.setGroup("ScrollBar"); 690 // cfg.setGroup("ScrollBar");
691 // if(cfg.readBoolEntry("HorzScroll",0)) { 691 // if(cfg.readBoolEntry("HorzScroll",0)) {
692 // if(cfg.readNumEntry("Position",2) == 0) 692 // if(cfg.readNumEntry("Position",2) == 0)
693 // te->setScrollbarLocation(1); 693 // te->setScrollbarLocation(1);
694 // else 694 // else
695 // te->setScrollbarLocation(0); 695 // te->setScrollbarLocation(0);
696 // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); 696 // te->setScrollbarLocation( cfg.readNumEntry("Position",2));
697 // te->setWrapAt(120); 697 // te->setWrapAt(120);
698 // } 698 // }
699 // create applications ///////////////////////////////////////////////////// 699 // create applications /////////////////////////////////////////////////////
700 setCentralWidget(tab); 700 setCentralWidget(tab);
701 701
702 // load keymaps //////////////////////////////////////////////////////////// 702 // load keymaps ////////////////////////////////////////////////////////////
703 KeyTrans::loadAll(); 703 KeyTrans::loadAll();
704 for (int i = 0; i < KeyTrans::count(); i++) 704 for (int i = 0; i < KeyTrans::count(); i++)
705 { 705 {
706 KeyTrans* s = KeyTrans::find(i); 706 KeyTrans* s = KeyTrans::find(i);
707 assert( s ); 707 assert( s );
708 } 708 }
709 709
710 se_pgm = _pgm; 710 se_pgm = _pgm;
711 se_args = _args; 711 se_args = _args;
712 712
713 cfg.setGroup("CommandLine"); 713 cfg.setGroup("CommandLine");
714 714
715 if (cfg.hasKey("shell_args")) 715 if (cfg.hasKey("shell_args"))
716 { 716 {
717 QStringList se_args_list = cfg.readListEntry("shell_args",'|'); 717 QStringList se_args_list = cfg.readListEntry("shell_args",'|');
718 for(uint i = 0; i < se_args_list.count(); i++) 718 for(uint i = 0; i < se_args_list.count(); i++)
719 { 719 {
720 se_args.prepend(se_args_list[se_args_list.count() - i - 1].latin1()); 720 se_args.prepend(se_args_list[se_args_list.count() - i - 1].latin1());
721 } 721 }
722 } 722 }
723 else 723 else
724 { 724 {
725 se_args.prepend("--login"); 725 se_args.prepend("--login");
726 } 726 }
727 727
728 se_pgm = cfg.readEntry("shell_bin", QString(se_pgm)); 728 se_pgm = cfg.readEntry("shell_bin", QString(se_pgm));
729 729
730 // this is the "documentation" for those who know to look 730 // this is the "documentation" for those who know to look
731 if (! cfg.hasKey("shell_args")) 731 if (! cfg.hasKey("shell_args"))
732 { 732 {
733 cfg.writeEntry("shell_args",QStringList::fromStrList(se_args),'|'); 733 cfg.writeEntry("shell_args",QStringList::fromStrList(se_args),'|');
734 } 734 }
735 if (! cfg.hasKey("shell_bin")) 735 if (! cfg.hasKey("shell_bin"))
736 { 736 {
737 cfg.writeEntry("shell_bin",QString(se_pgm)); 737 cfg.writeEntry("shell_bin",QString(se_pgm));
738 } 738 }
739 739
740 parseCommandLine(); 740 parseCommandLine();
741 741
742 // read and apply default values /////////////////////////////////////////// 742 // read and apply default values ///////////////////////////////////////////
743 resize(321, 321); // Dummy. 743 resize(321, 321); // Dummy.
744 QSize currentSize = size(); 744 QSize currentSize = size();
745 if (currentSize != size()) 745 if (currentSize != size())
746 defaultSize = size(); 746 defaultSize = size();
747 747
748 748
749 /* allows us to catch cancel/escape */ 749 /* allows us to catch cancel/escape */
750 reparent ( 0, WStyle_Customize | WStyle_NoBorder, 750 reparent ( 0, WStyle_Customize | WStyle_NoBorder,
751 QPoint ( 0, 0 )); 751 QPoint ( 0, 0 ));
752} 752}
753 753
754void Konsole::show() 754void Konsole::show()
755{ 755{
756 if ( !nsessions ) 756 if ( !nsessions )
757 { 757 {
758 newSession(); 758 newSession();
759 } 759 }
760 QMainWindow::show(); 760 QMainWindow::show();
761 761
762} 762}