mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:30:47 +00:00
Rename color (list) change notifications to match Cocoa (and OpenStep).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31893 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
da43c7104b
commit
865193b4bf
8 changed files with 32 additions and 12 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2011-01-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Headers/AppKit/NSColorList.h:
|
||||||
|
* Headers/AppKit/NSColorPanel.h:
|
||||||
|
* Source/NSColorList.m (-insertColor:key:atIndex:,
|
||||||
|
-removeColorWithKey:, -setColorForKey:):
|
||||||
|
* Source/NSColorPanel.m (-setColor:):
|
||||||
|
* Source/NSColorWell.m (-activate:):
|
||||||
|
* Source/NSWindow.m (-initWithContentRect:styleMask:backing:defer:):
|
||||||
|
* Source/externs.m(NSColorListDidChangeNotification,
|
||||||
|
NSColorPanelColorDidChangeNotification):
|
||||||
|
Rename notifications to match Cocoa (and OpenStep).
|
||||||
|
|
||||||
2011-01-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2011-01-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSApplication.m (-rightMouseDown:):
|
* Source/NSApplication.m (-rightMouseDown:):
|
||||||
|
|
|
@ -164,6 +164,6 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
APPKIT_EXPORT NSString *NSColorListChangedNotification;
|
APPKIT_EXPORT NSString *NSColorListDidChangeNotification;
|
||||||
|
|
||||||
#endif // _GNUstep_H_NSColorList
|
#endif // _GNUstep_H_NSColorList
|
||||||
|
|
|
@ -138,6 +138,6 @@ enum {
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
APPKIT_EXPORT NSString *NSColorPanelColorChangedNotification;
|
APPKIT_EXPORT NSString *NSColorPanelColorDidChangeNotification;
|
||||||
|
|
||||||
#endif // _GNUstep_H_NSColorPanel
|
#endif // _GNUstep_H_NSColorPanel
|
||||||
|
|
|
@ -342,7 +342,7 @@ static NSColorList *themeColorList = nil;
|
||||||
[_orderedColorKeys removeObject: key];
|
[_orderedColorKeys removeObject: key];
|
||||||
[_orderedColorKeys insertObject: key atIndex: location];
|
[_orderedColorKeys insertObject: key atIndex: location];
|
||||||
|
|
||||||
n = [NSNotification notificationWithName: NSColorListChangedNotification
|
n = [NSNotification notificationWithName: NSColorListDidChangeNotification
|
||||||
object: self
|
object: self
|
||||||
userInfo: nil];
|
userInfo: nil];
|
||||||
[[NSNotificationQueue defaultQueue]
|
[[NSNotificationQueue defaultQueue]
|
||||||
|
@ -363,7 +363,7 @@ static NSColorList *themeColorList = nil;
|
||||||
[_colorDictionary removeObjectForKey: key];
|
[_colorDictionary removeObjectForKey: key];
|
||||||
[_orderedColorKeys removeObject: key];
|
[_orderedColorKeys removeObject: key];
|
||||||
|
|
||||||
n = [NSNotification notificationWithName: NSColorListChangedNotification
|
n = [NSNotification notificationWithName: NSColorListDidChangeNotification
|
||||||
object: self
|
object: self
|
||||||
userInfo: nil];
|
userInfo: nil];
|
||||||
[[NSNotificationQueue defaultQueue]
|
[[NSNotificationQueue defaultQueue]
|
||||||
|
@ -387,7 +387,7 @@ static NSColorList *themeColorList = nil;
|
||||||
if ([_orderedColorKeys containsObject: key] == NO)
|
if ([_orderedColorKeys containsObject: key] == NO)
|
||||||
[_orderedColorKeys addObject: key];
|
[_orderedColorKeys addObject: key];
|
||||||
|
|
||||||
n = [NSNotification notificationWithName: NSColorListChangedNotification
|
n = [NSNotification notificationWithName: NSColorListDidChangeNotification
|
||||||
object: self
|
object: self
|
||||||
userInfo: nil];
|
userInfo: nil];
|
||||||
[[NSNotificationQueue defaultQueue]
|
[[NSNotificationQueue defaultQueue]
|
||||||
|
|
|
@ -676,7 +676,7 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** <p>Sets the NSColor displayed to aColor. This method post a
|
/** <p>Sets the NSColor displayed to aColor. This method post a
|
||||||
NSColorPanelColorChangedNotification notification if needed.</p>
|
NSColorPanelColorDidChangeNotification notification if needed.</p>
|
||||||
<p>See Also: -color [NSColorWell-setColor:]
|
<p>See Also: -color [NSColorWell-setColor:]
|
||||||
</p>
|
</p>
|
||||||
*/
|
*/
|
||||||
|
@ -691,7 +691,7 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
||||||
[NSApp sendAction: _action to: _target from: self];
|
[NSApp sendAction: _action to: _target from: self];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
postNotificationName: NSColorPanelColorChangedNotification
|
postNotificationName: NSColorPanelColorDidChangeNotification
|
||||||
object: (id)self];
|
object: (id)self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
||||||
|
|
||||||
[nc addObserver: self
|
[nc addObserver: self
|
||||||
selector: @selector(_takeColorFromPanel:)
|
selector: @selector(_takeColorFromPanel:)
|
||||||
name: NSColorPanelColorChangedNotification
|
name: NSColorPanelColorDidChangeNotification
|
||||||
object: nil];
|
object: nil];
|
||||||
|
|
||||||
_is_active = YES;
|
_is_active = YES;
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ many times.
|
||||||
|
|
||||||
[nc addObserver: self
|
[nc addObserver: self
|
||||||
selector: @selector(colorListChanged:)
|
selector: @selector(colorListChanged:)
|
||||||
name: NSColorListChangedNotification
|
name: NSColorListDidChangeNotification
|
||||||
object: nil];
|
object: nil];
|
||||||
|
|
||||||
if (style == NSWindows95InterfaceStyle)
|
if (style == NSWindows95InterfaceStyle)
|
||||||
|
|
|
@ -149,11 +149,18 @@ NSString *NSSystemColorsDidChangeNotification =
|
||||||
@"NSSystemColorsDidChangeNotification";
|
@"NSSystemColorsDidChangeNotification";
|
||||||
|
|
||||||
// NSColorList notifications
|
// NSColorList notifications
|
||||||
NSString *NSColorListChangedNotification = @"NSColorListChange";
|
NSString *NSColorListDidChangeNotification = @"NSColorListDidChange";
|
||||||
|
|
||||||
// NSColorPanel notifications
|
// NSColorPanel notifications
|
||||||
NSString *NSColorPanelColorChangedNotification =
|
NSString *NSColorPanelColorDidChangeNotification =
|
||||||
@"NSColorPanelColorChangedNotification";
|
@"NSColorPanelColorDidChange";
|
||||||
|
|
||||||
|
#if GNUSTEP_GUI_MAJOR_VERSION == 0 && GNUSTEP_GUI_MINOR_VERSION < 20
|
||||||
|
/* The above notifications had been misspelled in GNUstep. We keep them around
|
||||||
|
here to preserve binary compatibility until the next release. */
|
||||||
|
NSString *NSColorListChangedNotification = @"NSColorListDidChange";
|
||||||
|
NSString *NSColorPanelColorChangedNotification = @"NSColorPanelColorDidChange";
|
||||||
|
#endif
|
||||||
|
|
||||||
// NSComboBox notifications
|
// NSComboBox notifications
|
||||||
NSString *NSComboBoxWillPopUpNotification =
|
NSString *NSComboBoxWillPopUpNotification =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue