summaryrefslogtreecommitdiff
authorleseb <leseb>2002-07-07 18:38:50 (UTC)
committer leseb <leseb>2002-07-07 18:38:50 (UTC)
commit29afb9794560f9aa2342bf971ece66336d052b17 (patch) (side-by-side diff)
tree33a82050f295eded341ae9f81ddb281b98d2cc89
parent5a6d27d4ef5a00dfa041323938acdbdf80c726fd (diff)
downloadopie-29afb9794560f9aa2342bf971ece66336d052b17.zip
opie-29afb9794560f9aa2342bf971ece66336d052b17.tar.gz
opie-29afb9794560f9aa2342bf971ece66336d052b17.tar.bz2
Fix menu item index (again...)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 36b9b1e..63073c4 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -805,113 +805,113 @@ void Konsole::scrollMenuSelected(int 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;
};
}
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(-22 ,FALSE);
} else {
secondToolBar->show();
configMenu->changeItem( iD,tr( "Hide Command List" ));
cfg.writeEntry("Hidden","FALSE");
configMenu->setItemEnabled(-22 ,TRUE);
if(cfg.readEntry("EditEnabled","FALSE")=="TRUE") {
configMenu->setItemChecked(-22,TRUE);
commonCombo->setEditable( TRUE );
} else {
configMenu->setItemChecked(-22,FALSE);
commonCombo->setEditable( FALSE );
}
}
}
- if( iD == -22) {
+ 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 == -23) {
+ if(iD == -24) {
// "edit commands"
CommandEditDialog *m = new CommandEditDialog(this);
connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList()));
m->showMaximized();
}
}
// $QPEDIR/bin/qcop QPE/Application/embeddedkonsole 'setDocument(QString)' 'ssh -V'
void Konsole::setDocument( const QString &cmd) {
newSession();
TEWidget* te = getTe();
if(cmd.find("-e", 0, TRUE) != -1) {
QString cmd2;
cmd2=cmd.right(cmd.length()-3)+" &";
system(cmd2.latin1());
if(startUp <= 1 && nsessions < 2) {
doneSession(getTe()->currentSession, 0);
exit(0);
} else
doneSession(getTe()->currentSession, 0);
} else {
if (te != 0) {
te->emitText(cmd+"\r");
}
}
startUp++;
}
void Konsole::parseCommandLine() {
QString cmd;
// newSession();
for (int i=1;i< qApp->argc();i++) {
if( QString(qApp->argv()[i]) == "-e") {
i++;
for ( int j=i;j< qApp->argc();j++) {
cmd+=QString(qApp->argv()[j])+" ";
}
cmd.stripWhiteSpace();
system(cmd.latin1());
exit(0);//close();
} // end -e switch
}
startUp++;
}
void Konsole::changeForegroundColor(const QColor &color) {
Config cfg("Konsole");