summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-09 16:28:53 (UTC)
committer llornkcor <llornkcor>2002-11-09 16:28:53 (UTC)
commit4482a8372144f3afa434416e43b6193a54a99a4e (patch) (side-by-side diff)
treef6a88d3d41a547abb8cc6bdd3e5e719649348e36
parent41fc715a41b7ef2289ae84957e593a04664a04e6 (diff)
downloadopie-4482a8372144f3afa434416e43b6193a54a99a4e.zip
opie-4482a8372144f3afa434416e43b6193a54a99a4e.tar.gz
opie-4482a8372144f3afa434416e43b6193a54a99a4e.tar.bz2
small changes
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xcore/apps/embeddedkonsole/embeddedkonsole.pro1
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp21
2 files changed, 13 insertions, 9 deletions
diff --git a/core/apps/embeddedkonsole/embeddedkonsole.pro b/core/apps/embeddedkonsole/embeddedkonsole.pro
index bfa16a2..913cb89 100755
--- a/core/apps/embeddedkonsole/embeddedkonsole.pro
+++ b/core/apps/embeddedkonsole/embeddedkonsole.pro
@@ -31,12 +31,13 @@ SOURCES = TEScreen.cpp \
main.cpp
INTERFACES = commandeditdialogbase.ui smallcommandeditdialogbase.ui
TARGET = embeddedkonsole
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
+TMAKE_CXXFLAGS += -DQT_QWS_OPIE
TRANSLATIONS = ../../../i18n/de/embeddedkonsole.ts \
../../../i18n/en/embeddedkonsole.ts \
../../../i18n/es/embeddedkonsole.ts \
../../../i18n/fr/embeddedkonsole.ts \
../../../i18n/hu/embeddedkonsole.ts \
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index ebff05e..4480fe2 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -16,13 +16,13 @@
/* Ported Konsole to Qt/Embedded */
/* */
/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
/* */
/* -------------------------------------------------------------------------- */
// enhancements added by L.J. Potter <ljp@llornkcor.com>
-#define QWS_QT_OPIE
+//#define QT_QWS_OPIE
#include <qpe/resource.h>
#include <qdir.h>
#include <qevent.h>
#include <qdragobject.h>
@@ -52,13 +52,13 @@
#include <assert.h>
#include "konsole.h"
#include "keytrans.h"
#include "commandeditdialog.h"
-#ifdef QWS_QT_OPIE
+#ifdef QT_QWS_OPIE
#include <opie/colorpopupmenu.h>
#endif
class EKNumTabBar : public QTabBar {
public:
void numberTabs()
@@ -293,13 +293,13 @@ void Konsole::init(const char* _pgm, QStrList & _args)
colorMenu->insertItem(tr( "Magenta on Blue"));
colorMenu->insertItem(tr( "Cyan on White"));
colorMenu->insertItem(tr( "White on Cyan"));
colorMenu->insertItem(tr( "Blue on Black"));
colorMenu->insertItem(tr( "Amber on Black"));
-#ifdef QWS_QT_OPIE
+#ifdef QT_QWS_OPIE
colorMenu->insertItem(tr( "Custom"));
#endif
configMenu->insertItem(tr( "Colors") ,colorMenu);
connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
@@ -367,14 +367,17 @@ void Konsole::init(const char* _pgm, QStrList & _args)
scrollMenu->insertItem(tr( "Right" ));
// scrollMenu->insertSeparator(4);
// scrollMenu->insertItem(tr( "Horizontal" ));
configMenu->insertItem(tr( "ScrollBar" ),scrollMenu);
- configMenu->insertItem(tr( "Wrap" ));
- int jut = configMenu->insertItem(tr( "Use Beep" ));
+ int jut = configMenu->insertItem(tr( "Wrap" ));
+ cfg.setGroup("ScrollBar");
+ configMenu->setItemChecked(jut, cfg.readBoolEntry("HorzScroll",0));
+
+ jut = configMenu->insertItem(tr( "Use Beep" ));
cfg.setGroup("Menubar");
configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0));
//scrollMenuSelected(-29);
// cfg.setGroup("ScrollBar");
@@ -750,13 +753,13 @@ void Konsole::colorMenuSelected(int iD)
if(iD==-18) {// Black, Gold
background.setRgb(0x00,0x00,0x00);
foreground.setRgb(255,215,0);
cfg.writeEntry("Schema","18");
colorMenu->setItemChecked(-18,TRUE);
}
-#ifdef QWS_QT_OPIE
+#ifdef QT_QWS_OPIE
if(iD==-19) {
// Custom
qDebug("do custom");
if(fromMenu) {
ColorPopupMenu* penColorPopupMenu = new ColorPopupMenu(Qt::black, this, "foreground color");
connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this,
@@ -794,13 +797,13 @@ void Konsole::configMenuSelected(int iD)
// QString temp;
// qDebug( temp.sprintf("configmenu %d",iD));
TEWidget* te = getTe();
Config cfg("Konsole");
cfg.setGroup("Menubar");
int i,j;
-#ifdef QWS_QT_OPIE
+#ifdef QT_QWS_OPIE
i=-29;j=-30;
#else
i=-28;j=-29;
#endif
if(iD == -4) {
@@ -997,13 +1000,13 @@ void Konsole::changeForegroundColor(const QColor &color) {
cfg.writeEntry("foreground",color.name());
qDebug("foreground "+color.name());
cfg.write();
qDebug("do other dialog");
-#ifdef QWS_QT_OPIE
+#ifdef QT_QWS_OPIE
ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color");
connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this,
SLOT(changeBackgroundColor(const QColor&)));
penColorPopupMenu2->exec();
#endif
@@ -1021,13 +1024,13 @@ void Konsole::changeBackgroundColor(const QColor &color) {
qDebug("background "+color.name());
cfg.write();
}
void Konsole::doWrap() {
int i;
-#ifdef QWS_QT_OPIE
+#ifdef QT_QWS_OPIE
i=-29;
#else
i=-28;
#endif
Config cfg("Konsole");