diff --git a/PBWebController.m b/PBWebController.m index 95319e7..0548b08 100644 --- a/PBWebController.m +++ b/PBWebController.m @@ -13,6 +13,10 @@ #include +@interface PBWebController() +- (void)preferencesChangedWithNotification:(NSNotification *)theNotification; +@end + @implementation PBWebController @synthesize startFile, repository; @@ -24,6 +28,12 @@ NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:file]]; callbacks = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsObjectPointerPersonality|NSPointerFunctionsStrongMemory) valueOptions:(NSPointerFunctionsObjectPointerPersonality|NSPointerFunctionsStrongMemory)]; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self + selector:@selector(preferencesChangedWithNotification:) + name:NSUserDefaultsDidChangeNotification + object:nil]; + finishedLoading = NO; [view setUIDelegate:self]; [view setFrameLoadDelegate:self]; @@ -179,4 +189,13 @@ [self returnCallBackForObject:[notification object] withData:data]; } +- (void) preferencesChanged +{ +} + +- (void)preferencesChangedWithNotification:(NSNotification *)theNotification +{ + [self preferencesChanged]; +} + @end