diff options
Diffstat (limited to 'SwifTools/Dock/MacOSXDock.mm')
-rw-r--r-- | SwifTools/Dock/MacOSXDock.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SwifTools/Dock/MacOSXDock.mm b/SwifTools/Dock/MacOSXDock.mm index d2a06b3..0438353 100644 --- a/SwifTools/Dock/MacOSXDock.mm +++ b/SwifTools/Dock/MacOSXDock.mm @@ -2,6 +2,7 @@ #include <AppKit/AppKit.h> #include <Cocoa/Cocoa.h> +#include <boost/lexical_cast.hpp> #include "Swiften/Base/String.h" @@ -10,7 +11,8 @@ namespace Swift { MacOSXDock::MacOSXDock(CocoaApplication*) { } -void MacOSXDock::setMessage(const String& label) { +void MacOSXDock::setNumberOfPendingMessages(int i) { + String label(i > 0 ? boost::lexical_cast<std::string>(i) : ""); NSString *labelString = [[NSString alloc] initWithUTF8String: label.getUTF8Data()]; [[NSApp dockTile] setBadgeLabel: labelString]; [labelString release]; |