summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-31 21:28:50 (UTC)
committer llornkcor <llornkcor>2002-10-31 21:28:50 (UTC)
commit0fcca5c3bf885262393a9c3291e5c1823fe1b1b9 (patch) (unidiff)
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 @@
21// enhancements added by L.J. Potter <ljp@llornkcor.com> 21// enhancements added by L.J. Potter <ljp@llornkcor.com>
22#define QWS_QT_OPIE
22 23
@@ -56,3 +57,5 @@
56 57
58#ifdef QWS_QT_OPIE
57#include <opie/colorpopupmenu.h> 59#include <opie/colorpopupmenu.h>
60#endif
58 61
@@ -294,3 +297,7 @@ void Konsole::init(const char* _pgm, QStrList & _args)
294 colorMenu->insertItem(tr( "Amber on Black")); 297 colorMenu->insertItem(tr( "Amber on Black"));
298
299#ifdef QWS_QT_OPIE
295 colorMenu->insertItem(tr( "Custom")); 300 colorMenu->insertItem(tr( "Custom"));
301#endif
302
296 configMenu->insertItem(tr( "Colors") ,colorMenu); 303 configMenu->insertItem(tr( "Colors") ,colorMenu);
@@ -744,3 +751,5 @@ void Konsole::colorMenuSelected(int iD)
744 } 751 }
745 if(iD==-19) {// Custom 752#ifdef QWS_QT_OPIE
753 if(iD==-19) {
754// Custom
746 qDebug("do custom"); 755 qDebug("do custom");
@@ -760,3 +769,3 @@ void Konsole::colorMenuSelected(int iD)
760 } 769 }
761 770#endif
762 for (i = 0; i < TABLE_COLORS; i++) { 771 for (i = 0; i < TABLE_COLORS; i++) {
@@ -780,4 +789,4 @@ void Konsole::configMenuSelected(int iD)
780{ 789{
781 QString temp; 790// QString temp;
782 qDebug( temp.sprintf("configmenu %d",iD)); 791// qDebug( temp.sprintf("configmenu %d",iD));
783 TEWidget* te = getTe(); 792 TEWidget* te = getTe();
@@ -799,3 +808,10 @@ void Konsole::configMenuSelected(int iD)
799 } 808 }
800 if( iD == -29) { 809 int i;
810#ifdef QWS_QT_OPIE
811i=-29;
812#else
813i=-28;
814#endif
815
816 if( iD == i) {
801 cfg.setGroup("ScrollBar"); 817 cfg.setGroup("ScrollBar");
@@ -973,2 +989,4 @@ void Konsole::changeForegroundColor(const QColor &color) {
973qDebug("do other dialog"); 989qDebug("do other dialog");
990#ifdef QWS_QT_OPIE
991
974 ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color"); 992 ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color");
@@ -977,3 +995,3 @@ qDebug("do other dialog");
977 penColorPopupMenu2->exec(); 995 penColorPopupMenu2->exec();
978 996#endif
979} 997}
@@ -995,3 +1013,10 @@ void Konsole::changeBackgroundColor(const QColor &color) {
995void Konsole::doWrap() { 1013void Konsole::doWrap() {
996 Config cfg("Konsole"); 1014int i;
1015#ifdef QWS_QT_OPIE
1016i=-29;
1017#else
1018i=-28;
1019#endif
1020
1021 Config cfg("Konsole");
997 cfg.setGroup("ScrollBar"); 1022 cfg.setGroup("ScrollBar");
@@ -1000,3 +1025,3 @@ void Konsole::doWrap() {
1000 te->setWrapAt(0); 1025 te->setWrapAt(0);
1001 configMenu->setItemChecked(-29,FALSE); 1026 configMenu->setItemChecked( i,FALSE);
1002 } else { 1027 } else {
@@ -1004,3 +1029,3 @@ void Konsole::doWrap() {
1004// te->setWrapAt(120); 1029// te->setWrapAt(120);
1005 configMenu->setItemChecked(-29,TRUE); 1030 configMenu->setItemChecked( i,TRUE);
1006 } 1031 }