-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 20 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 31 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.h | 4 |
3 files changed, 49 insertions, 6 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index f10bfb2..a56dc50 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp @@ -52,2 +52,3 @@ #include "session.h" +#include <qpe/config.h> @@ -154,3 +155,3 @@ void TEWidget::setColorTable(const ColorEntry table[]) for (int i = 0; i < TABLE_COLORS; i++) color_table[i] = table[i]; - + const QPixmap* pm = backgroundPixmap(); @@ -287,3 +288,16 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); - scrollLoc = SCRNONE; + + Config cfg("Konsole"); + cfg.setGroup("ScrollBar"); + switch( cfg.readNumEntry("Position",2)){ + case 0: + scrollLoc = SCRNONE; + break; + case 1: + scrollLoc = SCRLEFT; + break; + case 2: + scrollLoc = SCRRIGHT; + break; + }; @@ -653,3 +667,3 @@ void TEWidget::mousePressEvent(QMouseEvent* ev) actSel = 1; // left mouse button pressed but nothing selected yet. - grabMouse( /*crossCursor*/ ); // handle with care! + grabMouse( /*crossCursor*/ ); // handle with care! } diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index d54fa1f..e2d4886 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp @@ -226,3 +226,4 @@ void Konsole::init(const char* _pgm, QStrList & _args) colorMenu = new QPopupMenu( this); - + scrollMenu = new QPopupMenu( this); + bool listHidden; @@ -265,2 +266,3 @@ void Konsole::init(const char* _pgm, QStrList & _args) connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) )); + connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); @@ -318,2 +320,7 @@ void Konsole::init(const char* _pgm, QStrList & _args) + scrollMenu->insertItem("None"); + scrollMenu->insertItem("Left"); + scrollMenu->insertItem("Right"); + configMenu->insertItem("ScrollBar",scrollMenu); + // create applications ///////////////////////////////////////////////////// @@ -765 +772,23 @@ void Konsole::setColor() } + +void Konsole::scrollMenuSelected(int index) +{ + TEWidget* te = getTe(); +Config cfg("Konsole"); + cfg.setGroup("Scrollbar"); + switch( index){ + case -21: + te->setScrollbarLocation(0); + cfg.writeEntry("Position",0); + break; + case -22: + te->setScrollbarLocation(1); + cfg.writeEntry("Position",1); + break; + case -23: + te->setScrollbarLocation(2); + cfg.writeEntry("Position",2); + break; + }; + +} diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h index 40003d4..b4e5d87 100644 --- a/core/apps/embeddedkonsole/konsole.h +++ b/core/apps/embeddedkonsole/konsole.h @@ -72,3 +72,3 @@ private slots: void changeCommand(const QString &, int); - + void scrollMenuSelected(int); private: @@ -114,3 +114,3 @@ private: - QPopupMenu* fontList,*configMenu,*colorMenu; + QPopupMenu* fontList,*configMenu,*colorMenu,*scrollMenu; QComboBox *commonCombo; |