summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-31 21:28:50 (UTC)
committer llornkcor <llornkcor>2002-10-31 21:28:50 (UTC)
commit0fcca5c3bf885262393a9c3291e5c1823fe1b1b9 (patch) (side-by-side diff)
tree4941253d8192caf2788327ed8d9169f3e9f3c835
parent5409ca99206235961e964b42f5b7826bae95a42e (diff)
downloadopie-0fcca5c3bf885262393a9c3291e5c1823fe1b1b9.zip
opie-0fcca5c3bf885262393a9c3291e5c1823fe1b1b9.tar.gz
opie-0fcca5c3bf885262393a9c3291e5c1823fe1b1b9.tar.bz2
added easy way ifdef for me to compile without libopie
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
@@ -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,3 +1013,10 @@ 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");
@@ -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);
}