summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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];
+}