Revision: 15045 http://sourceforge.net/p/skim-app/code/15045 Author: hofman Date: 2025-03-29 16:36:17 +0000 (Sat, 29 Mar 2025) Log Message: ----------- Don't bother sending color swatch color change notifications that nobody observes. Can KVO observe colors for this.
Modified Paths: -------------- trunk/SKColorSwatch.h trunk/SKColorSwatch.m Modified: trunk/SKColorSwatch.h =================================================================== --- trunk/SKColorSwatch.h 2025-03-29 16:13:28 UTC (rev 15044) +++ trunk/SKColorSwatch.h 2025-03-29 16:36:17 UTC (rev 15045) @@ -40,8 +40,6 @@ NS_ASSUME_NONNULL_BEGIN -extern NSString *SKColorSwatchColorsChangedNotification; - @class SKColorSwatchItemView; @interface SKColorSwatch : NSControl <NSDraggingSource, NSAccessibilityGroup> { Modified: trunk/SKColorSwatch.m =================================================================== --- trunk/SKColorSwatch.m 2025-03-29 16:13:28 UTC (rev 15044) +++ trunk/SKColorSwatch.m 2025-03-29 16:36:17 UTC (rev 15045) @@ -45,7 +45,6 @@ #import "NSGraphics_SKExtensions.h" #import "NSShadow_SKExtensions.h" -NSString *SKColorSwatchColorsChangedNotification = @"SKColorSwatchColorsChangedNotification"; NSString *SKColorSwatchOrWellWillActivateNotification = @"SKColorSwatchOrWellWillActivateNotification"; #define COLORS_KEY @"colors" @@ -501,7 +500,6 @@ [self sizeToFit]; [self setBezelWidth:[self contentWidth]]; } - [[NSNotificationCenter defaultCenter] postNotificationName:SKColorSwatchColorsChangedNotification object:self]; if (focusedIndex >= (NSInteger)count) focusedIndex = count - 1; } @@ -589,7 +587,6 @@ value = [valueTransformer reverseTransformedValue:value]; [observedObject setValue:value forKeyPath:observedKeyPath]; } - [[NSNotificationCenter defaultCenter] postNotificationName:SKColorSwatchColorsChangedNotification object:self]; } - (void)setColor:(NSColor *)color atIndex:(NSInteger)i fromPanel:(BOOL)fromPanel { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit