summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-02 08:53:43 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-02 09:02:15 (GMT)
commit087bc243ffb53e3273580bce5ce66305841a3bff (patch)
treea09a7fd1d564f0e7164198c501d95c949f20b8dd /Swift/Controllers/RosterController.cpp
parent2fb3d3266bd22d84604688dc9ee18b17b211b91d (diff)
downloadswift-contrib-087bc243ffb53e3273580bce5ce66305841a3bff.zip
swift-contrib-087bc243ffb53e3273580bce5ce66305841a3bff.tar.bz2
Persist roster group expandiness.
Release-Notes: Whether roster groups are expanded or collapsed is now persisted between sessions. Resolves: #399
Diffstat (limited to 'Swift/Controllers/RosterController.cpp')
-rw-r--r--Swift/Controllers/RosterController.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp
index 79cf3b8..5288df1 100644
--- a/Swift/Controllers/RosterController.cpp
+++ b/Swift/Controllers/RosterController.cpp
@@ -37,12 +37,13 @@ namespace Swift {
/**
* The controller does not gain ownership of these parameters.
*/
-RosterController::RosterController(const JID& jid, XMPPRoster* xmppRoster, AvatarManager* avatarManager, MainWindowFactory* mainWindowFactory, NickResolver* nickResolver, PresenceOracle* presenceOracle, PresenceSender* presenceSender, EventController* eventController, UIEventStream* uiEventStream, IQRouter* iqRouter)
+RosterController::RosterController(const JID& jid, XMPPRoster* xmppRoster, AvatarManager* avatarManager, MainWindowFactory* mainWindowFactory, NickResolver* nickResolver, PresenceOracle* presenceOracle, PresenceSender* presenceSender, EventController* eventController, UIEventStream* uiEventStream, IQRouter* iqRouter, SettingsProvider* settings)
: myJID_(jid), xmppRoster_(xmppRoster), mainWindowFactory_(mainWindowFactory), mainWindow_(mainWindowFactory_->createMainWindow(uiEventStream)), roster_(new Roster()), offlineFilter_(new OfflineRosterFilter()) {
iqRouter_ = iqRouter;
presenceOracle_ = presenceOracle;
presenceSender_ = presenceSender;
eventController_ = eventController;
+ expandiness_ = new RosterGroupExpandinessPersister(roster_, settings);
roster_->addFilter(offlineFilter_);
mainWindow_->setRosterModel(roster_);
@@ -65,7 +66,7 @@ RosterController::RosterController(const JID& jid, XMPPRoster* xmppRoster, Avata
RosterController::~RosterController() {
delete offlineFilter_;
-
+ delete expandiness_;
}
void RosterController::setNickResolver(NickResolver* nickResolver) {