cmd+m should minimize the app as per apple human guidelines
authorkoda
Sat, 02 Apr 2011 20:57:40 +0200
changeset 5087 d3af455a868e
parent 5086 df5bd3c32e19
child 5088 8be2a0e9d276
cmd+m should minimize the app as per apple human guidelines
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Sat Apr 02 21:20:18 2011 +0400
+++ b/QTfrontend/hwform.cpp	Sat Apr 02 20:57:40 2011 +0200
@@ -98,6 +98,7 @@
 
 #ifdef __APPLE__
     panel = new M3Panel;
+
 #ifdef SPARKLE_ENABLED
     AutoUpdater* updater;
     CocoaInitializer initializer;
@@ -105,6 +106,9 @@
     if (updater && config->isAutoUpdateEnabled())
         updater->checkForUpdates();
 #endif
+
+    QShortcut *hideFrontend = new QShortcut(QKeySequence("Ctrl+M"), this);
+    connect (hideFrontend, SIGNAL(activated()), this, SLOT(showMinimized()));
 #else
     // ctrl+q closes frontend for consistency
     QShortcut *closeFrontend = new QShortcut(QKeySequence("Ctrl+Q"), this);