author | llornkcor <llornkcor> | 2002-02-03 16:06:52 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-03 16:06:52 (UTC) |
commit | bbbccc44398fc92dcbb148def8d30f2e78f71aa5 (patch) (unidiff) | |
tree | 79aa9e9c97de5ceec3fa7149f566aa165c1cbbf3 | |
parent | b7426bf997b8201667cecb0f66470e257b35ba60 (diff) | |
download | opie-bbbccc44398fc92dcbb148def8d30f2e78f71aa5.zip opie-bbbccc44398fc92dcbb148def8d30f2e78f71aa5.tar.gz opie-bbbccc44398fc92dcbb148def8d30f2e78f71aa5.tar.bz2 |
added Amber on Black color scheme
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 12 |
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 | |||
@@ -254,16 +254,17 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
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 ); |
@@ -669,16 +670,22 @@ void Konsole::colorMenuSelected(int iD) | |||
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 | } |
@@ -763,24 +770,23 @@ void Konsole::changeCommand(const QString &text, int c) | |||
763 | } | 770 | } |
764 | 771 | ||
765 | void Konsole::setColor() | 772 | void 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 | ||
774 | void Konsole::scrollMenuSelected(int index) | 780 | void Konsole::scrollMenuSelected(int index) |
775 | { | 781 | { |
776 | TEWidget* te = getTe(); | 782 | TEWidget* te = getTe(); |
777 | Config 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); |