diff options
-rw-r--r-- | Interfaces/English.lproj/DBView.xib | 69 | ||||
-rw-r--r-- | Source/SPConstants.h | 2 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 | ||||
-rw-r--r-- | Source/SPCustomQuery.m | 6 | ||||
-rw-r--r-- | Source/SPTableStructure.h | 13 | ||||
-rw-r--r-- | Source/SPTableStructure.m | 14 | ||||
-rw-r--r-- | Source/SPTableStructureDelegate.m | 10 |
7 files changed, 63 insertions, 52 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index fc0c5510..c2ad3857 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -3,7 +3,7 @@ <data> <int key="IBDocument.SystemTarget">1050</int> <string key="IBDocument.SystemVersion">10F569</string> - <string key="IBDocument.InterfaceBuilderVersion">804</string> + <string key="IBDocument.InterfaceBuilderVersion">823</string> <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">461.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> @@ -16,15 +16,15 @@ </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>804</string> - <string>804</string> + <string>823</string> + <string>823</string> <string>1.2.5</string> </object> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="6701"/> <integer value="6735"/> + <integer value="6701"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -16167,6 +16167,14 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> </object> <int key="connectionID">7669</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">databaseDataInstance</string> + <reference key="source" ref="103234030"/> + <reference key="destination" ref="631714493"/> + </object> + <int key="connectionID">7670</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -25321,7 +25329,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{109, 183}, {943, 549}}</string> + <string>{{81, 183}, {943, 549}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -25813,7 +25821,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> </object> </object> <nil key="sourceID"/> - <int key="maxID">7669</int> + <int key="maxID">7670</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -25864,13 +25872,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string key="className">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> - <string key="minorKey">Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> <string key="minorKey">Frameworks/MCPKit/MCPFoundationKit/MCPNull.h</string> </object> </object> @@ -25964,6 +25965,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>doSelectionUpperCase:</string> <string>doTranspose:</string> <string>insertNULLvalue:</string> + <string>moveSelectionLineDown:</string> + <string>moveSelectionLineUp:</string> <string>selectCurrentLine:</string> <string>selectCurrentWord:</string> <string>selectEnclosingBrackets:</string> @@ -25983,6 +25986,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>id</string> <string>id</string> <string>id</string> + <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="actionInfosByName"> @@ -25999,6 +26004,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>doSelectionUpperCase:</string> <string>doTranspose:</string> <string>insertNULLvalue:</string> + <string>moveSelectionLineDown:</string> + <string>moveSelectionLineUp:</string> <string>selectCurrentLine:</string> <string>selectCurrentWord:</string> <string>selectEnclosingBrackets:</string> @@ -26046,6 +26053,14 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string key="candidateClassName">id</string> </object> <object class="IBActionInfo"> + <string key="name">moveSelectionLineDown:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">moveSelectionLineUp:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> <string key="name">selectCurrentLine:</string> <string key="candidateClassName">id</string> </object> @@ -28077,11 +28092,9 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>exportExcelSheetOrFilePerTableMatrix</string> <string>exportFilePerTableCheck</string> <string>exportFilenameDividerBox</string> - <string>exportHTMLIncludeStructureCheck</string> <string>exportInputPopUpButton</string> <string>exportOptionsTabBar</string> <string>exportOutputCompressionFormatPopupButton</string> - <string>exportPDFIncludeStructureCheck</string> <string>exportPathField</string> <string>exportProcessLowMemoryButton</string> <string>exportProgressIndicator</string> @@ -28133,11 +28146,9 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>NSMatrix</string> <string>NSButton</string> <string>NSBox</string> - <string>NSButton</string> <string>NSPopUpButton</string> <string>NSTabView</string> <string>NSPopUpButton</string> - <string>NSButton</string> <string>NSTextField</string> <string>NSButton</string> <string>NSProgressIndicator</string> @@ -28192,11 +28203,9 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string>exportExcelSheetOrFilePerTableMatrix</string> <string>exportFilePerTableCheck</string> <string>exportFilenameDividerBox</string> - <string>exportHTMLIncludeStructureCheck</string> <string>exportInputPopUpButton</string> <string>exportOptionsTabBar</string> <string>exportOutputCompressionFormatPopupButton</string> - <string>exportPDFIncludeStructureCheck</string> <string>exportPathField</string> <string>exportProcessLowMemoryButton</string> <string>exportProgressIndicator</string> @@ -28315,10 +28324,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string key="candidateClassName">NSBox</string> </object> <object class="IBToOneOutletInfo"> - <string key="name">exportHTMLIncludeStructureCheck</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> <string key="name">exportInputPopUpButton</string> <string key="candidateClassName">NSPopUpButton</string> </object> @@ -28331,10 +28336,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string key="candidateClassName">NSPopUpButton</string> </object> <object class="IBToOneOutletInfo"> - <string key="name">exportPDFIncludeStructureCheck</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> <string key="name">exportPathField</string> <string key="candidateClassName">NSTextField</string> </object> @@ -28449,6 +28450,13 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> <string key="className">SPExportController</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPExportControllerDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> <string key="minorKey">Source/SPExportFileUtilities.h</string> </object> </object> @@ -30561,6 +30569,13 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes> </object> <object class="IBPartialClassDescription"> <string key="className">SPTableStructure</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPTableStructureDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPTableStructure</string> <string key="superclassName">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBUserSource</string> diff --git a/Source/SPConstants.h b/Source/SPConstants.h index fd8c3af6..a3665661 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -211,9 +211,9 @@ extern NSString *SPKillProcessConnectionMode; extern NSString *SPDefaultMonospacedFontName; // Table view drag types +extern NSString *SPDefaultPasteboardDragType; extern NSString *SPFavoritesPasteboardDragType; extern NSString *SPContentFilterPasteboardDragType; -extern NSString *SPQueryFavortiesPasteboardDragType; // File extensions extern NSString *SPFileExtensionDefault; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 3dadf8c4..1b76d688 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -39,6 +39,7 @@ NSString *SPKillProcessConnectionMode = @"SPKillProcessConnectionMode NSString *SPDefaultMonospacedFontName = @"Monaco"; // Table view drag types +NSString *SPDefaultPasteboardDragType = @"SequelProPasteboard"; NSString *SPFavoritesPasteboardDragType = @"SPFavoritesPasteboard"; NSString *SPContentFilterPasteboardDragType = @"SPContentFilterPasteboard"; diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 203f9ae6..31ff02d7 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -2128,9 +2128,9 @@ if ( aTableView == queryFavoritesView ) { if ([pboardTypes count] == 1 && row != -1) { - if ([[pboardTypes objectAtIndex:0] isEqualToString:@"SequelProPasteboard"]==YES && operation==NSTableViewDropAbove) + if ([[pboardTypes objectAtIndex:0] isEqualToString:SPDefaultPasteboardDragType]==YES && operation==NSTableViewDropAbove) { - originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] intValue]; + originalRow = [[[info draggingPasteboard] stringForType:SPDefaultPasteboardDragType] intValue]; if (row != originalRow && row != (originalRow+1)) { @@ -2151,7 +2151,7 @@ NSMutableDictionary *draggedRow; if ( aTableView == queryFavoritesView ) { - originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] intValue]; + originalRow = [[[info draggingPasteboard] stringForType:SPDefaultPasteboardDragType] intValue]; destinationRow = row; if ( destinationRow > originalRow ) diff --git a/Source/SPTableStructure.h b/Source/SPTableStructure.h index 657cf777..68225fab 100644 --- a/Source/SPTableStructure.h +++ b/Source/SPTableStructure.h @@ -33,6 +33,7 @@ IBOutlet id tableInfoInstance; IBOutlet id extendedTableInfoInstance; IBOutlet id indexesController; + IBOutlet id databaseDataInstance; IBOutlet id keySheet; IBOutlet id resetAutoIncrementSheet; @@ -54,11 +55,8 @@ IBOutlet NSButton *indexesShowButton; IBOutlet id viewColumnsMenu; - IBOutlet id encodingPopupCell; - - id databaseDataInstance; - + MCPConnection *mySQLConnection; MCPResult *tableSourceResult; MCPResult *indexResult; @@ -67,17 +65,18 @@ NSMutableArray *tableFields; NSMutableDictionary *oldRow, *enumFields; NSDictionary *defaultValues; - BOOL isEditingRow, isEditingNewRow, isSavingRow, alertSheetOpened; NSInteger currentlyEditingRow; NSUserDefaults *prefs; NSArray *collations; NSArray *typeSuggestions; + + BOOL isEditingRow, isEditingNewRow, isSavingRow, alertSheetOpened; } -// Table methods +// Table loading - (void)loadTable:(NSString *)aTable; - (IBAction)reloadTable:(id)sender; -- (void) setTableDetails:(NSDictionary *)tableDetails; +- (void)setTableDetails:(NSDictionary *)tableDetails; // Edit methods - (IBAction)addField:(id)sender; diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 3290df89..86644319 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -133,9 +133,6 @@ nil] retain]; // Hint: _isFieldTypeDate and _isFieldTypeNumeric must be changed if typeSuggestions was changed! - - databaseDataInstance = [tableDocumentInstance valueForKeyPath:@"databaseDataInstance"]; - // Add observers for document task activity [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startDocumentTaskForTab:) @@ -193,7 +190,7 @@ [theTableFields setArray:[NSArray array]]; // Make a mutable copy out of the cached [tableDataInstance columns] since we're adding infos - for(id col in [tableDataInstance columns]) + for (id col in [tableDataInstance columns]) [theTableFields addObject:[[col mutableCopy] autorelease]]; // Retrieve the indexes for the table @@ -712,7 +709,7 @@ #pragma mark Index sheet methods /** - * Closes the current sheet and stops the modal session + * Closes the current sheet and stops the modal session. */ - (IBAction)closeSheet:(id)sender { @@ -721,14 +718,13 @@ } /** -closes the keySheet -*/ + * Closes the key sheet. + */ - (IBAction)closeKeySheet:(id)sender { [NSApp stopModalWithCode:[sender tag]]; } - #pragma mark - #pragma mark Additional methods @@ -743,7 +739,7 @@ closes the keySheet [indexesController setConnection:mySQLConnection]; // Set up tableView - [tableSourceView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]]; + [tableSourceView registerForDraggedTypes:[NSArray arrayWithObjects:SPDefaultPasteboardDragType, nil]]; } /** diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index 377fd7b3..d3954df7 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -160,8 +160,8 @@ if ( ![self saveRowOnDeselect] ) return NO; if ([rows count] == 1) { - [pboard declareTypes:[NSArray arrayWithObject:@"SequelProPasteboard"] owner:nil]; - [pboard setString:[[NSNumber numberWithInteger:[rows firstIndex]] stringValue] forType:@"SequelProPasteboard"]; + [pboard declareTypes:[NSArray arrayWithObject:SPDefaultPasteboardDragType] owner:nil]; + [pboard setString:[[NSNumber numberWithInteger:[rows firstIndex]] stringValue] forType:SPDefaultPasteboardDragType]; return YES; } else { @@ -184,11 +184,11 @@ NSInteger originalRow; // Ensure the drop is of the correct type - if (operation == NSTableViewDropAbove && row != -1 && [pboardTypes containsObject:@"SequelProPasteboard"]) { + if (operation == NSTableViewDropAbove && row != -1 && [pboardTypes containsObject:SPDefaultPasteboardDragType]) { // Ensure the drag originated within this table if ([info draggingSource] == tableView) { - originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] integerValue]; + originalRow = [[[info draggingPasteboard] stringForType:SPDefaultPasteboardDragType] integerValue]; if (row != originalRow && row != (originalRow+1)) { return NSDragOperationMove; @@ -212,7 +212,7 @@ NSDictionary *originalRow; // Extract the original row position from the pasteboard and retrieve the details - originalRowIndex = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] integerValue]; + originalRowIndex = [[[info draggingPasteboard] stringForType:SPDefaultPasteboardDragType] integerValue]; originalRow = [[NSDictionary alloc] initWithDictionary:[tableFields objectAtIndex:originalRowIndex]]; [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance]; |