The branch, master has been updated
via d8928beb7462b6fd7d8b0964be232d6258b2ec74 (commit)
from 573b457d838c1a8455d0a57c7ed095be6c4f0237 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d8928beb7462b6fd7d8b0964be232d6258b2ec74
Author: Ezra Bühler <me(a)easyb.ch>
Date: Wed Dec 12 12:56:24 2012 +0100
Make it possible to resume a session using the keyboard only. Also fix the tab order in the resume session dialog by changing the focus policy of the main window. (Closes upstream issue #80).
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 7 +++++++
onmainwindow.cpp | 12 +++++++-----
onmainwindow.h | 24 ++++++++++++++++++++++--
3 files changed, 36 insertions(+), 7 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 65d859b..0366f5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,13 @@ x2goclient (3.99.3.1-0~x2go1) UNRELEASED; urgency=low
* New upstream version (3.99.3.1):
- Update Swedish translation.
+ [ Ezra Bühler ]
+ * New upstream version (3.99.3.1):
+ - Make it possible to resume a session using the keyboard only.
+ Also fix the tab order in the resume session dialog by
+ changing the focus policy of the main window. (Closes
+ upstream issue #80).
+
[ Jan Engelhardt ]
* New upstream version (3.99.3.1):
- Fix Debian-like Qt path (qmake will handle it internally).
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 1f2e2b7..4f8f95a 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -51,7 +51,7 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent )
image=shape=0;
#endif
x2goDebug<<"ONMainWindow constructor"<<endl;
- setFocusPolicy ( Qt::StrongFocus );
+ setFocusPolicy ( Qt::NoFocus );
installTranslator();
cleanAllFiles=false;
drawMenu=true;
@@ -4177,6 +4177,9 @@ void ONMainWindow::selectSession ( QStringList& sessions )
desktopFilter->setFocus();
desktopFilter->selectAll();
}
+
+ sessTv->setCurrentIndex ( sessTv->model()->index ( 0, 0 ) );
+ sessTv->setFocus();
selectSessionDlg->show();
}
@@ -10411,7 +10414,7 @@ void ONMainWindow::initSelectSessDlg()
selectSessionDlg->setEnabled ( true );
setEnabled ( true );
- sessTv=new QTreeView ( selectSessionDlg );
+ sessTv=new SessTreeView ( selectSessionDlg );
setWidgetStyle ( sessTv );
setWidgetStyle ( sessTv->horizontalScrollBar() );
setWidgetStyle ( sessTv->verticalScrollBar() );
@@ -10518,10 +10521,9 @@ void ONMainWindow::initSelectSessDlg()
bSusp->hide();
bTerm->hide();
- connect ( sessTv,SIGNAL ( clicked ( const QModelIndex& ) ),
+ connect ( sessTv,SIGNAL ( selected ( const QModelIndex& ) ),
this,SLOT ( slotActivated ( const QModelIndex& ) ) );
-
- connect ( sessTv,SIGNAL ( doubleClicked ( const QModelIndex& ) ),
+ connect ( sessTv,SIGNAL ( activated ( const QModelIndex& ) ),
this,SLOT ( slotResumeDoubleClick ( const QModelIndex& ) ) );
connect ( sOk,SIGNAL ( clicked() ),this, SLOT ( slotResumeSess() ) );
diff --git a/onmainwindow.h b/onmainwindow.h
index 7c1b2a5..550aa12 100644
--- a/onmainwindow.h
+++ b/onmainwindow.h
@@ -40,6 +40,7 @@
#include <QPushButton>
#include <QPixmap>
#include <QProcess>
+#include <QTreeView>
#include "LDAPSession.h"
#include <QToolBar>
#include <QSystemTrayIcon>
@@ -73,7 +74,6 @@ class SVGFrame;
class SessionButton;
class QAction;
class QCheckBox;
-class QTreeView;
class QModelIndex;
class SshMasterConnection;
class IMGFrame;
@@ -247,6 +247,26 @@ private:
ONMainWindow* parent;
};
#endif
+
+
+class SessTreeView : public QTreeView
+{
+ Q_OBJECT
+
+public:
+ SessTreeView ( QWidget* parent = 0 ) : QTreeView ( parent ) {}
+
+ virtual void selectionChanged ( const QItemSelection& selected,
+ const QItemSelection& deselected ) {
+ emit this->selected ( currentIndex() );
+ QTreeView::selectionChanged ( selected, deselected );
+ }
+
+Q_SIGNALS:
+ void selected ( const QModelIndex& index );
+};
+
+
class ClickLineEdit;
class ONMainWindow : public QMainWindow
#ifdef CFGPLUGIN
@@ -580,7 +600,7 @@ private:
QLabel* selectSessionLabel;
- QTreeView* sessTv;
+ SessTreeView* sessTv;
QLineEdit* desktopFilter;
QCheckBox* desktopFilterCb;
hooks/post-receive
--
x2goclient.git (X2Go Client)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goclient.git" (X2Go Client).