author | llornkcor <llornkcor> | 2002-02-03 14:11:38 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-03 14:11:38 (UTC) |
commit | ee82c470b34819d24de543b30f150788fb58b2f1 (patch) (unidiff) | |
tree | f1161e9dab6f77de6718fcf0e3a36e1ded4388f0 /core/apps | |
parent | f3def578d169c0a937f418b2d956c73592190cda (diff) | |
download | opie-ee82c470b34819d24de543b30f150788fb58b2f1.zip opie-ee82c470b34819d24de543b30f150788fb58b2f1.tar.gz opie-ee82c470b34819d24de543b30f150788fb58b2f1.tar.bz2 |
fixed problem with commandlist and very long commands messing up the combo width, so you couldn't edit.
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 10 |
1 files changed, 4 insertions, 6 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 | |||
@@ -286,25 +286,25 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
286 | connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); a->addTo( toolbar ); | 286 | connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); a->addTo( toolbar ); |
287 | /* | 287 | /* |
288 | a = new QAction( tr("Up"), Resource::loadPixmap( "up" ), QString::null, 0, this, 0 ); | 288 | a = new QAction( tr("Up"), Resource::loadPixmap( "up" ), QString::null, 0, this, 0 ); |
289 | connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar ); | 289 | connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar ); |
290 | a = new QAction( tr("Down"), Resource::loadPixmap( "down" ), QString::null, 0, this, 0 ); | 290 | a = new QAction( tr("Down"), Resource::loadPixmap( "down" ), QString::null, 0, this, 0 ); |
291 | connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar ); | 291 | connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar ); |
292 | */ | 292 | */ |
293 | 293 | ||
294 | secondToolBar = new QPEToolBar( this ); | 294 | secondToolBar = new QPEToolBar( this ); |
295 | secondToolBar->setHorizontalStretchable( TRUE ); | 295 | secondToolBar->setHorizontalStretchable( TRUE ); |
296 | 296 | ||
297 | commonCombo = new QComboBox( secondToolBar ); | 297 | commonCombo = new QComboBox( secondToolBar ); |
298 | 298 | commonCombo->setMaximumWidth(236); | |
299 | configMenu->insertItem( "Edit Command List"); | 299 | configMenu->insertItem( "Edit Command List"); |
300 | if( listHidden) { | 300 | if( listHidden) { |
301 | secondToolBar->hide(); | 301 | secondToolBar->hide(); |
302 | configMenu->setItemEnabled(-20 ,FALSE); | 302 | configMenu->setItemEnabled(-20 ,FALSE); |
303 | } | 303 | } |
304 | 304 | ||
305 | cfg.setGroup("Commands"); | 305 | cfg.setGroup("Commands"); |
306 | commonCombo->setInsertionPolicy(QComboBox::AtCurrent); | 306 | commonCombo->setInsertionPolicy(QComboBox::AtCurrent); |
307 | 307 | ||
308 | for (int i = 0; commonCmds[i] != NULL; i++) { | 308 | for (int i = 0; commonCmds[i] != NULL; i++) { |
309 | commonCombo->insertItem( commonCmds[i], i ); | 309 | commonCombo->insertItem( commonCmds[i], i ); |
310 | tmp = cfg.readEntry( QString::number(i),""); | 310 | tmp = cfg.readEntry( QString::number(i),""); |
@@ -568,26 +568,25 @@ void Konsole::switchSession(QWidget* w) { | |||
568 | bool cf = fnt->getFont() == teFnt; | 568 | bool cf = fnt->getFont() == teFnt; |
569 | fontList->setItemChecked(i, cf); | 569 | fontList->setItemChecked(i, cf); |
570 | if (cf) { | 570 | if (cf) { |
571 | cfont = i; | 571 | cfont = i; |
572 | } | 572 | } |
573 | } | 573 | } |
574 | } | 574 | } |
575 | 575 | ||
576 | /// ------------------------------- some new stuff by L.J. Potter | 576 | /// ------------------------------- some new stuff by L.J. Potter |
577 | void Konsole::colorMenuSelected(int iD) | 577 | void Konsole::colorMenuSelected(int iD) |
578 | { // this is NOT pretty, elegant or anything else besides functional | 578 | { // this is NOT pretty, elegant or anything else besides functional |
579 | // QString temp; | 579 | // QString temp; |
580 | // temp.sprintf("%d", iD); | 580 | // qDebug( temp.sprintf("%d", iD)); |
581 | // qDebug(temp); | ||
582 | TEWidget* te = getTe(); | 581 | TEWidget* te = getTe(); |
583 | Config cfg("Konsole"); | 582 | Config cfg("Konsole"); |
584 | cfg.setGroup("Colors"); | 583 | cfg.setGroup("Colors"); |
585 | QColor foreground; | 584 | QColor foreground; |
586 | QColor background; | 585 | QColor background; |
587 | colorMenu->setItemChecked(lastSelectedMenu,FALSE); | 586 | colorMenu->setItemChecked(lastSelectedMenu,FALSE); |
588 | ColorEntry m_table[TABLE_COLORS]; | 587 | ColorEntry m_table[TABLE_COLORS]; |
589 | const ColorEntry * defaultCt=te->getdefaultColorTable(); | 588 | const ColorEntry * defaultCt=te->getdefaultColorTable(); |
590 | /////////// fore back | 589 | /////////// fore back |
591 | int i; | 590 | int i; |
592 | if(iD==-8) { // default default | 591 | if(iD==-8) { // default default |
593 | for (i = 0; i < TABLE_COLORS; i++) { | 592 | for (i = 0; i < TABLE_COLORS; i++) { |
@@ -676,27 +675,26 @@ void Konsole::colorMenuSelected(int iD) | |||
676 | } | 675 | } |
677 | else | 676 | else |
678 | m_table[i].color = defaultCt[i].color; | 677 | m_table[i].color = defaultCt[i].color; |
679 | } | 678 | } |
680 | } | 679 | } |
681 | lastSelectedMenu = iD; | 680 | lastSelectedMenu = iD; |
682 | te->setColorTable(m_table); | 681 | te->setColorTable(m_table); |
683 | update(); | 682 | update(); |
684 | } | 683 | } |
685 | 684 | ||
686 | void Konsole::configMenuSelected(int iD) | 685 | void Konsole::configMenuSelected(int iD) |
687 | { | 686 | { |
688 | // QString temp; | 687 | QString temp; |
689 | // temp.sprintf("%d",iD); | 688 | qDebug( temp.sprintf("%d",iD)); |
690 | // qDebug(temp); | ||
691 | TEWidget* te = getTe(); | 689 | TEWidget* te = getTe(); |
692 | Config cfg("Konsole"); | 690 | Config cfg("Konsole"); |
693 | cfg.setGroup("Menubar"); | 691 | cfg.setGroup("Menubar"); |
694 | if( iD == -2) { | 692 | if( iD == -2) { |
695 | if(!secondToolBar->isHidden()) { | 693 | if(!secondToolBar->isHidden()) { |
696 | secondToolBar->hide(); | 694 | secondToolBar->hide(); |
697 | configMenu->changeItem( iD,"Show Command List"); | 695 | configMenu->changeItem( iD,"Show Command List"); |
698 | cfg.writeEntry("Hidden","TRUE"); | 696 | cfg.writeEntry("Hidden","TRUE"); |
699 | configMenu->setItemEnabled(-20 ,FALSE); | 697 | configMenu->setItemEnabled(-20 ,FALSE); |
700 | } else { | 698 | } else { |
701 | secondToolBar->show(); | 699 | secondToolBar->show(); |
702 | configMenu->changeItem( iD,"Hide Command List"); | 700 | configMenu->changeItem( iD,"Hide Command List"); |