summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-21 10:07:49 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-21 10:07:49 (GMT)
commitabd4d8981ebc5ad579102002483f410a5d4d79da (patch)
treeddf347f77653c64d81e8e087f34d1243c6b68d0d /Slimber/Cocoa/Slimber.mm
parentabba8740ba29f05eef23a826e3095214f51bd0a4 (diff)
downloadswift-contrib-abd4d8981ebc5ad579102002483f410a5d4d79da.zip
swift-contrib-abd4d8981ebc5ad579102002483f410a5d4d79da.tar.bz2
Update the "You are logged in" menu.
Diffstat (limited to 'Slimber/Cocoa/Slimber.mm')
-rw-r--r--Slimber/Cocoa/Slimber.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Slimber/Cocoa/Slimber.mm b/Slimber/Cocoa/Slimber.mm
index 4bf72fe..74d95ef 100644
--- a/Slimber/Cocoa/Slimber.mm
+++ b/Slimber/Cocoa/Slimber.mm
@@ -9,6 +9,7 @@ using namespace Swift;
Slimber::Slimber() {
dnsSDService = boost::shared_ptr<AppleDNSSDService>(new AppleDNSSDService());
server = new Server(5222, 5562, dnsSDService);
+ server->onSelfConnected.connect(boost::bind(&Slimber::handleSelfConnected, this, _1));
menulet = [[Menulet alloc] init];
}
@@ -16,3 +17,7 @@ Slimber::~Slimber() {
delete server;
[menulet release];
}
+
+void Slimber::handleSelfConnected(bool b) {
+ [menulet setSelfConnected: b];
+}