author | llornkcor <llornkcor> | 2002-02-03 16:06:52 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-03 16:06:52 (UTC) |
commit | bbbccc44398fc92dcbb148def8d30f2e78f71aa5 (patch) (side-by-side diff) | |
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 | 8 |
1 files changed, 7 insertions, 1 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 @@ -214,96 +214,97 @@ void Konsole::init(const char* _pgm, QStrList & _args) menuToolBar->setHorizontalStretchable( TRUE ); QPEMenuBar *menuBar = new QPEMenuBar( menuToolBar ); fontList = new QPopupMenu( this ); for(uint i = 0; i < fonts.count(); i++) { VTFont *fnt = fonts.at(i); fontList->insertItem(fnt->getName(), i); } fontChanged(cfont); configMenu = new QPopupMenu( this); colorMenu = new QPopupMenu( this); scrollMenu = new QPopupMenu( this); bool listHidden; cfg.setGroup("Menubar"); if( cfg.readEntry("Hidden","FALSE") == "TRUE") { configMenu->insertItem("Show command list"); listHidden=TRUE; } else { configMenu->insertItem("Hide command list"); listHidden=FALSE; } cfg.setGroup("Tabs"); tmp=cfg.readEntry("Position","Bottom"); if(tmp=="Top") { tab->setTabPosition(QTabWidget::Top); configMenu->insertItem("Tabs on Bottom"); } else { tab->setTabPosition(QTabWidget::Bottom); configMenu->insertItem("Tabs on Top"); } configMenu->insertSeparator(2); colorMenu->insertItem("Green on Black"); colorMenu->insertItem("Black on White"); colorMenu->insertItem("White on Black"); colorMenu->insertItem("Black on Transparent"); colorMenu->insertItem("Black on Red"); colorMenu->insertItem("Red on Black"); colorMenu->insertItem("Green on Yellow"); colorMenu->insertItem("Blue on Magenta"); colorMenu->insertItem("Magenta on Blue"); colorMenu->insertItem("Cyan on White"); colorMenu->insertItem("White on Cyan"); colorMenu->insertItem("Blue on Black"); + colorMenu->insertItem("Amber on Black"); configMenu->insertItem("Colors",colorMenu); connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) )); connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); menuBar->insertItem( tr("Font"), fontList ); menuBar->insertItem( tr("Options"), configMenu ); QPEToolBar *toolbar = new QPEToolBar( this ); QAction *a; // Button Commands a = new QAction( tr("New"), Resource::loadPixmap( "konsole" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); a->addTo( toolbar ); a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolbar ); a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolbar ); a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolbar ); a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar ); a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar ); a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); a->addTo( toolbar ); /* a = new QAction( tr("Up"), Resource::loadPixmap( "up" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar ); a = new QAction( tr("Down"), Resource::loadPixmap( "down" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar ); */ secondToolBar = new QPEToolBar( this ); secondToolBar->setHorizontalStretchable( TRUE ); commonCombo = new QComboBox( secondToolBar ); commonCombo->setMaximumWidth(236); configMenu->insertItem( "Edit Command List"); if( listHidden) { secondToolBar->hide(); configMenu->setItemEnabled(-20 ,FALSE); } cfg.setGroup("Commands"); @@ -629,166 +630,171 @@ void Konsole::colorMenuSelected(int iD) background.setRgb(0xB2,0x18,0x18); cfg.writeEntry("Schema","9"); colorMenu->setItemChecked(-9,TRUE); } if(iD==-10) {// Red, Black foreground.setRgb(230,31,31); //0xB2,0x18,0x18 background.setRgb(0x00,0x00,0x00); cfg.writeEntry("Schema","10"); colorMenu->setItemChecked(-10,TRUE); } if(iD==-11) {// Green, Yellow - is ugly // foreground.setRgb(0x18,0xB2,0x18); foreground.setRgb(36,139,10); // background.setRgb(0xB2,0x68,0x18); background.setRgb(255,255,0); cfg.writeEntry("Schema","11"); colorMenu->setItemChecked(-11,TRUE); } if(iD==-12) {// Blue, Magenta foreground.setRgb(0x18,0xB2,0xB2); background.setRgb(0x18,0x18,0xB2); cfg.writeEntry("Schema","12"); colorMenu->setItemChecked(-12,TRUE); } if(iD==-13) {// Magenta, Blue foreground.setRgb(0x18,0x18,0xB2); background.setRgb(0x18,0xB2,0xB2); cfg.writeEntry("Schema","13"); colorMenu->setItemChecked(-13,TRUE); } if(iD==-14) {// Cyan, White foreground.setRgb(0x18,0xB2,0xB2); background.setRgb(0xFF,0xFF,0xFF); cfg.writeEntry("Schema","14"); colorMenu->setItemChecked(-14,TRUE); } if(iD==-15) {// White, Cyan background.setRgb(0x18,0xB2,0xB2); foreground.setRgb(0xFF,0xFF,0xFF); cfg.writeEntry("Schema","15"); colorMenu->setItemChecked(-15,TRUE); } if(iD==-16) {// Black, Blue background.setRgb(0x00,0x00,0x00); foreground.setRgb(0x18,0xB2,0xB2); cfg.writeEntry("Schema","16"); colorMenu->setItemChecked(-16,TRUE); } + if(iD==-17) {// Black, Gold + background.setRgb(0x00,0x00,0x00); + foreground.setRgb(255,215,0); + cfg.writeEntry("Schema","17"); + colorMenu->setItemChecked(-17,TRUE); + } for (i = 0; i < TABLE_COLORS; i++) { if(i==0 || i == 10) { m_table[i].color = foreground; } else if(i==1 || i == 11) { m_table[i].color = background; m_table[i].transparent=0; } else m_table[i].color = defaultCt[i].color; } } lastSelectedMenu = iD; te->setColorTable(m_table); update(); } void Konsole::configMenuSelected(int iD) { QString temp; qDebug( temp.sprintf("%d",iD)); TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("Menubar"); if( iD == -2) { if(!secondToolBar->isHidden()) { secondToolBar->hide(); configMenu->changeItem( iD,"Show Command List"); cfg.writeEntry("Hidden","TRUE"); configMenu->setItemEnabled(-20 ,FALSE); } else { secondToolBar->show(); configMenu->changeItem( iD,"Hide Command List"); cfg.writeEntry("Hidden","FALSE"); configMenu->setItemEnabled(-20 ,TRUE); if(cfg.readEntry("EditEnabled","FALSE")=="TRUE") { configMenu->setItemChecked(-20,TRUE); commonCombo->setEditable( TRUE ); } else { configMenu->setItemChecked(-20,FALSE); commonCombo->setEditable( FALSE ); } } } if( iD == -3) { cfg.setGroup("Tabs"); QString tmp=cfg.readEntry("Position","Top"); if(tmp=="Top") { tab->setTabPosition(QTabWidget::Bottom); configMenu->changeItem( iD,"Tabs on Top"); cfg.writeEntry("Position","Bottom"); } else { tab->setTabPosition(QTabWidget::Top); configMenu->changeItem( iD,"Tabs on Bottom"); cfg.writeEntry("Position","Top"); } } if( iD == -20) { cfg.setGroup("Commands"); // qDebug("enableCommandEdit"); if( !configMenu->isItemChecked(iD) ) { commonCombo->setEditable( TRUE ); configMenu->setItemChecked(iD,TRUE); commonCombo->setCurrentItem(0); cfg.writeEntry("EditEnabled","TRUE"); } else { commonCombo->setEditable( FALSE ); configMenu->setItemChecked(iD,FALSE); cfg.writeEntry("EditEnabled","FALSE"); commonCombo->setFocusPolicy(QWidget::NoFocus); te->setFocus(); } } } void Konsole::changeCommand(const QString &text, int c) { Config cfg("Konsole"); cfg.setGroup("Commands"); if(commonCmds[c] != text) { cfg.writeEntry(QString::number(c),text); commonCombo->clearEdit(); commonCombo->setCurrentItem(c); } } void Konsole::setColor() { Config cfg("Konsole"); cfg.setGroup("Colors"); int scheme = cfg.readNumEntry("Schema",1); if(scheme != 1) colorMenuSelected( -scheme); - } void Konsole::scrollMenuSelected(int index) { TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("Scrollbar"); switch( index){ case -21: te->setScrollbarLocation(0); cfg.writeEntry("Position",0); break; case -22: te->setScrollbarLocation(1); cfg.writeEntry("Position",1); break; case -23: te->setScrollbarLocation(2); cfg.writeEntry("Position",2); break; }; } |