From 2df13b7ffc12ce17bb589ba36bb097f9811ca420 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Sat, 19 Oct 2013 00:40:19 -0700 Subject: [PATCH 1/3] Fixed: CPComboBox don't close when clicking on the scroll Previously CPComboBox don't close when clicking on the scroll, now it does Fixed #1991 --- AppKit/_CPPopUpList.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/_CPPopUpList.j b/AppKit/_CPPopUpList.j index dc8a74227..655f297c0 100644 --- a/AppKit/_CPPopUpList.j +++ b/AppKit/_CPPopUpList.j @@ -887,7 +887,7 @@ var _CPPopUpListDataSourceKey = @"_CPPopUpListDataSourceKey", if (mouseWindow != self && !CGRectContainsPoint(rect, point)) [[self delegate] close]; - else if ([mouseWindow firstResponder] == [[self delegate] dataSource]) + else [self _trapNextMouseDown]; } From 0afc903138902082668a0bb5a17267e27428ac41 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Sun, 20 Oct 2013 20:57:42 -0700 Subject: [PATCH 2/3] Fixed: The delegate method shouldSelectItem doesn't work in CPOutlineView Previously the delegate method shouldSelectItem didn't work in CPOutlineView. It didn't work because the checking method _delegateRespondsToSelectionIndexesForProposedSelection and _delegateRespondsToShouldSelectRow didn't check if the real delegate of the outlineView implemented the methods --- AppKit/CPOutlineView.j | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/AppKit/CPOutlineView.j b/AppKit/CPOutlineView.j index 8a6041fb1..98c593433 100644 --- a/AppKit/CPOutlineView.j +++ b/AppKit/CPOutlineView.j @@ -1591,6 +1591,25 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, { return _implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldCollapseItem_; } + +/*! + @ignore + Return YES if the delegate implements outlineView:selectionIndexesForProposedSelection +*/ +- (BOOL)_delegateRespondsToSelectionIndexesForProposedSelection +{ + return _implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_selectionIndexesForProposedSelection_; +} + +/*! + @ignore + Return YES if the delegate implements tableView:shouldSelectItem: +*/ +- (BOOL)_delegateRespondsToShouldSelectRow +{ + return _implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_; +} + @end // FIX ME: We're using with() here because Safari fails if we use anOutlineView._itemInfosForItems or whatever... From 8909576a0bca22c94ac94aaade5b9a602ec344af Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Sun, 20 Oct 2013 21:01:10 -0700 Subject: [PATCH 3/3] Changed comment --- AppKit/CPOutlineView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPOutlineView.j b/AppKit/CPOutlineView.j index 98c593433..5f29027a6 100644 --- a/AppKit/CPOutlineView.j +++ b/AppKit/CPOutlineView.j @@ -1603,7 +1603,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, /*! @ignore - Return YES if the delegate implements tableView:shouldSelectItem: + Return YES if the delegate implements outlineView:shouldSelectItem: */ - (BOOL)_delegateRespondsToShouldSelectRow {