[Pkg-owncloud-commits] [owncloud-client] 56/219: Make Settings Window close on Ctrl+W

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit fcbadda40f8a9e200ce5c28779cafbc89b3a9a71
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Tue Sep 2 13:58:55 2014 +0200

    Make Settings Window close on Ctrl+W
    
    Fixes #2141
    
    (cherry picked from commit 2ab19b23d7ca5c9cdd811d85caae69ecc839a625)
---
 src/mirall/settingsdialog.cpp    | 7 +++++++
 src/mirall/settingsdialogmac.cpp | 7 ++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/mirall/settingsdialog.cpp b/src/mirall/settingsdialog.cpp
index cc7cc99..f3bfbcc 100644
--- a/src/mirall/settingsdialog.cpp
+++ b/src/mirall/settingsdialog.cpp
@@ -45,6 +45,13 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
 {
     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
     _ui->setupUi(this);
+
+    // People perceive this as a Window, so also make Ctrl+W work
+    QAction *closeWindowAction = new QAction(this);
+    closeWindowAction->setShortcut(QKeySequence("Ctrl+W"));
+    connect(closeWindowAction, SIGNAL(triggered()), SLOT(accept()));
+    addAction(closeWindowAction);
+
     setObjectName("Settings"); // required as group for saveGeometry call
 
     setWindowTitle(tr("%1").arg(Theme::instance()->appNameGUI()));
diff --git a/src/mirall/settingsdialogmac.cpp b/src/mirall/settingsdialogmac.cpp
index 23466c6..87f7945 100644
--- a/src/mirall/settingsdialogmac.cpp
+++ b/src/mirall/settingsdialogmac.cpp
@@ -30,8 +30,13 @@ SettingsDialogMac::SettingsDialogMac(ownCloudGui *gui, QWidget *parent)
 
 
     // Emulate dialog behavior: Escape means close
+    QAction *closeDialogAction = new QAction(this);
+    closeDialogAction->setShortcut(QKeySequence(Qt::Key_Escape));
+    connect(closeDialogAction, SIGNAL(triggered()), SLOT(close()));
+    addAction(closeDialogAction);
+    // People perceive this as a Window, so also make Ctrl+W work
     QAction *closeWindowAction = new QAction(this);
-    closeWindowAction->setShortcut(QKeySequence(Qt::Key_Escape));
+    closeWindowAction->setShortcut(QKeySequence("Ctrl+W"));
     connect(closeWindowAction, SIGNAL(triggered()), SLOT(close()));
     addAction(closeWindowAction);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list