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"));
this, SLOT(nextBuffer()), QKeySequence(Qt::ALT + Qt::Key_Down)));
coll->addAction("PreviousBuffer", new Action(SmallIcon("go-up"), tr("Go to Previous Chat"), coll,
this, SLOT(previousBuffer()), QKeySequence(Qt::ALT + Qt::Key_Up)));
- coll->addAction("HideCurrentBuffer", new Action(tr("Hide Current Buffer"), coll,
- this, SLOT(hideCurrentBuffer()), QKeySequence(Qt::ControlModifier + Qt::Key_W)));
}
void MainWin::setupMenus() {
QModelIndex index = selectionModel()->currentIndex();
if(index.data(NetworkModel::ItemTypeRole) != NetworkModel::BufferItemType)
return;
-
+
BufferId bufferId = index.data(NetworkModel::BufferIdRole).value<BufferId>();
-
+
//The check above means we won't be looking at a network, which should always be the first row, so we can just go backwards.
changeBuffer(Backward);