summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp3
-rw-r--r--noncore/apps/opie-console/emulation_handler.h1
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp41
-rw-r--r--noncore/apps/opie-console/mainwindow.h9
5 files changed, 55 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 07be30b..b817062 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,4 +9,5 @@
----------
* #1695 - Date selector use too small fontsize on VGA screen (hrw)
+ * #1686 - opie-console lack UI setting for switching scrollbar (hrw)
* n.a. - remove hardcoded font size from wellenreiter (hrw)
* n.a. - added patch to build QT/E 2.3.10 with gc 4.x.x (hrw)
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 2087f57..d5a435e 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -251,2 +251,5 @@ void EmulationHandler::setWrap(int columns) {
}
+void EmulationHandler::setScrollbarLocation(int index) {
+ m_teWid->setScrollbarLocation(index);
+}
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 1092c82..dabdb15 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -84,4 +84,5 @@ public:
/* Propagate change to widget */
void setWrap(int columns);
+ void setScrollbarLocation(int index);
signals:
void send( const QByteArray& );
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 45a662c..18c0434 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -70,4 +70,5 @@ void MainWindow::initUI() {
m_sessionsPop= new QPopupMenu( this );
m_scriptsPop = new QPopupMenu( this );
+ m_scrollbar = new QPopupMenu( this );
/* add a toolbar for icons */
@@ -165,4 +166,15 @@ void MainWindow::initUI() {
this, SLOT( slotFullscreen() ) );
+ /*
+ * scrollbar
+ */
+ sm_none = m_scrollbar->insertItem(tr( "None" ));
+ sm_left = m_scrollbar->insertItem(tr( "Left" ));
+ sm_right = m_scrollbar->insertItem(tr( "Right" ));
+
+ m_console->insertItem(tr("Scrollbar"), m_scrollbar, -1, 0);
+ connect( m_scrollbar, SIGNAL(activated(int)),
+ this, SLOT(slotScrollbarSelected(int)));
+
m_console->insertSeparator();
@@ -694,4 +706,33 @@ void MainWindow::slotFullscreen() {
}
+void MainWindow::slotScrollbarSelected(int index)
+{
+ int loc;
+
+ Config cfg( "Konsole" );
+ cfg.setGroup("ScrollBar");
+ if(index == sm_none)
+ {
+ loc = 0;
+ }
+ else if(index == sm_left)
+ {
+ loc = 1;
+ }
+ else if(index == sm_right)
+ {
+ loc = 2;
+ }
+
+ cfg.writeEntry("Position", loc);
+
+ if (currentSession()) {
+ currentSession()->emulationHandler()->setScrollbarLocation(loc);
+ }
+
+ m_scrollbar->setItemChecked(sm_none, index == sm_none);
+ m_scrollbar->setItemChecked(sm_left, index == sm_left);
+ m_scrollbar->setItemChecked(sm_right, index == sm_right);
+}
void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index f3c8b81..abdf6ee 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -25,4 +25,5 @@ class FKey;
class DocLnk;
+
class MainWindow : public QMainWindow {
Q_OBJECT
@@ -76,4 +77,5 @@ private slots:
void slotSaveHistory();
void slotSaveLog();
+ void slotScrollbarSelected(int);
/* what could these both slot do? */
@@ -106,4 +108,10 @@ private:
ProfileManager* m_manager;
+ /*
+ * scrollbar
+ */
+
+ int sm_none, sm_left, sm_right;
+
TabWidget* m_consoleWindow;
QToolBar* m_tool;
@@ -116,4 +124,5 @@ private:
QPopupMenu* m_scriptsPop;
QPopupMenu* m_scripts;
+ QPopupMenu* m_scrollbar;
QAction* m_connect;
QAction* m_disconnect;