mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Have PBWebController react to configuration changes.
Override preferencesChanged in subclasses to actually react to changes. Base class does nothing by default.
This commit is contained in:
committed by
Pieter de Bie
parent
55d57ba076
commit
865ae5f422
@@ -13,6 +13,10 @@
|
||||
|
||||
#include <SystemConfiguration/SCNetworkReachability.h>
|
||||
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user