summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index e2d4886..23c12f8 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -250,24 +250,25 @@ void Konsole::init(const char* _pgm, QStrList & _args)
250 colorMenu->insertItem("Green on Black"); 250 colorMenu->insertItem("Green on Black");
251 colorMenu->insertItem("Black on White"); 251 colorMenu->insertItem("Black on White");
252 colorMenu->insertItem("White on Black"); 252 colorMenu->insertItem("White on Black");
253 colorMenu->insertItem("Black on Transparent"); 253 colorMenu->insertItem("Black on Transparent");
254 colorMenu->insertItem("Black on Red"); 254 colorMenu->insertItem("Black on Red");
255 colorMenu->insertItem("Red on Black"); 255 colorMenu->insertItem("Red on Black");
256 colorMenu->insertItem("Green on Yellow"); 256 colorMenu->insertItem("Green on Yellow");
257 colorMenu->insertItem("Blue on Magenta"); 257 colorMenu->insertItem("Blue on Magenta");
258 colorMenu->insertItem("Magenta on Blue"); 258 colorMenu->insertItem("Magenta on Blue");
259 colorMenu->insertItem("Cyan on White"); 259 colorMenu->insertItem("Cyan on White");
260 colorMenu->insertItem("White on Cyan"); 260 colorMenu->insertItem("White on Cyan");
261 colorMenu->insertItem("Blue on Black"); 261 colorMenu->insertItem("Blue on Black");
262 colorMenu->insertItem("Amber on Black");
262 configMenu->insertItem("Colors",colorMenu); 263 configMenu->insertItem("Colors",colorMenu);
263 264
264 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); 265 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
265 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); 266 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
266 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) )); 267 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) ));
267 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); 268 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
268 269
269 menuBar->insertItem( tr("Font"), fontList ); 270 menuBar->insertItem( tr("Font"), fontList );
270 menuBar->insertItem( tr("Options"), configMenu ); 271 menuBar->insertItem( tr("Options"), configMenu );
271 272
272 QPEToolBar *toolbar = new QPEToolBar( this ); 273 QPEToolBar *toolbar = new QPEToolBar( this );
273 274
@@ -665,24 +666,30 @@ void Konsole::colorMenuSelected(int iD)
665 if(iD==-15) {// White, Cyan 666 if(iD==-15) {// White, Cyan
666 background.setRgb(0x18,0xB2,0xB2); 667 background.setRgb(0x18,0xB2,0xB2);
667 foreground.setRgb(0xFF,0xFF,0xFF); 668 foreground.setRgb(0xFF,0xFF,0xFF);
668 cfg.writeEntry("Schema","15"); 669 cfg.writeEntry("Schema","15");
669 colorMenu->setItemChecked(-15,TRUE); 670 colorMenu->setItemChecked(-15,TRUE);
670 } 671 }
671 if(iD==-16) {// Black, Blue 672 if(iD==-16) {// Black, Blue
672 background.setRgb(0x00,0x00,0x00); 673 background.setRgb(0x00,0x00,0x00);
673 foreground.setRgb(0x18,0xB2,0xB2); 674 foreground.setRgb(0x18,0xB2,0xB2);
674 cfg.writeEntry("Schema","16"); 675 cfg.writeEntry("Schema","16");
675 colorMenu->setItemChecked(-16,TRUE); 676 colorMenu->setItemChecked(-16,TRUE);
676 } 677 }
678 if(iD==-17) {// Black, Gold
679 background.setRgb(0x00,0x00,0x00);
680 foreground.setRgb(255,215,0);
681 cfg.writeEntry("Schema","17");
682 colorMenu->setItemChecked(-17,TRUE);
683 }
677 684
678 for (i = 0; i < TABLE_COLORS; i++) { 685 for (i = 0; i < TABLE_COLORS; i++) {
679 if(i==0 || i == 10) { 686 if(i==0 || i == 10) {
680 m_table[i].color = foreground; 687 m_table[i].color = foreground;
681 } 688 }
682 else if(i==1 || i == 11) { 689 else if(i==1 || i == 11) {
683 m_table[i].color = background; m_table[i].transparent=0; 690 m_table[i].color = background; m_table[i].transparent=0;
684 } 691 }
685 else 692 else
686 m_table[i].color = defaultCt[i].color; 693 m_table[i].color = defaultCt[i].color;
687 } 694 }
688 } 695 }
@@ -759,32 +766,31 @@ void Konsole::changeCommand(const QString &text, int c)
759 cfg.writeEntry(QString::number(c),text); 766 cfg.writeEntry(QString::number(c),text);
760 commonCombo->clearEdit(); 767 commonCombo->clearEdit();
761 commonCombo->setCurrentItem(c); 768 commonCombo->setCurrentItem(c);
762 } 769 }
763} 770}
764 771
765void Konsole::setColor() 772void Konsole::setColor()
766{ 773{
767 Config cfg("Konsole"); 774 Config cfg("Konsole");
768 cfg.setGroup("Colors"); 775 cfg.setGroup("Colors");
769 int scheme = cfg.readNumEntry("Schema",1); 776 int scheme = cfg.readNumEntry("Schema",1);
770 if(scheme != 1) colorMenuSelected( -scheme); 777 if(scheme != 1) colorMenuSelected( -scheme);
771
772} 778}
773 779
774void Konsole::scrollMenuSelected(int index) 780void Konsole::scrollMenuSelected(int index)
775{ 781{
776 TEWidget* te = getTe(); 782 TEWidget* te = getTe();
777Config cfg("Konsole"); 783 Config cfg("Konsole");
778 cfg.setGroup("Scrollbar"); 784 cfg.setGroup("Scrollbar");
779 switch( index){ 785 switch( index){
780 case -21: 786 case -21:
781 te->setScrollbarLocation(0); 787 te->setScrollbarLocation(0);
782 cfg.writeEntry("Position",0); 788 cfg.writeEntry("Position",0);
783 break; 789 break;
784 case -22: 790 case -22:
785 te->setScrollbarLocation(1); 791 te->setScrollbarLocation(1);
786 cfg.writeEntry("Position",1); 792 cfg.writeEntry("Position",1);
787 break; 793 break;
788 case -23: 794 case -23:
789 te->setScrollbarLocation(2); 795 te->setScrollbarLocation(2);
790 cfg.writeEntry("Position",2); 796 cfg.writeEntry("Position",2);