summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp41
1 files changed, 2 insertions, 39 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index bc5a766..bd33ba6 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -666,184 +666,147 @@ void Konsole::colorMenuSelected(int iD)
666 } 666 }
667 if(iD==-12) {// Green, Yellow - is ugly 667 if(iD==-12) {// Green, Yellow - is ugly
668// foreground.setRgb(0x18,0xB2,0x18); 668// foreground.setRgb(0x18,0xB2,0x18);
669 foreground.setRgb(36,139,10); 669 foreground.setRgb(36,139,10);
670// background.setRgb(0xB2,0x68,0x18); 670// background.setRgb(0xB2,0x68,0x18);
671 background.setRgb(255,255,0); 671 background.setRgb(255,255,0);
672 cfg.writeEntry("Schema","12"); 672 cfg.writeEntry("Schema","12");
673 colorMenu->setItemChecked(-12,TRUE); 673 colorMenu->setItemChecked(-12,TRUE);
674 } 674 }
675 if(iD==-13) {// Blue, Magenta 675 if(iD==-13) {// Blue, Magenta
676 foreground.setRgb(0x18,0xB2,0xB2); 676 foreground.setRgb(0x18,0xB2,0xB2);
677 background.setRgb(0x18,0x18,0xB2); 677 background.setRgb(0x18,0x18,0xB2);
678 cfg.writeEntry("Schema","13"); 678 cfg.writeEntry("Schema","13");
679 colorMenu->setItemChecked(-13,TRUE); 679 colorMenu->setItemChecked(-13,TRUE);
680 } 680 }
681 if(iD==-14) {// Magenta, Blue 681 if(iD==-14) {// Magenta, Blue
682 foreground.setRgb(0x18,0x18,0xB2); 682 foreground.setRgb(0x18,0x18,0xB2);
683 background.setRgb(0x18,0xB2,0xB2); 683 background.setRgb(0x18,0xB2,0xB2);
684 cfg.writeEntry("Schema","14"); 684 cfg.writeEntry("Schema","14");
685 colorMenu->setItemChecked(-14,TRUE); 685 colorMenu->setItemChecked(-14,TRUE);
686 } 686 }
687 if(iD==-15) {// Cyan, White 687 if(iD==-15) {// Cyan, White
688 foreground.setRgb(0x18,0xB2,0xB2); 688 foreground.setRgb(0x18,0xB2,0xB2);
689 background.setRgb(0xFF,0xFF,0xFF); 689 background.setRgb(0xFF,0xFF,0xFF);
690 cfg.writeEntry("Schema","15"); 690 cfg.writeEntry("Schema","15");
691 colorMenu->setItemChecked(-15,TRUE); 691 colorMenu->setItemChecked(-15,TRUE);
692 } 692 }
693 if(iD==-16) {// White, Cyan 693 if(iD==-16) {// White, Cyan
694 background.setRgb(0x18,0xB2,0xB2); 694 background.setRgb(0x18,0xB2,0xB2);
695 foreground.setRgb(0xFF,0xFF,0xFF); 695 foreground.setRgb(0xFF,0xFF,0xFF);
696 cfg.writeEntry("Schema","16"); 696 cfg.writeEntry("Schema","16");
697 colorMenu->setItemChecked(-16,TRUE); 697 colorMenu->setItemChecked(-16,TRUE);
698 } 698 }
699 if(iD==-17) {// Black, Blue 699 if(iD==-17) {// Black, Blue
700 background.setRgb(0x00,0x00,0x00); 700 background.setRgb(0x00,0x00,0x00);
701 foreground.setRgb(0x18,0xB2,0xB2); 701 foreground.setRgb(0x18,0xB2,0xB2);
702 cfg.writeEntry("Schema","17"); 702 cfg.writeEntry("Schema","17");
703 colorMenu->setItemChecked(-17,TRUE); 703 colorMenu->setItemChecked(-17,TRUE);
704 } 704 }
705 if(iD==-18) {// Black, Gold 705 if(iD==-18) {// Black, Gold
706 background.setRgb(0x00,0x00,0x00); 706 background.setRgb(0x00,0x00,0x00);
707 foreground.setRgb(255,215,0); 707 foreground.setRgb(255,215,0);
708 cfg.writeEntry("Schema","18"); 708 cfg.writeEntry("Schema","18");
709 colorMenu->setItemChecked(-18,TRUE); 709 colorMenu->setItemChecked(-18,TRUE);
710 } 710 }
711 711
712 for (i = 0; i < TABLE_COLORS; i++) { 712 for (i = 0; i < TABLE_COLORS; i++) {
713 if(i==0 || i == 10) { 713 if(i==0 || i == 10) {
714 m_table[i].color = foreground; 714 m_table[i].color = foreground;
715 } 715 }
716 else if(i==1 || i == 11) { 716 else if(i==1 || i == 11) {
717 m_table[i].color = background; m_table[i].transparent=0; 717 m_table[i].color = background; m_table[i].transparent=0;
718 } 718 }
719 else 719 else
720 m_table[i].color = defaultCt[i].color; 720 m_table[i].color = defaultCt[i].color;
721 } 721 }
722 } 722 }
723 lastSelectedMenu = iD; 723 lastSelectedMenu = iD;
724 te->setColorTable(m_table); 724 te->setColorTable(m_table);
725 update(); 725 update();
726} 726}
727 727
728void Konsole::configMenuSelected(int iD) 728void Konsole::configMenuSelected(int iD)
729{ 729{
730 QString temp; 730// QString temp;
731 qDebug( temp.sprintf("configmenu %d",iD)); 731// qDebug( temp.sprintf("configmenu %d",iD));
732 TEWidget* te = getTe(); 732 TEWidget* te = getTe();
733 Config cfg("Konsole"); 733 Config cfg("Konsole");
734 cfg.setGroup("Menubar"); 734 cfg.setGroup("Menubar");
735// if( iD == -2) {
736// if(!secondToolBar->isHidden()) {
737// secondToolBar->hide();
738// configMenu->changeItem( iD,"Show Command List");
739// cfg.writeEntry("Hidden","TRUE");
740// configMenu->setItemEnabled(-20 ,FALSE);
741// } else {
742// secondToolBar->show();
743// configMenu->changeItem( iD,"Hide Command List");
744// cfg.writeEntry("Hidden","FALSE");
745// configMenu->setItemEnabled(-20 ,TRUE);
746
747// if(cfg.readEntry("EditEnabled","FALSE")=="TRUE") {
748// configMenu->setItemChecked(-20,TRUE);
749// commonCombo->setEditable( TRUE );
750// } else {
751// configMenu->setItemChecked(-20,FALSE);
752// commonCombo->setEditable( FALSE );
753// }
754// }
755// }
756 if( iD == -4) { 735 if( iD == -4) {
757 cfg.setGroup("Tabs"); 736 cfg.setGroup("Tabs");
758 QString tmp=cfg.readEntry("Position","Top"); 737 QString tmp=cfg.readEntry("Position","Top");
759 738
760 if(tmp=="Top") { 739 if(tmp=="Top") {
761 tab->setTabPosition(QTabWidget::Bottom); 740 tab->setTabPosition(QTabWidget::Bottom);
762 configMenu->changeItem( iD,"Tabs on Top"); 741 configMenu->changeItem( iD,"Tabs on Top");
763 cfg.writeEntry("Position","Bottom"); 742 cfg.writeEntry("Position","Bottom");
764 } else { 743 } else {
765 tab->setTabPosition(QTabWidget::Top); 744 tab->setTabPosition(QTabWidget::Top);
766 configMenu->changeItem( iD,"Tabs on Bottom"); 745 configMenu->changeItem( iD,"Tabs on Bottom");
767 cfg.writeEntry("Position","Top"); 746 cfg.writeEntry("Position","Top");
768 } 747 }
769 } 748 }
770// if( iD == -20) {
771// cfg.setGroup("Commands");
772// // qDebug("enableCommandEdit");
773// if( !configMenu->isItemChecked(iD) ) {
774// commonCombo->setEditable( TRUE );
775// configMenu->setItemChecked(iD,TRUE);
776// commonCombo->setCurrentItem(0);
777// cfg.writeEntry("EditEnabled","TRUE");
778// } else {
779// commonCombo->setEditable( FALSE );
780// configMenu->setItemChecked(iD,FALSE);
781// cfg.writeEntry("EditEnabled","FALSE");
782// commonCombo->setFocusPolicy(QWidget::NoFocus);
783// te->setFocus();
784// }
785// }
786} 749}
787 750
788void Konsole::changeCommand(const QString &text, int c) 751void Konsole::changeCommand(const QString &text, int c)
789{ 752{
790 Config cfg("Konsole"); 753 Config cfg("Konsole");
791 cfg.setGroup("Commands"); 754 cfg.setGroup("Commands");
792 if(commonCmds[c] != text) { 755 if(commonCmds[c] != text) {
793 cfg.writeEntry(QString::number(c),text); 756 cfg.writeEntry(QString::number(c),text);
794 commonCombo->clearEdit(); 757 commonCombo->clearEdit();
795 commonCombo->setCurrentItem(c); 758 commonCombo->setCurrentItem(c);
796 } 759 }
797} 760}
798 761
799void Konsole::setColor() 762void Konsole::setColor()
800{ 763{
801 Config cfg("Konsole"); 764 Config cfg("Konsole");
802 cfg.setGroup("Colors"); 765 cfg.setGroup("Colors");
803 int scheme = cfg.readNumEntry("Schema",1); 766 int scheme = cfg.readNumEntry("Schema",1);
804 if(scheme != 1) colorMenuSelected( -scheme); 767 if(scheme != 1) colorMenuSelected( -scheme);
805} 768}
806 769
807void Konsole::scrollMenuSelected(int index) 770void Konsole::scrollMenuSelected(int index)
808{ 771{
809// QString temp; 772// QString temp;
810// qDebug( temp.sprintf("scrollbar menu %d",index)); 773// qDebug( temp.sprintf("scrollbar menu %d",index));
811 TEWidget* te = getTe(); 774 TEWidget* te = getTe();
812 Config cfg("Konsole"); 775 Config cfg("Konsole");
813 cfg.setGroup("Scrollbar"); 776 cfg.setGroup("Scrollbar");
814 switch( index){ 777 switch( index){
815 case -24: 778 case -24:
816 te->setScrollbarLocation(0); 779 te->setScrollbarLocation(0);
817 cfg.writeEntry("Position",0); 780 cfg.writeEntry("Position",0);
818 break; 781 break;
819 case -25: 782 case -25:
820 te->setScrollbarLocation(1); 783 te->setScrollbarLocation(1);
821 cfg.writeEntry("Position",1); 784 cfg.writeEntry("Position",1);
822 break; 785 break;
823 case -26: 786 case -26:
824 te->setScrollbarLocation(2); 787 te->setScrollbarLocation(2);
825 cfg.writeEntry("Position",2); 788 cfg.writeEntry("Position",2);
826 break; 789 break;
827 }; 790 };
828 791
829} 792}
830 793
831void Konsole::editCommandListMenuSelected(int iD) 794void Konsole::editCommandListMenuSelected(int iD)
832{ 795{
833// QString temp; 796// QString temp;
834// qDebug( temp.sprintf("edit command list %d",iD)); 797// qDebug( temp.sprintf("edit command list %d",iD));
835 TEWidget* te = getTe(); 798 TEWidget* te = getTe();
836 Config cfg("Konsole"); 799 Config cfg("Konsole");
837 cfg.setGroup("Menubar"); 800 cfg.setGroup("Menubar");
838 if( iD == -3) { 801 if( iD == -3) {
839 if(!secondToolBar->isHidden()) { 802 if(!secondToolBar->isHidden()) {
840 secondToolBar->hide(); 803 secondToolBar->hide();
841 configMenu->changeItem( iD,"Show Command List"); 804 configMenu->changeItem( iD,"Show Command List");
842 cfg.writeEntry("Hidden","TRUE"); 805 cfg.writeEntry("Hidden","TRUE");
843 configMenu->setItemEnabled(-22 ,FALSE); 806 configMenu->setItemEnabled(-22 ,FALSE);
844 } else { 807 } else {
845 secondToolBar->show(); 808 secondToolBar->show();
846 configMenu->changeItem( iD,"Hide Command List"); 809 configMenu->changeItem( iD,"Hide Command List");
847 cfg.writeEntry("Hidden","FALSE"); 810 cfg.writeEntry("Hidden","FALSE");
848 configMenu->setItemEnabled(-22 ,TRUE); 811 configMenu->setItemEnabled(-22 ,TRUE);
849 812