aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-08-08 11:00:00 +0000
committerBibiko <bibiko@eva.mpg.de>2009-08-08 11:00:00 +0000
commitf083576763c6c97b03943e335a6948411e7214ef (patch)
treeb27033ce44154b9d3cee1d278aab7840bf545706 /Source
parent0471ae82424ea960038699509c1875650ccc3915 (diff)
downloadsequelpro-f083576763c6c97b03943e335a6948411e7214ef.tar.gz
sequelpro-f083576763c6c97b03943e335a6948411e7214ef.tar.bz2
sequelpro-f083576763c6c97b03943e335a6948411e7214ef.zip
• added field name to Field Editor Sheet
- initial support (not yet finished) Note: maybe add information about field type, max length as attributed string
Diffstat (limited to 'Source')
-rw-r--r--Source/CustomQuery.m1
-rw-r--r--Source/SPFieldEditorController.h5
-rw-r--r--Source/SPFieldEditorController.m3
-rw-r--r--Source/TableContent.m5
4 files changed, 11 insertions, 3 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 5f8c368a..7153e916 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -1724,6 +1724,7 @@
SPFieldEditorController *fieldEditor = [[SPFieldEditorController alloc] init];
id editData = [[fieldEditor editWithObject:[[fullResult objectAtIndex:rowIndex] objectAtIndex:[[aTableColumn identifier] intValue]]
+ fieldName:[columnDefinition objectForKey:@"name"]
usingEncoding:[mySQLConnection encoding]
isObjectBlob:isBlob
isEditable:isFieldEditable
diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h
index 56168620..76e8a86e 100644
--- a/Source/SPFieldEditorController.h
+++ b/Source/SPFieldEditorController.h
@@ -38,6 +38,7 @@
IBOutlet id editSheetCancelButton;
IBOutlet id editSheetOkButton;
IBOutlet id editSheetOpenButton;
+ IBOutlet id editSheetFieldName;
id sheetEditData;
BOOL editSheetWillBeInitialized;
@@ -60,7 +61,9 @@
- (IBAction)quickLookFormatButton:(id)sender;
- (IBAction)dropImage:(id)sender;
-- (id)editWithObject:(id)data usingEncoding:(NSStringEncoding)anEncoding isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)tableWindow;
+
+- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding
+ isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)tableWindow;
- (void)processPasteImageData;
- (void)processUpdatedImageData:(NSData *)data;
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 32b817eb..7b05c5fa 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -51,7 +51,7 @@
[super dealloc];
}
-- (id)editWithObject:(id)data usingEncoding:(NSStringEncoding)anEncoding
+- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding
isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)tableWindow
{
prefs = [NSUserDefaults standardUserDefaults];
@@ -63,6 +63,7 @@
}
[hexTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [editSheetFieldName setStringValue:[NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Field", @"Field"), fieldName]];
// hide all views in editSheet
[hexTextView setHidden:YES];
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 746d0638..c0d77959 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -2141,7 +2141,10 @@
SPFieldEditorController *fieldEditor = [[SPFieldEditorController alloc] init];
id editData = [[fieldEditor editWithObject:[[filteredResult objectAtIndex:rowIndex] objectAtIndex:[[aTableColumn identifier] intValue]]
- usingEncoding:[mySQLConnection encoding] isObjectBlob:isBlob isEditable:YES withWindow:tableWindow] retain];
+ fieldName:[[aTableColumn headerCell] stringValue]
+ usingEncoding:[mySQLConnection encoding]
+ isObjectBlob:isBlob
+ isEditable:YES withWindow:tableWindow] retain];
if (editData) {
if (!isEditingRow) {