summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp41
1 files changed, 33 insertions, 8 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 16db0ea..06bee33 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -21,2 +21,3 @@
// enhancements added by L.J. Potter <ljp@llornkcor.com>
+#define QWS_QT_OPIE
@@ -56,3 +57,5 @@
+#ifdef QWS_QT_OPIE
#include <opie/colorpopupmenu.h>
+#endif
@@ -294,3 +297,7 @@ void Konsole::init(const char* _pgm, QStrList & _args)
colorMenu->insertItem(tr( "Amber on Black"));
+
+#ifdef QWS_QT_OPIE
colorMenu->insertItem(tr( "Custom"));
+#endif
+
configMenu->insertItem(tr( "Colors") ,colorMenu);
@@ -744,3 +751,5 @@ void Konsole::colorMenuSelected(int iD)
}
- if(iD==-19) {// Custom
+#ifdef QWS_QT_OPIE
+ if(iD==-19) {
+// Custom
qDebug("do custom");
@@ -760,3 +769,3 @@ void Konsole::colorMenuSelected(int iD)
}
-
+#endif
for (i = 0; i < TABLE_COLORS; i++) {
@@ -780,4 +789,4 @@ void Konsole::configMenuSelected(int iD)
{
- QString temp;
- qDebug( temp.sprintf("configmenu %d",iD));
+// QString temp;
+// qDebug( temp.sprintf("configmenu %d",iD));
TEWidget* te = getTe();
@@ -799,3 +808,10 @@ void Konsole::configMenuSelected(int iD)
}
- if( iD == -29) {
+ int i;
+#ifdef QWS_QT_OPIE
+i=-29;
+#else
+i=-28;
+#endif
+
+ if( iD == i) {
cfg.setGroup("ScrollBar");
@@ -973,2 +989,4 @@ void Konsole::changeForegroundColor(const QColor &color) {
qDebug("do other dialog");
+#ifdef QWS_QT_OPIE
+
ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color");
@@ -977,3 +995,3 @@ qDebug("do other dialog");
penColorPopupMenu2->exec();
-
+#endif
}
@@ -995,2 +1013,9 @@ void Konsole::changeBackgroundColor(const QColor &color) {
void Konsole::doWrap() {
+int i;
+#ifdef QWS_QT_OPIE
+i=-29;
+#else
+i=-28;
+#endif
+
Config cfg("Konsole");
@@ -1000,3 +1025,3 @@ void Konsole::doWrap() {
te->setWrapAt(0);
- configMenu->setItemChecked(-29,FALSE);
+ configMenu->setItemChecked( i,FALSE);
} else {
@@ -1004,3 +1029,3 @@ void Konsole::doWrap() {
// te->setWrapAt(120);
- configMenu->setItemChecked(-29,TRUE);
+ configMenu->setItemChecked( i,TRUE);
}