summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Notifier/GrowlNotifier.mm')
-rw-r--r--SwifTools/Notifier/GrowlNotifier.mm16
1 files changed, 12 insertions, 4 deletions
diff --git a/SwifTools/Notifier/GrowlNotifier.mm b/SwifTools/Notifier/GrowlNotifier.mm
index b0f26ce..c1996d9 100644
--- a/SwifTools/Notifier/GrowlNotifier.mm
+++ b/SwifTools/Notifier/GrowlNotifier.mm
@@ -60,10 +60,7 @@ GrowlNotifier::GrowlNotifier(const std::string& name) {
GrowlNotifier::~GrowlNotifier() {
[GrowlApplicationBridge setGrowlDelegate: nil];
- foreach (Context* context, p->pendingNotifications) {
- delete context;
- }
- p->pendingNotifications.clear();
+ clearPendingNotifications();
}
void GrowlNotifier::showMessage(Type type, const std::string& subject, const std::string& description, const boost::filesystem::path& picturePath, boost::function<void()> callback) {
@@ -106,4 +103,15 @@ bool GrowlNotifier::isExternallyConfigured() const {
return ![GrowlApplicationBridge isMistEnabled];
}
+void GrowlNotifier::purgeCallbacks() {
+ clearPendingNotifications();
+}
+
+void GrowlNotifier::clearPendingNotifications() {
+ foreach (Context* context, p->pendingNotifications) {
+ delete context;
+ }
+ p->pendingNotifications.clear();
+}
+
}