summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp43
1 files changed, 34 insertions, 9 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
@@ -20,4 +20,5 @@
/* -------------------------------------------------------------------------- */
// enhancements added by L.J. Potter <ljp@llornkcor.com>
+#define QWS_QT_OPIE
#include <qpe/resource.h>
@@ -55,5 +56,7 @@
#include "commandeditdialog.h"
+#ifdef QWS_QT_OPIE
#include <opie/colorpopupmenu.h>
+#endif
class EKNumTabBar : public QTabBar {
@@ -293,5 +296,9 @@ void Konsole::init(const char* _pgm, QStrList & _args)
colorMenu->insertItem(tr( "Blue on Black"));
colorMenu->insertItem(tr( "Amber on Black"));
+
+#ifdef QWS_QT_OPIE
colorMenu->insertItem(tr( "Custom"));
+#endif
+
configMenu->insertItem(tr( "Colors") ,colorMenu);
@@ -743,5 +750,7 @@ void Konsole::colorMenuSelected(int iD)
colorMenu->setItemChecked(-18,TRUE);
}
- if(iD==-19) {// Custom
+#ifdef QWS_QT_OPIE
+ if(iD==-19) {
+// Custom
qDebug("do custom");
if(fromMenu) {
@@ -759,5 +768,5 @@ void Konsole::colorMenuSelected(int iD)
colorMenu->setItemChecked(-19,TRUE);
}
-
+#endif
for (i = 0; i < TABLE_COLORS; i++) {
if(i==0 || i == 10) {
@@ -779,6 +788,6 @@ void Konsole::colorMenuSelected(int iD)
void Konsole::configMenuSelected(int iD)
{
- QString temp;
- qDebug( temp.sprintf("configmenu %d",iD));
+// QString temp;
+// qDebug( temp.sprintf("configmenu %d",iD));
TEWidget* te = getTe();
Config cfg("Konsole");
@@ -798,5 +807,12 @@ 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");
bool b=cfg.readBoolEntry("HorzScroll",0);
@@ -972,9 +988,11 @@ void Konsole::changeForegroundColor(const QColor &color) {
qDebug("do other dialog");
+#ifdef QWS_QT_OPIE
+
ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color");
connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this,
SLOT(changeBackgroundColor(const QColor&)));
penColorPopupMenu2->exec();
-
+#endif
}
@@ -994,14 +1012,21 @@ void Konsole::changeBackgroundColor(const QColor &color) {
void Konsole::doWrap() {
- Config cfg("Konsole");
+int i;
+#ifdef QWS_QT_OPIE
+i=-29;
+#else
+i=-28;
+#endif
+
+ Config cfg("Konsole");
cfg.setGroup("ScrollBar");
TEWidget* te = getTe();
if( !cfg.readBoolEntry("HorzScroll",0)) {
te->setWrapAt(0);
- configMenu->setItemChecked(-29,FALSE);
+ configMenu->setItemChecked( i,FALSE);
} else {
te->setWrapAt(90);
// te->setWrapAt(120);
- configMenu->setItemChecked(-29,TRUE);
+ configMenu->setItemChecked( i,TRUE);
}
}