diff options
author | rowanbeentje <rowan@beent.je> | 2009-04-19 14:34:30 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-04-19 14:34:30 +0000 |
commit | d4dd7e79ce8373fe94521da2294a076887758ee2 (patch) | |
tree | 85d6828f2131b3e14afee0bcb0d88d09cb23fa1e /Source/TableDocument.h | |
parent | 39adddc081ea010756886ce5819ec4565469d893 (diff) | |
download | sequelpro-d4dd7e79ce8373fe94521da2294a076887758ee2.tar.gz sequelpro-d4dd7e79ce8373fe94521da2294a076887758ee2.tar.bz2 sequelpro-d4dd7e79ce8373fe94521da2294a076887758ee2.zip |
Bring Tiger branch up to version 0.9.5:
- Merge in revisions up to r592 from trunk
- Rewrite code where appropriate to use Tiger-compaible methods (no easy object enumeriation, no @properties, etc)
- Remove printing again - problems printing, and template engine is 10.5-only
- Rework xibs as nibs, and ensure everything looks and works correctly on Tiger; revert interface elements where necessary.
- Add a method to check whether the app is being run on 10.5+, and show appropriate warning about interface and features
- Alter strings and change sparkle URL to Tiger-specific appcast
Diffstat (limited to 'Source/TableDocument.h')
-rw-r--r-- | Source/TableDocument.h | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/Source/TableDocument.h b/Source/TableDocument.h index 7227f0dd..a0c099f9 100644 --- a/Source/TableDocument.h +++ b/Source/TableDocument.h @@ -25,8 +25,8 @@ #import <Cocoa/Cocoa.h> #import <MCPKit_bundled/MCPKit_bundled.h> -#import "CMMCPConnection.h" -#import "CMMCPResult.h" + +@class CMMCPConnection, CMMCPResult; /** * The TableDocument class controls the primary database view window. @@ -42,7 +42,7 @@ IBOutlet id tableDumpInstance; IBOutlet id tableDataInstance; IBOutlet id tableStatusInstance; - IBOutlet id queryConsoleInstance; + IBOutlet id spExportControllerInstance; IBOutlet id tableWindow; IBOutlet id connectSheet; @@ -53,6 +53,7 @@ IBOutlet id favoritesButton; IBOutlet NSTableView *connectFavoritesTableView; IBOutlet NSArrayController *favoritesController; + IBOutlet id nameField; IBOutlet id hostField; IBOutlet id socketField; IBOutlet id userField; @@ -61,7 +62,7 @@ IBOutlet id databaseField; IBOutlet id connectProgressBar; - IBOutlet id connectProgressStatusText; + IBOutlet NSTextField *connectProgressStatusText; IBOutlet id databaseNameField; IBOutlet id databaseEncodingButton; IBOutlet id addDatabaseButton; @@ -71,6 +72,8 @@ IBOutlet id sidebarGrabber; + IBOutlet NSTextView *customQueryTextView; + IBOutlet NSTableView *dbTablesTableView; IBOutlet id syntaxView; @@ -79,7 +82,6 @@ CMMCPConnection *mySQLConnection; - NSMutableArray *favorites; NSArray *variables; NSString *selectedDatabase; NSString *mySQLVersion; @@ -88,22 +90,25 @@ NSMenu *selectEncodingMenu; BOOL _supportsEncoding; NSString *_encoding; + BOOL _encodingViaLatin1; + BOOL _shouldOpenConnectionAutomatically; NSToolbar *mainToolbar; NSToolbarItem *chooseDatabaseToolbarItem; } //start sheet +- (void)setShouldAutomaticallyConnect:(BOOL)shouldAutomaticallyConnect; - (IBAction)connectToDB:(id)sender; - (IBAction)connect:(id)sender; - (IBAction)cancelConnectSheet:(id)sender; - (IBAction)closeSheet:(id)sender; - (IBAction)chooseFavorite:(id)sender; -- (IBAction)removeFavorite:(id)sender; +- (IBAction)editFavorites:(id)sender; - (id)selectedFavorite; - (NSString *)selectedFavoritePassword; - (void)connectSheetAddToFavorites:(id)sender; -- (void)addToFavoritesHost:(NSString *)host socket:(NSString *)socket +- (void)addToFavoritesName:(NSString *)name host:(NSString *)host socket:(NSString *)socket user:(NSString *)user password:(NSString *)password port:(NSString *)port database:(NSString *)database useSSH:(BOOL)useSSH // no-longer in use @@ -111,7 +116,6 @@ sshUser:(NSString *)sshUser // no-longer in use sshPassword:(NSString *)sshPassword // no-longer in use sshPort:(NSString *)sshPort; // no-longer in use -- (NSMutableArray *)favorites; //alert sheets method - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; @@ -130,6 +134,7 @@ - (void)setConnectionEncoding:(NSString *)mysqlEncoding reloadingViews:(BOOL)reloadViews; - (NSString *)databaseEncoding; - (NSString *)connectionEncoding; +- (BOOL)connectionEncodingViaLatin1; - (IBAction)chooseEncoding:(id)sender; - (BOOL)supportsEncoding; - (void)updateEncodingMenuWithSelectedEncoding:(NSString *)encoding; @@ -154,6 +159,7 @@ - (void)closeConnection; //getter methods +- (NSString *)name; - (NSString *)database; - (NSString *)table; - (NSString *)mySQLVersion; @@ -175,6 +181,7 @@ - (IBAction)viewContent:(id)sender; - (IBAction)viewQuery:(id)sender; - (IBAction)viewStatus:(id)sender; +- (IBAction)addConnectionToFavorites:(id)sender; //toolbar methods - (void)setupToolbar; @@ -184,34 +191,10 @@ - (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem; - (void)updateChooseDatabaseToolbarItemWidth; -//NSDocument methods -- (NSString *)windowNibName; -- (void)windowControllerDidLoadNib:(NSWindowController *)aController; -- (void)windowWillClose:(NSNotification *)aNotification; - -//NSWindow delegate methods -- (BOOL)windowShouldClose:(id)sender; - //SMySQL delegate methods - (void)willQueryString:(NSString *)query; - (void)queryGaveError:(NSString *)error; -// Connection sheet delegate methods -- (void) controlTextDidChange:(NSNotification *)aNotification; - -//splitView delegate methods -- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview; -- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset; -- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset; -- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex; - - -//tableView datasource methods -- (int)numberOfRowsInTableView:(NSTableView *)aTableView; -- (id)tableView:(NSTableView *)aTableView - objectValueForTableColumn:(NSTableColumn *)aTableColumn - row:(int)rowIndex; - @end extern NSString *TableDocumentFavoritesControllerSelectionIndexDidChange; |