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
@@ -1,22 +1,23 @@
2005-??-?? Opie 1.2.2
New Features
------------
Fixed Bugs
----------
* #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)
2005-09-11 Opie 1.2.1
New Features
------------
* OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
* Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
* Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
* Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
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
@@ -241,12 +241,15 @@ void EmulationHandler::runScript(const Script *script) {
void EmulationHandler::copy() {
m_teWid->emitSelection();
}
void EmulationHandler::paste() {
m_teWid->pasteClipboard();
}
void EmulationHandler::setWrap(int columns) {
m_teWid->setWrapAt(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
@@ -74,24 +74,25 @@ public:
/* Stop recording and remove the current script from memory */
void clearScript();
/* Stop logging and remove the current log from memory */
void clearLog();
/* Run a script by forwarding its keys to the EmulationLayer */
void runScript(const Script *);
/* Propagate change to widget */
void setWrap(int columns);
+ void setScrollbarLocation(int index);
signals:
void send( const QByteArray& );
void changeSize(int rows, int cols );
public slots:
void recv( const QByteArray& );
void paste();
void copy();
private slots:
void recvEmulation( const char*, int len );
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
@@ -60,24 +60,25 @@ void MainWindow::initUI() {
setToolBarsMovable( FALSE );
/* tool bar for the menu */
m_tool = new QToolBar( this );
m_tool->setHorizontalStretchable( TRUE );
m_bar = new QMenuBar( m_tool );
m_console = new QPopupMenu( this );
m_scripts = new QPopupMenu( this );
m_sessionsPop= new QPopupMenu( this );
m_scriptsPop = new QPopupMenu( this );
+ m_scrollbar = new QPopupMenu( this );
/* add a toolbar for icons */
m_icons = new QToolBar(this);
/*
* the settings action
*/
m_setProfiles = new QAction(tr("Configure Profiles"),
Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
QString::null, 0, this, 0);
m_setProfiles->addTo( m_console );
connect( m_setProfiles, SIGNAL(activated() ),
@@ -155,24 +156,35 @@ void MainWindow::initUI() {
/*
* fullscreen
*/
m_isFullscreen = false;
m_fullscreen = new QAction( tr("Full screen"), Opie::Core::OResource::loadPixmap( "fullscreen",
Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
m_fullscreen->addTo( m_console );
connect( m_fullscreen, SIGNAL( activated() ),
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();
m_recordLog = new QAction();
m_recordLog->setText( tr("Start log") );
m_recordLog->addTo( m_console );
connect(m_recordLog, SIGNAL(activated() ),
this, SLOT( slotSaveLog() ) );
m_recordingLog = false;
QAction *a = new QAction();
a->setText( tr("Save history") );
a->addTo( m_console );
@@ -684,24 +696,53 @@ void MainWindow::slotFullscreen() {
( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
( m_curSession->widgetStack() )->setFocus();
( m_curSession->widgetStack() )->show();
( ( m_curSession->emulationHandler() )->cornerButton() )->show();
connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
}
m_isFullscreen = !m_isFullscreen;
}
+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) {
if ( m_curSession ) {
QEvent::Type state;
if (pressed) state = QEvent::KeyPress;
else state = QEvent::KeyRelease;
QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode)));
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
@@ -15,24 +15,25 @@
class QToolBar;
class QToolButton;
class QMenuBar;
class QAction;
class MetaFactory;
class TabWidget;
class ProfileManager;
class Profile;
class FunctionKeyboard;
class FKey;
class DocLnk;
+
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
~MainWindow();
static QString appName() {return QString::fromLatin1("opie-console"); }
/**
* our factory to generate IOLayer and so on
*
*/
MetaFactory* factory();
@@ -66,24 +67,25 @@ private slots:
void slotOpenKeb(bool);
void slotOpenButtons(bool);
void slotRecordScript();
void slotSaveScript();
void slotRunScript(int);
void slotFullscreen();
void slotQuickLaunch();
void slotWrap();
void slotSessionChanged( Session* );
void slotKeyReceived(FKey, ushort, ushort, bool);
void slotSaveHistory();
void slotSaveLog();
+ void slotScrollbarSelected(int);
/* what could these both slot do? */
void slotCopy();
void slotPaste();
/* save the currentSession() to Profiles */
void slotSaveSession();
private:
void initUI();
void populateProfiles();
void populateScripts();
@@ -96,34 +98,41 @@ private:
/**
* the session list
*/
QList<Session> m_sessions;
QList<DocLnk> m_scriptsData;
/**
* the metafactory
*/
MetaFactory* m_factory;
ProfileManager* m_manager;
+ /*
+ * scrollbar
+ */
+
+ int sm_none, sm_left, sm_right;
+
TabWidget* m_consoleWindow;
QToolBar* m_tool;
QToolBar* m_icons;
QToolBar* m_keyBar;
QToolBar* m_buttonBar;
QMenuBar* m_bar;
QPopupMenu* m_console;
QPopupMenu* m_sessionsPop;
QPopupMenu* m_scriptsPop;
QPopupMenu* m_scripts;
+ QPopupMenu* m_scrollbar;
QAction* m_connect;
QAction* m_disconnect;
QAction* m_quickLaunch;
QAction* m_terminate;
QAction* m_transfer;
QAction* m_setProfiles;
QAction* m_openKeys;
QAction* m_openButtons;
QAction* m_recordScript;
QAction* m_saveScript;
QAction* m_fullscreen;
QAction* m_wrap;