summaryrefslogtreecommitdiff
authorhrw <hrw>2005-10-12 21:05:47 (UTC)
committer hrw <hrw>2005-10-12 21:05:47 (UTC)
commit6d3c752d2e93f5a43a4b5156f9968e07b3144c0a (patch) (side-by-side diff)
tree0bdc7f3c4db68a21c266993a96bc428dc96bcbfa
parentd5beae7038e36633480cc3e17134a85b6d68fbc7 (diff)
downloadopie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.zip
opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.tar.gz
opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.tar.bz2
fixed bug #1686: opie-console lack U I setting for switching scrollbar
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
@@ -10,2 +10,3 @@
* #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)
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
@@ -252 +252,4 @@ 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
@@ -85,2 +85,3 @@ public:
void setWrap(int columns);
+ void setScrollbarLocation(int index);
signals:
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
@@ -71,2 +71,3 @@ void MainWindow::initUI() {
m_scriptsPop = new QPopupMenu( this );
+ m_scrollbar = new QPopupMenu( this );
@@ -166,2 +167,13 @@ void MainWindow::initUI() {
+ /*
+ * 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();
@@ -695,2 +707,31 @@ 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);
+}
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
@@ -26,2 +26,3 @@ class DocLnk;
+
class MainWindow : public QMainWindow {
@@ -77,2 +78,3 @@ private slots:
void slotSaveLog();
+ void slotScrollbarSelected(int);
@@ -107,2 +109,8 @@ private:
+ /*
+ * scrollbar
+ */
+
+ int sm_none, sm_left, sm_right;
+
TabWidget* m_consoleWindow;
@@ -117,2 +125,3 @@ private:
QPopupMenu* m_scripts;
+ QPopupMenu* m_scrollbar;
QAction* m_connect;