Change shortcut for hiding the current buffer to a standard keysequence
[quassel.git] / src / qtui / mainwin.cpp
index e7704d8..402f5eb 100644 (file)
@@ -363,7 +363,7 @@ void MainWin::setupActions() {
   configureQuasselAct->setMenuRole(QAction::PreferencesRole);
   #else
   QAction *configureQuasselAct = new Action(SmallIcon("configure"), tr("&Configure Quassel..."), coll,
-                                                  this, SLOT(showSettingsDlg()), QKeySequence(Qt::Key_F7))
+                                            this, SLOT(showSettingsDlg()), QKeySequence(Qt::Key_F7));
   #endif
   coll->addAction("ConfigureQuassel", configureQuasselAct);
 
@@ -390,6 +390,9 @@ void MainWin::setupActions() {
   coll->addAction("ReloadStyle", new Action(SmallIcon("view-refresh"), tr("Reload Stylesheet"), coll,
                                        QtUi::style(), SLOT(reload()), QKeySequence::Refresh));
 
+  coll->addAction("HideCurrentBuffer", new Action(tr("Hide Current Buffer"), coll,
+                                                  this, SLOT(hideCurrentBuffer()), QKeySequence::Close));
+
   // Navigation
   coll = QtUi::actionCollection("Navigation", tr("Navigation"));
 
@@ -713,6 +716,12 @@ void MainWin::previousBuffer() {
     view->previousBuffer();
 }
 
+void MainWin::hideCurrentBuffer() {
+  BufferView *view = activeBufferView();
+  if(view)
+    view->hideCurrentBuffer();
+}
+
 void MainWin::showNotificationsDlg() {
   SettingsPageDlg dlg(new NotificationsSettingsPage(this), this);
   dlg.exec();