#include "clientuserinputhandler.h"
#include "coreaccountmodel.h"
#include "coreconnection.h"
#include "clientuserinputhandler.h"
#include "coreaccountmodel.h"
#include "coreconnection.h"
_backlogManager(new ClientBacklogManager(this)),
_bufferViewManager(0),
_bufferViewOverlay(new BufferViewOverlay(this)),
_backlogManager(new ClientBacklogManager(this)),
_bufferViewManager(0),
_bufferViewOverlay(new BufferViewOverlay(this)),
p->attachSlot(SIGNAL(networkCreated(NetworkId)), this, SLOT(coreNetworkCreated(NetworkId)));
p->attachSlot(SIGNAL(networkRemoved(NetworkId)), this, SLOT(coreNetworkRemoved(NetworkId)));
p->attachSlot(SIGNAL(networkCreated(NetworkId)), this, SLOT(coreNetworkCreated(NetworkId)));
p->attachSlot(SIGNAL(networkRemoved(NetworkId)), this, SLOT(coreNetworkRemoved(NetworkId)));
+ 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)));
+
//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(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(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(networkModel(), SIGNAL(requestSetLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &)));
SignalProxy *p = signalProxy();
connect(networkModel(), SIGNAL(requestSetLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &)));
SignalProxy *p = signalProxy();
- _transferManager = new ClientTransferManager(this);
- p->synchronize(transferManager());
+ if (coreFeatures() & Quassel::DccFileTransfer) {
+ _dccConfig = new DccConfig(this);
+ p->synchronize(dccConfig());
+ _transferManager = new ClientTransferManager(this);
+ _transferModel->setManager(_transferManager);
+ p->synchronize(transferManager());
+ }
- connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
+ connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(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()) {
{
// 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()));
- 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();
+}
+
CoreAccount account = currentCoreAccount();
account.setPassword(newPassword);
coreAccountModel()->createOrUpdateAccount(account);
CoreAccount account = currentCoreAccount();
account.setPassword(newPassword);
coreAccountModel()->createOrUpdateAccount(account);
- coreAccountModel()->save();
- emit clientChangePassword(newPassword);
+ emit instance()->requestPasswordChange(nullptr, account.user(), oldPassword, newPassword);
+}
+
+
+void Client::corePasswordChanged(PeerPtr, bool success)
+{
+ if (success)
+ coreAccountModel()->save();
+ emit passwordChanged(success);