This commit is contained in:
Antoine Mercadal
2012-10-05 17:59:57 -07:00
9 changed files with 2255 additions and 2194 deletions
+1 -2
View File
@@ -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]])
{
+15 -4
View File
@@ -222,6 +222,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
SEL _doubleAction;
CPInteger _clickedRow;
CPInteger _clickedColumn;
unsigned _columnAutoResizingStyle;
int _lastTrackedRowIndex;
@@ -324,7 +325,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
*/
- (void)_init
{
_lastSelectedRow = -1;
_lastSelectedRow = _clickedColumn = _clickedRow = -1;
_selectedColumnIndexes = [CPIndexSet indexSet];
_selectedRowIndexes = [CPIndexSet indexSet];
@@ -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.
@@ -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],
@@ -4190,7 +4196,7 @@ 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;
@@ -4198,6 +4204,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_)
{
rowIndex = [self rowAtPoint:aPoint];
if (rowIndex !== -1)
{
if ([_draggedRowIndexes count] > 0)
@@ -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_)
@@ -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];
}
}
+1
View File
@@ -3072,6 +3072,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
[self _setupToolTipHandlers];
_toolTip = [aCoder decodeObjectForKey:CPViewToolTipKey];
if (_toolTip)
[self _installToolTipEventHandlers];
@@ -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!"];
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -271,6 +271,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /usr/bin/perl;
shellScript = "#!/usr/bin/perl\n\nwhile (<>) {\n s/\\s+$//;\n print \"$_\\n\";\n}";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
-2
View File
@@ -269,8 +269,6 @@ var NSButtonIsBorderedMask = 0x00800000,
_highlightsBy = [cell highlightsBy];
_showsStateBy = [cell showsStateBy];
[self setTag:[cell tag]];
return self;
}
+5
View File
@@ -56,6 +56,11 @@
[self setLineBreakMode:[cell lineBreakMode]];
[self setFormatter:[cell formatter]];
// In IB, both cells and controls can have tags.
// If the control has a tag, that takes precedence.
if ([aCoder containsValueForKey:@"NSTag"])
[self setTag:[aCoder decodeIntForKey:@"NSTag"]];
}
return self;