Author: mlytwyn
Date: Wed Dec 28 22:13:46 2016
New Revision: 40281
URL: http://svn.gna.org/viewcvs/gnustep?rev=40281&view=rev
Log:
Merge NSCell.m with GUI trunk revision 40273
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSCell.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSCell.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSCell.m?rev=40281&r1=40280&r2=40281&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSCell.m (original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSCell.m Wed Dec 28
22:13:46 2016
@@ -1655,8 +1655,15 @@
NSStringFromRect(cellFrame), point.x, point.y);
_mouse_down_flags = [theEvent modifierFlags];
+ if (![self isEnabled])
+ {
+ return NO;
+ }
+
if (![self startTrackingAt: point inView: controlView])
+ {
return NO;
+ }
if (![controlView mouse: point inRect: cellFrame])
return NO; // point is not in cell
@@ -1665,7 +1672,7 @@
&& [theEvent type] == NSLeftMouseDown)
[self _sendActionFrom: controlView];
- if (_action_mask & NSPeriodicMask)
+ if ([self isContinuous])
{
[self getPeriodicDelay: &delay interval: &interval];
[NSEvent startPeriodicEventsAfterDelay: delay withPeriod: interval];
@@ -1771,8 +1778,10 @@
inView: controlView
mouseIsUp: mouseWentUp];
- if (_action_mask & NSPeriodicMask)
- [NSEvent stopPeriodicEvents];
+ if ([self isContinuous])
+ {
+ [NSEvent stopPeriodicEvents];
+ }
if (mouseWentUp)
{
@@ -1823,8 +1832,14 @@
case NSNullCellType:
default:
- hitResult = NSCellHitContentArea;
- // FIXME: If the cell not disabled, and it would track, OR in
NSCellHitTrackableArea...
+ if (_cell.is_disabled == NO)
+ {
+ hitResult = NSCellHitContentArea | NSCellHitTrackableArea;
+ }
+ else
+ {
+ hitResult = NSCellHitContentArea;
+ }
break;
}
@@ -2335,6 +2350,7 @@
_cell.shows_first_responder = YES;
_cell.in_editing = YES;
+ // TESTPLANT-MAL-12282916: Paul Landers added this code...need to keep it...
if ([textObject isKindOfClass:[NSTextView class]])
{
NSCellUndoManager * undoManager = [[NSCellUndoManager alloc] init];
@@ -3069,6 +3085,7 @@
}
}
+// TESTPLANT-MAL-12282016: Keeping branch code...
- (NSAttributedString*)_resizeAttributedString:
(NSAttributedString*)attrstring forRect:(NSRect)titleRect
{
// Redo string based on selected truncation mask...
@@ -3140,8 +3157,10 @@
*/
aRect.origin.y = NSMidY (aRect) - titleSize.height/2;
aRect.size.height = titleSize.height;
+ // TESTPLANT-MAL-12282016: Keeping branch code...
aString = [self _resizeAttributedString:aString forRect:aRect];
+ // TESTPLANT-MAL-12282016: Keeping branch code...
[aString drawWithRect: aRect options: NSStringDrawingUsesLineFragmentOrigin];
}
@@ -3163,6 +3182,7 @@
*/
cellFrame.origin.y = NSMidY (cellFrame) - titleSize.height/2;
cellFrame.size.height = titleSize.height;
+ // TESTPLANT-MAL-12282016: Keeping branch code...
aString = [self _resizeDrawString:aString withAttrbutes:attributes
forRect:cellFrame];
[aString drawInRect: cellFrame withAttributes: attributes];
@@ -3187,6 +3207,7 @@
}
// Private helper method
+// TESTPLANT-MAL-12282016: Keeping branch code...
- (void) _drawFocusRingWithFrame: (NSRect)cellFrame inView:
(NSView*)controlView
{
BOOL inFocus = NO;
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs