-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index f154bb8..653652a 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp @@ -292,19 +292,19 @@ void Konsole::init(const char* _pgm, QStrList & _args) */ 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"); commonCombo->setInsertionPolicy(QComboBox::AtCurrent); for (int i = 0; commonCmds[i] != NULL; i++) { commonCombo->insertItem( commonCmds[i], i ); tmp = cfg.readEntry( QString::number(i),""); @@ -382,13 +382,13 @@ void Konsole::enterCommand(int c) TEWidget* te = getTe(); if (te != 0) { if(!commonCombo->editable()) { QString text = commonCombo->text(c); //commonCmds[c]; te->emitText(text); } else { - changeCommand( commonCombo->text(c), c); + changeCommand( commonCombo->text(c), c); } } } void Konsole::hitEnter() { @@ -574,14 +574,13 @@ void Konsole::switchSession(QWidget* w) { } /// ------------------------------- some new stuff by L.J. Potter void Konsole::colorMenuSelected(int iD) { // this is NOT pretty, elegant or anything else besides functional // QString temp; -// temp.sprintf("%d", iD); -// qDebug(temp); +// qDebug( temp.sprintf("%d", iD)); TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("Colors"); QColor foreground; QColor background; colorMenu->setItemChecked(lastSelectedMenu,FALSE); @@ -682,15 +681,14 @@ void Konsole::colorMenuSelected(int iD) te->setColorTable(m_table); update(); } void Konsole::configMenuSelected(int iD) { -// QString temp; -// temp.sprintf("%d",iD); -// qDebug(temp); + QString temp; + qDebug( temp.sprintf("%d",iD)); TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("Menubar"); if( iD == -2) { if(!secondToolBar->isHidden()) { secondToolBar->hide(); @@ -748,18 +746,18 @@ 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); + commonCombo->setCurrentItem(c); } } void Konsole::setColor() { Config cfg("Konsole"); cfg.setGroup("Colors"); - int scheme = cfg.readNumEntry("Schema",1); - if(scheme != 1) colorMenuSelected( -scheme); + int scheme = cfg.readNumEntry("Schema",1); + if(scheme != 1) colorMenuSelected( -scheme); } |