Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cappuccino/cappuccino
Browse files Browse the repository at this point in the history
  • Loading branch information
aparajita committed Oct 8, 2012
2 parents c2da96e + 8bbb3d3 commit 385de88
Show file tree
Hide file tree
Showing 9 changed files with 2,260 additions and 2,195 deletions.
3 changes: 1 addition & 2 deletions AppKit/CPMenu/CPMenu.j
Expand Up @@ -976,8 +976,7 @@ var _CPMenuBarVisible = NO,

for (; index < count; ++index)
{
var item = _items[index],
modifierMask = [item keyEquivalentModifierMask];
var item = _items[index];

if ([anEvent _triggersKeyEquivalent:[item keyEquivalent] withModifierMask:[item keyEquivalentModifierMask]])
{
Expand Down
7 changes: 6 additions & 1 deletion AppKit/CPSearchField.j
Expand Up @@ -501,7 +501,12 @@ var RECENT_SEARCH_PREFIX = @" ";
if (_CGRectContainsPoint([self searchButtonRectForBounds:[self bounds]], point))
{
if (_searchMenuTemplate == nil)
[self _sendAction:self];
{
if ([_searchButton target] && [_searchButton action])
[_searchButton mouseDown:anEvent];
else
[self _sendAction:self];
}
else
[self _showMenu];
}
Expand Down
19 changes: 15 additions & 4 deletions AppKit/CPTableView.j
Expand Up @@ -222,6 +222,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;

SEL _doubleAction;
CPInteger _clickedRow;
CPInteger _clickedColumn;
unsigned _columnAutoResizingStyle;

int _lastTrackedRowIndex;
Expand Down Expand Up @@ -324,7 +325,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
*/
- (void)_init
{
_lastSelectedRow = -1;
_lastSelectedRow = _clickedColumn = _clickedRow = -1;

_selectedColumnIndexes = [CPIndexSet indexSet];
_selectedRowIndexes = [CPIndexSet indexSet];
Expand Down Expand Up @@ -542,8 +543,12 @@ NOT YET IMPLEMENTED
}

/*
* - clickedColumn
Returns the index of the the column the user clicked to trigger an action, or -1 if no column was clicked.
*/
- (CPInteger)clickedColumn
{
return _clickedColumn;
}

/*!
Returns the index of the the row the user clicked to trigger an action, or -1 if no row was clicked.
Expand Down Expand Up @@ -3376,7 +3381,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
rowIndex = 0,
rowsCount = rowArray.length;

if (dataViewsForTableColumn) {
if (dataViewsForTableColumn)
{
for (; rowIndex < rowsCount; ++rowIndex)
{
var row = rowArray[rowIndex],
Expand Down Expand Up @@ -4190,14 +4196,15 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
_isSelectingSession = NO;

var CLICK_TIME_DELTA = 1000,
columnIndex,
columnIndex = -1,
column,
rowIndex,
shouldEdit = YES;

if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_)
{
rowIndex = [self rowAtPoint:aPoint];

if (rowIndex !== -1)
{
if ([_draggedRowIndexes count] > 0)
Expand All @@ -4219,12 +4226,15 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|| [self infoForBinding:@"content"]))
{
columnIndex = [self columnAtPoint:lastPoint];

if (columnIndex !== -1)
{
column = _tableColumns[columnIndex];

if ([column isEditable])
{
rowIndex = [self rowAtPoint:aPoint];

if (rowIndex !== -1)
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldEditTableColumn_row_)
Expand All @@ -4244,6 +4254,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if ([[CPApp currentEvent] clickCount] === 2 && _doubleAction)
{
_clickedRow = [self rowAtPoint:aPoint];
_clickedColumn = [self columnAtPoint:lastPoint];
[self sendAction:_doubleAction to:_target];
}
}
Expand Down
1 change: 1 addition & 0 deletions AppKit/CPView.j
Expand Up @@ -3072,6 +3072,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",

[self _setupToolTipHandlers];
_toolTip = [aCoder decodeObjectForKey:CPViewToolTipKey];

if (_toolTip)
[self _installToolTipEventHandlers];

Expand Down
5 changes: 0 additions & 5 deletions Tests/Manual/CPButtonTest/AppController.j
Expand Up @@ -69,11 +69,6 @@ CPLogRegister(CPLogConsole);
[[radio1 radioGroup] setAction:@selector(radioGroupClicked:)];
[multiCheckbox setState:CPMixedState];

[pushInButton setButtonType:CPMomentaryLightButton];
[pushOnOffButton setButtonType:CPPushOnPushOffButton];
[toggleButton setButtonType:CPToggleButton];
[momentaryChangeButton setButtonType:CPMomentaryChangeButton];

[pushInButton setAlternateTitle:@"Should Not See Me"];
[toggleButton setAlternateTitle:@"Alternate Title For Toggle"];
[momentaryChangeButton setAlternateTitle:@"Changed!"];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Manual/CPButtonTest/Resources/MainMenu.cib

Large diffs are not rendered by default.

0 comments on commit 385de88

Please sign in to comment.