p->attachSignal(this, SIGNAL(requestPasswordChange(PeerPtr,QString,QString,QString)), SIGNAL(changePassword(PeerPtr,QString,QString,QString)));
p->attachSlot(SIGNAL(passwordChanged(PeerPtr,bool)), this, SLOT(corePasswordChanged(PeerPtr,bool)));
+ p->attachSignal(this, SIGNAL(requestKickClient(int)), SIGNAL(kickClient(int)));
+ p->attachSlot(SIGNAL(disconnectFromCore()), this, SLOT(disconnectFromCore()));
+
//connect(mainUi(), SIGNAL(connectToCore(const QVariantMap &)), this, SLOT(connectToCore(const QVariantMap &)));
connect(mainUi(), SIGNAL(disconnectFromCore()), this, SLOT(disconnectFromCore()));
connect(this, SIGNAL(connected()), mainUi(), SLOT(connectedToCore()));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), this, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), _messageModel, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(bufferMarkedAsRead(BufferId)), SIGNAL(bufferMarkedAsRead(BufferId)));
+ connect(bufferSyncer(), SIGNAL(bufferActivityChanged(BufferId, const Message::Types)), _networkModel, SLOT(bufferActivityChanged(BufferId, const Message::Types)));
connect(networkModel(), SIGNAL(requestSetLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &)));
SignalProxy *p = signalProxy();
}
// trigger backlog request once all active bufferviews are initialized
- connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
+ connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(finishConnectionInitialization()));
_connected = true;
emit connected();
emit coreConnectionStateChanged(true);
}
-
-void Client::requestInitialBacklog()
+void Client::finishConnectionInitialization()
{
// usually it _should_ take longer until the bufferViews are initialized, so that's what
// triggers this slot. But we have to make sure that we know all buffers yet.
// so we check the BufferSyncer and in case it wasn't initialized we wait for that instead
if (!bufferSyncer()->isInitialized()) {
- disconnect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
- connect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
+ disconnect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(finishConnectionInitialization()));
+ connect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(finishConnectionInitialization()));
return;
}
- disconnect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
- disconnect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
+ disconnect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(finishConnectionInitialization()));
+ disconnect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(finishConnectionInitialization()));
+
+ requestInitialBacklog();
+ if (coreFeatures().testFlag(Quassel::BufferActivitySync))
+ bufferSyncer()->markActivitiesChanged();
+}
+
+void Client::requestInitialBacklog()
+{
_backlogManager->requestInitialBacklog();
}
}
+void Client::kickClient(int peerId)
+{
+ emit instance()->requestKickClient(peerId);
+}
+
+
void Client::corePasswordChanged(PeerPtr, bool success)
{
if (success)