From f41b5fd58cffcff1683a5694918c957b0d25d442 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Sun, 19 Jun 2011 16:13:47 +0000 Subject: [PATCH] * Source/NSButtonCell.m (-setTitle:, -setAttributedTitle:, -setAlternateImage:, -setImagePosition:): Update the control to reflect the changes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33350 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSButtonCell.m | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/ChangeLog b/ChangeLog index d31da0aca..e77e91e10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-19 Fred Kiefer + + * Source/NSButtonCell.m (-setTitle:, -setAttributedTitle:, + -setAlternateImage:, -setImagePosition:): Update the control to + reflect the changes. + 2011-06-19 Fred Kiefer * Source/NSDocumentController.m (-_openRecentDocument:): Use most diff --git a/Source/NSButtonCell.m b/Source/NSButtonCell.m index 3b95139cc..b0e55667b 100644 --- a/Source/NSButtonCell.m +++ b/Source/NSButtonCell.m @@ -339,6 +339,14 @@ typedef struct _GSButtonCellFlags { ASSIGNCOPY(_contents, aString); _cell.contents_is_attributed_string = NO; + + if (_control_view) + { + if ([_control_view isKindOfClass: [NSControl class]]) + { + [(NSControl*)_control_view updateCell: self]; + } + } } /**

Sets the NSButtonCell's alternate title ( used when highlighted ) @@ -401,6 +409,14 @@ typedef struct _GSButtonCellFlags { ASSIGNCOPY(_contents, aString); _cell.contents_is_attributed_string = YES; + + if (_control_view) + { + if ([_control_view isKindOfClass: [NSControl class]]) + { + [(NSControl*)_control_view updateCell: self]; + } + } } - (void)setTitleWithMnemonic:(NSString *)aString @@ -469,6 +485,14 @@ typedef struct _GSButtonCellFlags - (void) setAlternateImage: (NSImage*)anImage { ASSIGN(_altImage, anImage); + + if (_control_view) + { + if ([_control_view isKindOfClass: [NSControl class]]) + { + [(NSControl*)_control_view updateCell: self]; + } + } } /**

Sets the image position. The GNUstep implementation depends only on @@ -497,6 +521,14 @@ typedef struct _GSButtonCellFlags { _cell.type = NSImageCellType; } + + if (_control_view) + { + if ([_control_view isKindOfClass: [NSControl class]]) + { + [(NSControl*)_control_view updateCell: self]; + } + } } /**

Gets the NSButtonCell's delay and the interval