Previously, the Change Password option would be shown all the
time, even the the client was connected to a core not supporting
the password change functionality or if a monolithic build was in
use. Now, the Change Password option will be disabled if the
client is disconnected or is connected to a core not supporting the
functionality and will be hidden if a monolithic build is in use.
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(clientChangePassword(QString)));
-
//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)), _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 &)));
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()->synchronize(bufferSyncer());
+
+ SignalProxy *p = signalProxy();
+
+ if ((Client::coreFeatures() & Quassel::PasswordChange)) {
+ p->attachSignal(this, SIGNAL(clientChangePassword(QString)));
+ }
+
+ p->synchronize(bufferSyncer());
// create a new BufferViewManager
Q_ASSERT(!_bufferViewManager);
// create a new BufferViewManager
Q_ASSERT(!_bufferViewManager);
- _bufferViewManager = new ClientBufferViewManager(signalProxy(), this);
+ _bufferViewManager = new ClientBufferViewManager(p, this);
connect(_bufferViewManager, SIGNAL(initDone()), _bufferViewOverlay, SLOT(restore()));
// create AliasManager
Q_ASSERT(!_aliasManager);
_aliasManager = new ClientAliasManager(this);
connect(aliasManager(), SIGNAL(initDone()), SLOT(sendBufferedUserInput()));
connect(_bufferViewManager, SIGNAL(initDone()), _bufferViewOverlay, SLOT(restore()));
// create AliasManager
Q_ASSERT(!_aliasManager);
_aliasManager = new ClientAliasManager(this);
connect(aliasManager(), SIGNAL(initDone()), SLOT(sendBufferedUserInput()));
- signalProxy()->synchronize(aliasManager());
+ p->synchronize(aliasManager());
// create NetworkConfig
Q_ASSERT(!_networkConfig);
_networkConfig = new NetworkConfig("GlobalNetworkConfig", this);
// create NetworkConfig
Q_ASSERT(!_networkConfig);
_networkConfig = new NetworkConfig("GlobalNetworkConfig", this);
- signalProxy()->synchronize(networkConfig());
+ p->synchronize(networkConfig());
// create IgnoreListManager
Q_ASSERT(!_ignoreListManager);
_ignoreListManager = new ClientIgnoreListManager(this);
// create IgnoreListManager
Q_ASSERT(!_ignoreListManager);
_ignoreListManager = new ClientIgnoreListManager(this);
- signalProxy()->synchronize(ignoreListManager());
+ p->synchronize(ignoreListManager());
Q_ASSERT(!_transferManager);
_transferManager = new ClientTransferManager(this);
Q_ASSERT(!_transferManager);
_transferManager = new ClientTransferManager(this);
- signalProxy()->synchronize(transferManager());
+ p->synchronize(transferManager());
// trigger backlog request once all active bufferviews are initialized
connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
// trigger backlog request once all active bufferviews are initialized
connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
SaslAuthentication = 0x0002,
SaslExternal = 0x0004,
HideInactiveNetworks = 0x0008,
SaslAuthentication = 0x0002,
SaslExternal = 0x0004,
HideInactiveNetworks = 0x0008,
+ PasswordChange = 0x0010,
};
Q_DECLARE_FLAGS(Features, Feature);
};
Q_DECLARE_FLAGS(Features, Feature);
connect(Client::coreConnection(), SIGNAL(handleSslErrors(const QSslSocket *, bool *, bool *)), SLOT(handleSslErrors(const QSslSocket *, bool *, bool *)));
#endif
connect(Client::coreConnection(), SIGNAL(handleSslErrors(const QSslSocket *, bool *, bool *)), SLOT(handleSslErrors(const QSslSocket *, bool *, bool *)));
#endif
- connect(this, SIGNAL(changePassword(QString)), Client::instance(), SLOT(changePassword(QString)));
-
// Setup Dock Areas
setDockNestingEnabled(true);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
// Setup Dock Areas
setDockNestingEnabled(true);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
connect(Client::backlogManager(), SIGNAL(messagesProcessed(const QString &)), this, SLOT(showStatusBarMessage(const QString &)));
}
connect(Client::backlogManager(), SIGNAL(messagesProcessed(const QString &)), this, SLOT(showStatusBarMessage(const QString &)));
}
+ disconnect(this, SIGNAL(changePassword(QString)), Client::instance(), SLOT(changePassword(QString)));
+ if (Client::internalCore()) {
+ coll->action("ChangePassword")->setVisible(false);
+ }
+ else if((Client::coreFeatures() & Quassel::PasswordChange)) {
+ connect(this, SIGNAL(changePassword(QString)), Client::instance(), SLOT(changePassword(QString)));
+ coll->action("ChangePassword")->setEnabled(true);
+ }
+ else {
+ coll->action("ChangePassword")->setEnabled(false);
+ }
+
// _viewMenu->setEnabled(true);
if (!Client::internalCore())
statusBar()->showMessage(tr("Connected to core."));
// _viewMenu->setEnabled(true);
if (!Client::internalCore())
statusBar()->showMessage(tr("Connected to core."));
coll->action("ConnectCore")->setEnabled(true);
coll->action("DisconnectCore")->setEnabled(false);
coll->action("CoreInfo")->setEnabled(false);
coll->action("ConnectCore")->setEnabled(true);
coll->action("DisconnectCore")->setEnabled(false);
coll->action("CoreInfo")->setEnabled(false);
+ coll->action("ChangePassword")->setEnabled(false);
//_viewMenu->setEnabled(false);
statusBar()->showMessage(tr("Not connected to core."));
if (_msgProcessorStatusWidget)
//_viewMenu->setEnabled(false);
statusBar()->showMessage(tr("Not connected to core."));
if (_msgProcessorStatusWidget)