X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=e922559043bd65be57f4fdf99a0d8afdbdf2e9ec;hb=ad801015af3afad53e0b245afc3a2214373a1b44;hp=c4529cbf9e4b2bb1986f54c4b932bab4cd1132af;hpb=d298e7275374e2da41b0ed9ef1080464a77c8cf1;p=quassel.git diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index c4529cbf..e9225590 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -57,7 +57,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))); +#else + connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex))); // Qtopia uses single click for activation +#endif } void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::Modes mode, QList nets) { @@ -234,16 +240,20 @@ void BufferView::showContextMenu(const QPoint &pos) { network->requestDisconnect(); } else if(result == joinChannelAction) { + // FIXME no QInputDialog in Qtopia +#ifndef Q_WS_QWS bool ok; QString channelName = QInputDialog::getText(this, tr("Join Channel"), tr("Input channel name:"),QLineEdit::Normal, QDir::home().dirName(), &ok); + if (ok && !channelName.isEmpty()) { BufferInfo bufferInfo = index.child(0,0).data(NetworkModel::BufferInfoRole).value(); if(bufferInfo.isValid()) { Client::instance()->userInput(bufferInfo, QString("/J %1").arg(channelName)); } } +#endif } else if(result == joinBufferAction) { Client::instance()->userInput(bufferInfo, QString("/JOIN %1").arg(channelname));