diff --git a/HWMonitor/AppController.m b/HWMonitor/AppController.m index 0795df55..94700e55 100644 --- a/HWMonitor/AppController.m +++ b/HWMonitor/AppController.m @@ -99,10 +99,10 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification //[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: self selector: @selector(drivesChanged:) name:NSWorkspaceDidUnmountNotification object:nil]; [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(wakeFromSleep:) name:NSWorkspaceDidWakeNotification object:nil]; - [self performSelector:@selector(rebuildSensorsList) withObject:nil afterDelay:0.0]; - + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + [self rebuildSensorsList]; + }]; - // if (![[NSUserDefaults standardUserDefaults] boolForKey:@"SUHasLaunchedBefore"] || [[NSUserDefaults standardUserDefaults] integerForKey:@"SUScheduledCheckInterval"] != 3600) { // _sharedUpdater.updateCheckInterval = 3600; // } diff --git a/HWMonitor/PopupController.m b/HWMonitor/PopupController.m index 68413703..f4d86eba 100644 --- a/HWMonitor/PopupController.m +++ b/HWMonitor/PopupController.m @@ -44,8 +44,10 @@ - (id)init [_statusItemView setAction:@selector(togglePanel:)]; [_statusItemView setTarget:self]; - - [self performSelector:@selector(initialSetup) withObject:nil afterDelay:0.0]; + + [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + [self initialSetup]; + }]; } return self;