From: Manuel Nickschas Date: Sat, 15 Nov 2008 20:37:01 +0000 (+0100) Subject: Don't join channels on single click in bufferviews on X11, fixes BR #298 X-Git-Tag: 0.3.1~36 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0a82bb8c3fe72240b6fa03fd1018289465abf7f1 Don't join channels on single click in bufferviews on X11, fixes BR #298 --- diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 11564b52..8751c93e 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -97,12 +97,13 @@ void BufferView::init() { 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 } @@ -389,7 +390,7 @@ QMenu *BufferView::createHideEventsSubMenu(QMenu &menu, BufferId bufferId) { _hidePartAction.setChecked(filter & Message::Part); _hideQuitAction.setChecked(filter & Message::Quit); _hideModeAction.setChecked(filter & Message::Mode); - + QMenu *hideEventsMenu = menu.addMenu(tr("Hide Events")); hideEventsMenu->addAction(&_hideJoinAction); hideEventsMenu->addAction(&_hidePartAction);