Skip to content

Commit

Permalink
Fixed a bug with the Database pref window. It should now update the d…
Browse files Browse the repository at this point in the history
…atabase name/version immediately after the db gets updated.
  • Loading branch information
Bleyddyn committed Oct 1, 2014
1 parent 72ed7f0 commit 615be9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Core/XmlFetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/


@protocol XmlFetcherDelegate
@protocol XmlFetcherDelegate<NSObject>
/*
Delegate prototype. implement this method and it will be called when the document is finished.
Expand Down
4 changes: 3 additions & 1 deletion src/Core/XmlFetcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ -(void)finishedCleanup
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
NSLog(@"Received Response");
[xmlData setLength:0];
}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
Expand All @@ -77,7 +78,8 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
BOOL rc = NO;

NSLog(@"Validating (%@)",savePath);
if([delegate xmlValidateData:xmlData xmlPath:savePath xmlDocName:docName]){
if( [delegate xmlValidateData:xmlData xmlPath:savePath xmlDocName:docName] )
{
rc = [self writeData:xmlData toFile:savePath];
NSLog(@"Writing (%@)",savePath);
}else{
Expand Down
2 changes: 1 addition & 1 deletion src/Preferences/MBPreferencesController.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (id)autorelease {

- (void)showWindow:(id)sender {
[self.window center];

[_currentModule willBeDisplayed];
[super showWindow:sender];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Private/MainController.m
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ -(void) reloadAllCharacters
*/
-(void) databaseReadyToCheck:(NSNotification *)notification
{
DBManager *manager = [[[DBManager alloc]init]autorelease];
DBManager *manager = [[DBManager alloc] init]; // Need to figure out how to deallocate this when we're done with it

if(![manager dbVersionCheck:[[NSUserDefaults standardUserDefaults] integerForKey:UD_DATABASE_MIN_VERSION]]){
[manager checkForUpdate2];
Expand Down

0 comments on commit 615be9f

Please sign in to comment.