X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fmainwin.cpp;h=ff87d96f6bb0fbd927926bbc3bb0a22ee61f7b96;hb=fdfd62334f728bd05470c5191194d55027fec86e;hp=e7704d833a6ca6ad235e27eee14209bd8de73769;hpb=b8f1a5320b3669538bbb943741c2d1045a57e94a;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index e7704d83..ff87d96f 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2010 by the Quassel Project * + * Copyright (C) 2005-2012 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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();