diff options
-rw-r--r-- | DomeKey/Mappings.h | 2 | ||||
-rw-r--r-- | DomeKey/Mappings.m | 7 | ||||
-rw-r--r-- | DomeKey/main.m | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/DomeKey/Mappings.h b/DomeKey/Mappings.h index 2c46dde..b2cea20 100644 --- a/DomeKey/Mappings.h +++ b/DomeKey/Mappings.h @@ -18,6 +18,6 @@ @interface Mappings : NSObject + (void)observeReloadNotification; -+ (void)dispatchReload; ++ (uint32_t)dispatchReload; @end diff --git a/DomeKey/Mappings.m b/DomeKey/Mappings.m index 0d57fa6..1261601 100644 --- a/DomeKey/Mappings.m +++ b/DomeKey/Mappings.m @@ -54,12 +54,15 @@ void reload_mappings( } } -+ (void)dispatchReload ++ (uint32_t)dispatchReload { - if (notify_post(NOTIFICATION_NAME_RELOAD) != 0) { + uint32_t status = notify_post(NOTIFICATION_NAME_RELOAD); + if (status != 0) { // Notification failed NSLog(@"Reload notification failed"); } + + return status; } @end diff --git a/DomeKey/main.m b/DomeKey/main.m index 4eff03d..13ec820 100644 --- a/DomeKey/main.m +++ b/DomeKey/main.m @@ -15,9 +15,7 @@ int main(int argc, const char * argv[]) { const Config *config = c_parse_args(argv, argc); if (config->args.reload) { - [Mappings dispatchReload]; - - // TODO: Return result of `notify_post`, and still log + return [Mappings dispatchReload]; } else if (config->args.daemon) { @autoreleasepool { [NSApplication sharedApplication]; |