diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-03-06 15:37:53 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-06 16:48:25 (GMT) |
commit | 3f5f23dcf7a07638c04accd86c06a70c22dd9e8d (patch) | |
tree | 3994c36ffe906e71499131c97356d2c6ae4cd5f7 /Swift/Controllers/Roster | |
parent | 6e219bf4a63459461a0a6009b1e3dafedda9e033 (diff) | |
download | swift-contrib-3f5f23dcf7a07638c04accd86c06a70c22dd9e8d.zip swift-contrib-3f5f23dcf7a07638c04accd86c06a70c22dd9e8d.tar.bz2 |
Load 'show offline' for new sessions
Diffstat (limited to 'Swift/Controllers/Roster')
-rw-r--r-- | Swift/Controllers/Roster/RosterController.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp index d3a00dd..170bfd0 100644 --- a/Swift/Controllers/Roster/RosterController.cpp +++ b/Swift/Controllers/Roster/RosterController.cpp @@ -59,7 +59,6 @@ RosterController::RosterController(const JID& jid, XMPPRoster* xmppRoster, Avata eventController_ = eventController; settings_ = settings; expandiness_ = new RosterGroupExpandinessPersister(roster_, settings); - roster_->addFilter(offlineFilter_); mainWindow_->setRosterModel(roster_); changeStatusConnection_ = mainWindow_->onChangeStatusRequest.connect(boost::bind(&RosterController::handleChangeStatusRequest, this, _1, _2)); @@ -83,8 +82,10 @@ RosterController::RosterController(const JID& jid, XMPPRoster* xmppRoster, Avata settings_->onSettingChanged.connect(boost::bind(&RosterController::handleSettingChanged, this, _1)); + handleShowOfflineToggled(settings_->getSetting(SettingConstants::SHOW_OFFLINE)); } + RosterController::~RosterController() { settings_->onSettingChanged.disconnect(boost::bind(&RosterController::handleSettingChanged, this, _1)); nickManager_->onOwnNickChanged.disconnect(boost::bind(&MainWindow::setMyNick, mainWindow_, _1)); @@ -107,9 +108,6 @@ void RosterController::setEnabled(bool enabled) { } void RosterController::handleShowOfflineToggled(bool state) { - if (state != settings_->getSetting(SettingConstants::SHOW_OFFLINE)) { - settings_->storeSetting(SettingConstants::SHOW_OFFLINE, state); - } if (state) { roster_->removeFilter(offlineFilter_); } else { |