_removeBufferAction(tr("Delete buffer"), this),
_ignoreListAction(tr("Ignore list"), this),
- _hideJoinAction(tr("Join Events"), this),
- _hidePartAction(tr("Part Events"), this),
- _hideQuitAction(tr("Quit Events"), this),
- _hideModeAction(tr("Mode Events"), this)
-
+ _hideJoinAction(tr("Joins"), this),
+ _hidePartAction(tr("Parts"), this),
+ _hideQuitAction(tr("Quits"), this),
+ _hideNickAction(tr("Nick Changes"), this),
+ _hideModeAction(tr("Mode"), this),
+ _hideDayChangeAction(tr("Day Change"), this)
{
_hideJoinAction.setCheckable(true);
_hidePartAction.setCheckable(true);
_hideQuitAction.setCheckable(true);
+ _hideNickAction.setCheckable(true);
_hideModeAction.setCheckable(true);
+ _hideDayChangeAction.setCheckable(true);
_ignoreListAction.setEnabled(false);
showChannelList.setIcon(SmallIcon("format-list-unordered"));
setSortingEnabled(true);
sortByColumn(0, Qt::AscendingOrder);
-#ifndef Q_WS_QWS
- // this is a workaround to not join channels automatically... we need a saner way to navigate for qtopia anyway though,
- // such as mark first, activate at second click...
- connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(joinChannel(QModelIndex)));
+
+ // activated() fails on X11 and Qtopia at least
+#if defined Q_WS_QWS or defined Q_WS_X11
+ connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(joinChannel(QModelIndex)));
#else
- connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); // Qtopia uses single click for activation
+ // afaik this is better on Mac and Windows
+ connect(this, SIGNAL(activated(QModelIndex)), SLOT(joinChannel(QModelIndex)));
#endif
}
_hideJoinAction.setChecked(filter & Message::Join);
_hidePartAction.setChecked(filter & Message::Part);
_hideQuitAction.setChecked(filter & Message::Quit);
+ _hideNickAction.setChecked(filter & Message::Nick);
_hideModeAction.setChecked(filter & Message::Mode);
-
+ _hideDayChangeAction.setChecked(filter & Message::DayChange);
+
QMenu *hideEventsMenu = menu.addMenu(tr("Hide Events"));
hideEventsMenu->addAction(&_hideJoinAction);
hideEventsMenu->addAction(&_hidePartAction);
hideEventsMenu->addAction(&_hideQuitAction);
+ hideEventsMenu->addAction(&_hideNickAction);
hideEventsMenu->addAction(&_hideModeAction);
+ hideEventsMenu->addAction(&_hideDayChangeAction);
return hideEventsMenu;
}
BufferSettings(bufferId).filterMessage(Message::Quit, _hideQuitAction.isChecked());
return;
}
+ if(result == &_hideNickAction) {
+ BufferId bufferId = index.data(NetworkModel::BufferIdRole).value<BufferId>();
+ BufferSettings(bufferId).filterMessage(Message::Nick, _hideNickAction.isChecked());
+ return;
+ }
if(result == &_hideModeAction) {
BufferId bufferId = index.data(NetworkModel::BufferIdRole).value<BufferId>();
BufferSettings(bufferId).filterMessage(Message::Mode, _hideModeAction.isChecked());
return;
}
-
+ if(result == &_hideDayChangeAction) {
+ BufferId bufferId = index.data(NetworkModel::BufferIdRole).value<BufferId>();
+ BufferSettings(bufferId).filterMessage(Message::DayChange, _hideDayChangeAction.isChecked());
+ return;
+ }
}
void BufferView::wheelEvent(QWheelEvent* event) {