diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-24 21:51:27 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-24 21:51:27 +0000 |
commit | 3b70bf3ed475602fac435b86ab564423ae1dfdb0 (patch) | |
tree | 2328be21dbfdaec7e07caad38c2b46d26c76fcd7 /Source/SPHistoryController.m | |
parent | 47f354070f1fa8dfeb46c4065075ee53de4c1626 (diff) | |
download | sequelpro-3b70bf3ed475602fac435b86ab564423ae1dfdb0.tar.gz sequelpro-3b70bf3ed475602fac435b86ab564423ae1dfdb0.tar.bz2 sequelpro-3b70bf3ed475602fac435b86ab564423ae1dfdb0.zip |
General tidy up, with a focus on consolidating more constants in SPConstants.h/m.
Diffstat (limited to 'Source/SPHistoryController.m')
-rw-r--r-- | Source/SPHistoryController.m | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m index c1c6b386..aae33e81 100644 --- a/Source/SPHistoryController.m +++ b/Source/SPHistoryController.m @@ -25,6 +25,7 @@ #import "TableDocument.h" #import "TableContent.h" #import "TablesList.h" +#import "SPConstants.h" #import "SPHistoryController.h" #import "SPStringAdditions.h" #import "SPMainThreadTrampoline.h" @@ -156,15 +157,15 @@ NSString *viewName = [[[theDocument valueForKey:@"tableTabView"] selectedTabViewItem] identifier]; if ([viewName isEqualToString:@"source"]) { - theView = SP_VIEW_STRUCTURE; + theView = SPHistoryViewStructure; } else if ([viewName isEqualToString:@"content"]) { - theView = SP_VIEW_CONTENT; + theView = SPHistoryViewContent; } else if ([viewName isEqualToString:@"customQuery"]) { - theView = SP_VIEW_CUSTOMQUERY; + theView = SPHistoryViewCustomQuery; } else if ([viewName isEqualToString:@"status"]) { - theView = SP_VIEW_STATUS; + theView = SPHistoryViewStatus; } else if ([viewName isEqualToString:@"relations"]) { - theView = SP_VIEW_RELATIONS; + theView = SPHistoryViewRelations; } return theView; @@ -315,7 +316,7 @@ // If the database, table, and view are the same and content - just trigger a table reload (filters) if ([[theDocument database] isEqualToString:[historyEntry objectForKey:@"database"]] && [historyEntry objectForKey:@"table"] && [[theDocument table] isEqualToString:[historyEntry objectForKey:@"table"]] - && [[historyEntry objectForKey:@"view"] integerValue] == [self currentlySelectedView] == SP_VIEW_CONTENT) + && [[historyEntry objectForKey:@"view"] integerValue] == [self currentlySelectedView] == SPHistoryViewContent) { [tableContentInstance loadTable:[historyEntry objectForKey:@"table"]]; modifyingState = NO; @@ -346,19 +347,19 @@ // Check and set the view if ([self currentlySelectedView] != [[historyEntry objectForKey:@"view"] integerValue]) { switch ([[historyEntry objectForKey:@"view"] integerValue]) { - case SP_VIEW_STRUCTURE: + case SPHistoryViewStructure: [theDocument viewStructure:self]; break; - case SP_VIEW_CONTENT: + case SPHistoryViewContent: [theDocument viewContent:self]; break; - case SP_VIEW_CUSTOMQUERY: + case SPHistoryViewCustomQuery: [theDocument viewQuery:self]; break; - case SP_VIEW_STATUS: + case SPHistoryViewStatus: [theDocument viewStatus:self]; break; - case SP_VIEW_RELATIONS: + case SPHistoryViewRelations: [theDocument viewRelations:self]; break; } |