author | llornkcor <llornkcor> | 2002-11-01 01:20:04 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-01 01:20:04 (UTC) |
commit | 8f506dbc2b70df5ea0dd6c61014d20b433b1372f (patch) (unidiff) | |
tree | f70b808e9cd74119ca7957faf1b8451f4bc88aaf | |
parent | 4d2569e18b7f3e27c5d603c080ee3aee5a001231 (diff) | |
download | opie-8f506dbc2b70df5ea0dd6c61014d20b433b1372f.zip opie-8f506dbc2b70df5ea0dd6c61014d20b433b1372f.tar.gz opie-8f506dbc2b70df5ea0dd6c61014d20b433b1372f.tar.bz2 |
fix ischecked wrap menu
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 06bee33..5a68c81 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -930,103 +930,103 @@ void Konsole::editCommandListMenuSelected(int iD) | |||
930 | } | 930 | } |
931 | if(iD == -24) { | 931 | if(iD == -24) { |
932 | // "edit commands" | 932 | // "edit commands" |
933 | CommandEditDialog *m = new CommandEditDialog(this); | 933 | CommandEditDialog *m = new CommandEditDialog(this); |
934 | connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList())); | 934 | connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList())); |
935 | m->showMaximized(); | 935 | m->showMaximized(); |
936 | } | 936 | } |
937 | 937 | ||
938 | } | 938 | } |
939 | 939 | ||
940 | // $QPEDIR/bin/qcop QPE/Application/embeddedkonsole 'setDocument(QString)' 'ssh -V' | 940 | // $QPEDIR/bin/qcop QPE/Application/embeddedkonsole 'setDocument(QString)' 'ssh -V' |
941 | void Konsole::setDocument( const QString &cmd) { | 941 | void Konsole::setDocument( const QString &cmd) { |
942 | newSession(); | 942 | newSession(); |
943 | TEWidget* te = getTe(); | 943 | TEWidget* te = getTe(); |
944 | if(cmd.find("-e", 0, TRUE) != -1) { | 944 | if(cmd.find("-e", 0, TRUE) != -1) { |
945 | QString cmd2; | 945 | QString cmd2; |
946 | cmd2=cmd.right(cmd.length()-3)+" &"; | 946 | cmd2=cmd.right(cmd.length()-3)+" &"; |
947 | system(cmd2.latin1()); | 947 | system(cmd2.latin1()); |
948 | if(startUp <= 1 && nsessions < 2) { | 948 | if(startUp <= 1 && nsessions < 2) { |
949 | doneSession(getTe()->currentSession, 0); | 949 | doneSession(getTe()->currentSession, 0); |
950 | exit(0); | 950 | exit(0); |
951 | } else | 951 | } else |
952 | doneSession(getTe()->currentSession, 0); | 952 | doneSession(getTe()->currentSession, 0); |
953 | } else { | 953 | } else { |
954 | if (te != 0) { | 954 | if (te != 0) { |
955 | te->emitText(cmd+"\r"); | 955 | te->emitText(cmd+"\r"); |
956 | } | 956 | } |
957 | } | 957 | } |
958 | startUp++; | 958 | startUp++; |
959 | } | 959 | } |
960 | 960 | ||
961 | void Konsole::parseCommandLine() { | 961 | void Konsole::parseCommandLine() { |
962 | QString cmd; | 962 | QString cmd; |
963 | // newSession(); | 963 | // newSession(); |
964 | for (int i=1;i< qApp->argc();i++) { | 964 | for (int i=1;i< qApp->argc();i++) { |
965 | if( QString(qApp->argv()[i]) == "-e") { | 965 | if( QString(qApp->argv()[i]) == "-e") { |
966 | i++; | 966 | i++; |
967 | for ( int j=i;j< qApp->argc();j++) { | 967 | for ( int j=i;j< qApp->argc();j++) { |
968 | cmd+=QString(qApp->argv()[j])+" "; | 968 | cmd+=QString(qApp->argv()[j])+" "; |
969 | } | 969 | } |
970 | cmd.stripWhiteSpace(); | 970 | cmd.stripWhiteSpace(); |
971 | system(cmd.latin1()); | 971 | system(cmd.latin1()); |
972 | exit(0);//close(); | 972 | exit(0);//close(); |
973 | } // end -e switch | 973 | } // end -e switch |
974 | } | 974 | } |
975 | startUp++; | 975 | startUp++; |
976 | } | 976 | } |
977 | 977 | ||
978 | void Konsole::changeForegroundColor(const QColor &color) { | 978 | void Konsole::changeForegroundColor(const QColor &color) { |
979 | Config cfg("Konsole"); | 979 | Config cfg("Konsole"); |
980 | cfg.setGroup("Colors"); | 980 | cfg.setGroup("Colors"); |
981 | int r, g, b; | 981 | int r, g, b; |
982 | color.rgb(&r,&g,&b); | 982 | color.rgb(&r,&g,&b); |
983 | foreground.setRgb(r,g,b); | 983 | foreground.setRgb(r,g,b); |
984 | // QString colors; | 984 | // QString colors; |
985 | // colors.sprintf("%d,%d,%d"color.red,color.green,color.blue); | 985 | // colors.sprintf("%d,%d,%d"color.red,color.green,color.blue); |
986 | cfg.writeEntry("foreground",color.name()); | 986 | cfg.writeEntry("foreground",color.name()); |
987 | cfg.write(); | 987 | cfg.write(); |
988 | 988 | ||
989 | qDebug("do other dialog"); | 989 | qDebug("do other dialog"); |
990 | #ifdef QWS_QT_OPIE | 990 | #ifdef QWS_QT_OPIE |
991 | 991 | ||
992 | ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color"); | 992 | ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color"); |
993 | connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, | 993 | connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, |
994 | SLOT(changeBackgroundColor(const QColor&))); | 994 | SLOT(changeBackgroundColor(const QColor&))); |
995 | penColorPopupMenu2->exec(); | 995 | penColorPopupMenu2->exec(); |
996 | #endif | 996 | #endif |
997 | } | 997 | } |
998 | 998 | ||
999 | void Konsole::changeBackgroundColor(const QColor &color) { | 999 | void Konsole::changeBackgroundColor(const QColor &color) { |
1000 | 1000 | ||
1001 | qDebug("Change background"); | 1001 | qDebug("Change background"); |
1002 | Config cfg("Konsole"); | 1002 | Config cfg("Konsole"); |
1003 | cfg.setGroup("Colors"); | 1003 | cfg.setGroup("Colors"); |
1004 | int r, g, b; | 1004 | int r, g, b; |
1005 | color.rgb(&r,&g,&b); | 1005 | color.rgb(&r,&g,&b); |
1006 | background.setRgb(r,g,b); | 1006 | background.setRgb(r,g,b); |
1007 | // QString colors; | 1007 | // QString colors; |
1008 | // colors.sprintf("%d,%d,%d"color.red,color.green,color.blue); | 1008 | // colors.sprintf("%d,%d,%d"color.red,color.green,color.blue); |
1009 | cfg.writeEntry("background",color.name()); | 1009 | cfg.writeEntry("background",color.name()); |
1010 | cfg.write(); | 1010 | cfg.write(); |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | void Konsole::doWrap() { | 1013 | void Konsole::doWrap() { |
1014 | int i; | 1014 | int i; |
1015 | #ifdef QWS_QT_OPIE | 1015 | #ifdef QWS_QT_OPIE |
1016 | i=-29; | 1016 | i=-29; |
1017 | #else | 1017 | #else |
1018 | i=-28; | 1018 | i=-28; |
1019 | #endif | 1019 | #endif |
1020 | 1020 | ||
1021 | Config cfg("Konsole"); | 1021 | Config cfg("Konsole"); |
1022 | cfg.setGroup("ScrollBar"); | 1022 | cfg.setGroup("ScrollBar"); |
1023 | TEWidget* te = getTe(); | 1023 | TEWidget* te = getTe(); |
1024 | if( !cfg.readBoolEntry("HorzScroll",0)) { | 1024 | if( !cfg.readBoolEntry("HorzScroll",0)) { |
1025 | te->setWrapAt(0); | 1025 | te->setWrapAt(0); |
1026 | configMenu->setItemChecked( i,FALSE); | 1026 | configMenu->setItemChecked( i,TRUE); |
1027 | } else { | 1027 | } else { |
1028 | te->setWrapAt(90); | 1028 | te->setWrapAt(90); |
1029 | // te->setWrapAt(120); | 1029 | // te->setWrapAt(120); |
1030 | configMenu->setItemChecked( i,TRUE); | 1030 | configMenu->setItemChecked( i,FALSE); |
1031 | } | 1031 | } |
1032 | } | 1032 | } |