aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-10-27 18:00:30 +0000
committerBibiko <bibiko@eva.mpg.de>2010-10-27 18:00:30 +0000
commitc48e2762b6906f4751f9918af379d01b42647e46 (patch)
tree432fd3558252d3d535da283a38d33b50a5ccaa00 /Source
parent37b0f4ee89357fbbf609dfed84ca688c6d34d1b2 (diff)
downloadsequelpro-c48e2762b6906f4751f9918af379d01b42647e46.tar.gz
sequelpro-c48e2762b6906f4751f9918af379d01b42647e46.tar.bz2
sequelpro-c48e2762b6906f4751f9918af379d01b42647e46.zip
• added tooltip for header cell of Content and Custom Query table displaying the column name and field type
- fixes issue 875
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCustomQuery.m1
-rw-r--r--Source/SPTableContent.m1
2 files changed, 2 insertions, 0 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 02822f92..203f9ae6 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -1487,6 +1487,7 @@
[[dataCell formatter] setFieldType:[columnDefinition objectForKey:@"type"]];
[theCol setDataCell:dataCell];
[[theCol headerCell] setStringValue:[columnDefinition objectForKey:@"name"]];
+ [theCol setHeaderToolTip:[NSString stringWithFormat:@"%@ – %@%@", [columnDefinition objectForKey:@"name"], [columnDefinition objectForKey:@"type"], ([columnDefinition objectForKey:@"char_length"]) ? [NSString stringWithFormat:@"(%@)", [columnDefinition objectForKey:@"char_length"]] : @""]];
// Set the width of this column to saved value if exists and maps to a real column
if ([columnDefinition objectForKey:@"org_name"] && [(NSString *)[columnDefinition objectForKey:@"org_name"] length]) {
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index a4cc0b74..bab3cf0d 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -434,6 +434,7 @@
// Set up the column
theCol = [[NSTableColumn alloc] initWithIdentifier:[columnDefinition objectForKey:@"datacolumnindex"]];
[[theCol headerCell] setStringValue:[columnDefinition objectForKey:@"name"]];
+ [theCol setHeaderToolTip:[NSString stringWithFormat:@"%@ – %@%@", [columnDefinition objectForKey:@"name"], [columnDefinition objectForKey:@"type"], ([columnDefinition objectForKey:@"length"]) ? [NSString stringWithFormat:@"(%@)", [columnDefinition objectForKey:@"length"]] : @""]];
[theCol setEditable:YES];
// Set up column for filterTable