From: Marcus Eggenberger Date: Sun, 11 Jan 2009 16:03:06 +0000 (+0100) Subject: Default identity is now created by the client, if no identity exists. X-Git-Tag: 0.4.0~240 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=93800658bba5dcbeca7f3deb02dd7091c455efe8 Default identity is now created by the client, if no identity exists. This has the benefit, that the identity is translated according to the client's language settings. --- diff --git a/src/client/client.cpp b/src/client/client.cpp index 64d228d6..b599c9aa 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -300,6 +300,9 @@ void Client::setSyncedToCore() { _bufferViewManager = new BufferViewManager(signalProxy(), this); connect(bufferViewManager(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog())); connect(bufferViewManager(), SIGNAL(initDone()), this, SLOT(createDefautBufferView())); + + createDefaultIdentity(); + _syncedToCore = true; emit connected(); emit coreConnectionStateChanged(true); @@ -319,6 +322,15 @@ void Client::createDefautBufferView() { } } +void Client::createDefaultIdentity() { + if(_identities.isEmpty()) { + Identity identity; + identity.setToDefaults(); + identity.setIdentityName(tr("Default Identity")); + createIdentity(identity); + } +} + void Client::setSecuredConnection() { emit securedConnection(); } diff --git a/src/client/client.h b/src/client/client.h index 2c65e1ee..003a23d8 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -186,6 +186,7 @@ private slots: void setSyncedToCore(); void requestInitialBacklog(); void createDefautBufferView(); + void createDefaultIdentity(); void setSecuredConnection(); diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index 491e99a8..1e7d2a1e 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -133,12 +133,6 @@ void CoreSession::loadSettings() { foreach(CoreIdentity identity, Core::identities(user())) { createIdentity(identity); } - if(!_identities.count()) { - Identity identity; - identity.setToDefaults(); - identity.setIdentityName(tr("Default Identity")); - createIdentity(identity, QVariantMap()); - } foreach(NetworkInfo info, Core::networks(user())) { createNetwork(info);