aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-11-18 18:48:19 +0000
committerrowanbeentje <rowan@beent.je>2012-11-18 18:48:19 +0000
commita1ffa498a2e23d5f98822d5ee2e7c2a0cc8b2e8e (patch)
treea5e505eed1f30e52d3b931635fc09a4c88ddeb9c
parent4d3952f94de816b00ae1a84d110396bc5c5edabb (diff)
downloadsequelpro-a1ffa498a2e23d5f98822d5ee2e7c2a0cc8b2e8e.tar.gz
sequelpro-a1ffa498a2e23d5f98822d5ee2e7c2a0cc8b2e8e.tar.bz2
sequelpro-a1ffa498a2e23d5f98822d5ee2e7c2a0cc8b2e8e.zip
- Add some NSOutlineView logic to prevent disclosure triangles from displaying on 10.5 for the quick connect item and favourites title; thanks to schlabberdog for both reporting and testing this issue
-rw-r--r--Source/SPConnectionControllerDelegate.m5
-rw-r--r--Source/SPFavoritesOutlineView.m7
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 38137b1b..e986b271 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -240,6 +240,11 @@ static NSString *SPQuickConnectImageWhite = @"quick-connect-icon-white.pdf";
return YES;
}
+- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
+{
+ return (item != quickConnectItem && ![item isLeaf]);
+}
+
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item
{
return ([[item parentNode] parentNode] != nil);
diff --git a/Source/SPFavoritesOutlineView.m b/Source/SPFavoritesOutlineView.m
index 69800606..3688f769 100644
--- a/Source/SPFavoritesOutlineView.m
+++ b/Source/SPFavoritesOutlineView.m
@@ -121,6 +121,13 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 14;
{
NSRect superFrame = [super frameOfOutlineCellAtRow:rowIndex];
+ // Return NSZeroRect if the row is a group row
+ if ([[self delegate] respondsToSelector:@selector(outlineView:isGroupItem:)]) {
+ if ([[self delegate] outlineView:self isGroupItem:[self itemAtRow:rowIndex]]) {
+ return NSZeroRect;
+ }
+ }
+
// On versions of Lion or above, amend the padding appropriately
if (systemVersion >= 0x1070 && superFrame.origin.x > SPFavoritesOutlineViewUnindent) {
return NSMakeRect(superFrame.origin.x - SPFavoritesOutlineViewUnindent, superFrame.origin.y, superFrame.size.width, superFrame.size.height);