author | llornkcor <llornkcor> | 2002-11-10 02:09:45 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-10 02:09:45 (UTC) |
commit | 7601c75b529d9ff205403a32206b9431845cfc91 (patch) (side-by-side diff) | |
tree | 83aa6347ad7e0cf0175f88f86666c5df705526b1 | |
parent | ea13a08c3f27b007b24743d8de066fbe52961534 (diff) | |
download | opie-7601c75b529d9ff205403a32206b9431845cfc91.zip opie-7601c75b529d9ff205403a32206b9431845cfc91.tar.gz opie-7601c75b529d9ff205403a32206b9431845cfc91.tar.bz2 |
fixes for sharp rom version
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 4480fe2..8885b58 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp @@ -825,124 +825,130 @@ void Konsole::configMenuSelected(int iD) bool b=cfg.readBoolEntry("HorzScroll",0); b=!b; cfg.writeEntry("HorzScroll", b ); cfg.write(); doWrap(); if(cfg.readNumEntry("Position",2) == 0) { te->setScrollbarLocation(1); } else { te->setScrollbarLocation(0); } te->setScrollbarLocation( cfg.readNumEntry("Position",2)); } if(iD == j) { cfg.setGroup("Menubar"); bool b=cfg.readBoolEntry("useBeep",0); b=!b; cfg.writeEntry("useBeep", b ); cfg.write(); configMenu->setItemChecked(j,b); te->useBeep=b; } } 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) { qDebug( "scrollbar menu %d",index); TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("ScrollBar"); - switch( index){ - case -25: - te->setScrollbarLocation(0); - cfg.writeEntry("Position",0); - break; - case -26: - te->setScrollbarLocation(1); - cfg.writeEntry("Position",1); - break; - case -27: - te->setScrollbarLocation(2); - cfg.writeEntry("Position",2); - break; + int i,j,k; +#ifdef QT_QWS_OPIE +i=-25;j=-26;k=-27; +#else +i=-24;j=-25;k=-26; +#endif + if(index == i) { + + te->setScrollbarLocation(0); + cfg.writeEntry("Position",0); + } else if(index == j) { + + te->setScrollbarLocation(1); + cfg.writeEntry("Position",1); + } else if(index == k) { + + te->setScrollbarLocation(2); + cfg.writeEntry("Position",2); + } + // case -29: { // bool b=cfg.readBoolEntry("HorzScroll",0); // cfg.writeEntry("HorzScroll", !b ); // cfg.write(); // if(cfg.readNumEntry("Position",2) == 0) { // te->setScrollbarLocation(1); // te->setWrapAt(0); // } else { // te->setScrollbarLocation(0); // te->setWrapAt(120); // } // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); // } // break; - }; } void Konsole::editCommandListMenuSelected(int iD) { // QString temp; // qDebug( temp.sprintf("edit command list %d",iD)); TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("Menubar"); if( iD == -3) { if(!secondToolBar->isHidden()) { secondToolBar->hide(); configMenu->changeItem( iD,tr( "Show Command List" )); cfg.writeEntry("Hidden","TRUE"); configMenu->setItemEnabled(-23 ,FALSE); } else { secondToolBar->show(); configMenu->changeItem( iD,tr( "Hide Command List" )); cfg.writeEntry("Hidden","FALSE"); configMenu->setItemEnabled(-23 ,TRUE); if(cfg.readEntry("EditEnabled","FALSE")=="TRUE") { configMenu->setItemChecked(-23,TRUE); commonCombo->setEditable( TRUE ); } else { configMenu->setItemChecked(-23,FALSE); commonCombo->setEditable( FALSE ); } } } if( iD == -23) { 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(); } } if(iD == -24) { // "edit commands" |