author | hrw <hrw> | 2005-10-12 21:05:47 (UTC) |
---|---|---|
committer | hrw <hrw> | 2005-10-12 21:05:47 (UTC) |
commit | 6d3c752d2e93f5a43a4b5156f9968e07b3144c0a (patch) (unidiff) | |
tree | 0bdc7f3c4db68a21c266993a96bc428dc96bcbfa /noncore/apps/opie-console/mainwindow.cpp | |
parent | d5beae7038e36633480cc3e17134a85b6d68fbc7 (diff) | |
download | opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.zip opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.tar.gz opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.tar.bz2 |
fixed bug #1686: opie-console lack U I setting for switching scrollbar
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
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 | |||
@@ -69,6 +69,7 @@ void MainWindow::initUI() { | |||
69 | m_scripts = new QPopupMenu( this ); | 69 | m_scripts = new QPopupMenu( this ); |
70 | m_sessionsPop= new QPopupMenu( this ); | 70 | m_sessionsPop= new QPopupMenu( this ); |
71 | m_scriptsPop = new QPopupMenu( this ); | 71 | m_scriptsPop = new QPopupMenu( this ); |
72 | m_scrollbar = new QPopupMenu( this ); | ||
72 | 73 | ||
73 | /* add a toolbar for icons */ | 74 | /* add a toolbar for icons */ |
74 | m_icons = new QToolBar(this); | 75 | m_icons = new QToolBar(this); |
@@ -164,6 +165,17 @@ void MainWindow::initUI() { | |||
164 | connect( m_fullscreen, SIGNAL( activated() ), | 165 | connect( m_fullscreen, SIGNAL( activated() ), |
165 | this, SLOT( slotFullscreen() ) ); | 166 | this, SLOT( slotFullscreen() ) ); |
166 | 167 | ||
168 | /* | ||
169 | * scrollbar | ||
170 | */ | ||
171 | sm_none = m_scrollbar->insertItem(tr( "None" )); | ||
172 | sm_left = m_scrollbar->insertItem(tr( "Left" )); | ||
173 | sm_right = m_scrollbar->insertItem(tr( "Right" )); | ||
174 | |||
175 | m_console->insertItem(tr("Scrollbar"), m_scrollbar, -1, 0); | ||
176 | connect( m_scrollbar, SIGNAL(activated(int)), | ||
177 | this, SLOT(slotScrollbarSelected(int))); | ||
178 | |||
167 | m_console->insertSeparator(); | 179 | m_console->insertSeparator(); |
168 | 180 | ||
169 | m_recordLog = new QAction(); | 181 | m_recordLog = new QAction(); |
@@ -693,6 +705,35 @@ void MainWindow::slotFullscreen() { | |||
693 | m_isFullscreen = !m_isFullscreen; | 705 | m_isFullscreen = !m_isFullscreen; |
694 | } | 706 | } |
695 | 707 | ||
708 | void MainWindow::slotScrollbarSelected(int index) | ||
709 | { | ||
710 | int loc; | ||
711 | |||
712 | Config cfg( "Konsole" ); | ||
713 | cfg.setGroup("ScrollBar"); | ||
714 | if(index == sm_none) | ||
715 | { | ||
716 | loc = 0; | ||
717 | } | ||
718 | else if(index == sm_left) | ||
719 | { | ||
720 | loc = 1; | ||
721 | } | ||
722 | else if(index == sm_right) | ||
723 | { | ||
724 | loc = 2; | ||
725 | } | ||
726 | |||
727 | cfg.writeEntry("Position", loc); | ||
728 | |||
729 | if (currentSession()) { | ||
730 | currentSession()->emulationHandler()->setScrollbarLocation(loc); | ||
731 | } | ||
732 | |||
733 | m_scrollbar->setItemChecked(sm_none, index == sm_none); | ||
734 | m_scrollbar->setItemChecked(sm_left, index == sm_left); | ||
735 | m_scrollbar->setItemChecked(sm_right, index == sm_right); | ||
736 | } | ||
696 | 737 | ||
697 | void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { | 738 | void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { |
698 | 739 | ||