mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 12:50:40 +00:00
Properly retain/release the sound; indentation fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13310 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eda67fbdab
commit
2b1890db9e
1 changed files with 36 additions and 15 deletions
|
@ -111,6 +111,7 @@
|
|||
RELEASE(_altImage);
|
||||
RELEASE(_keyEquivalent);
|
||||
RELEASE(_keyEquivalentFont);
|
||||
RELEASE(_sound);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -217,8 +218,12 @@
|
|||
ASSIGNCOPY(_altContents, aString);
|
||||
|
||||
if (_control_view)
|
||||
if ([_control_view isKindOfClass: [NSControl class]])
|
||||
[(NSControl*)_control_view updateCell: self];
|
||||
{
|
||||
if ([_control_view isKindOfClass: [NSControl class]])
|
||||
{
|
||||
[(NSControl*)_control_view updateCell: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSAttributedString *)attributedAlternateTitle
|
||||
|
@ -855,20 +860,30 @@
|
|||
* The following code must be kept in sync with -drawInteriorWithFrame
|
||||
*/
|
||||
if (_cell.is_highlighted)
|
||||
mask = _highlightsByMask;
|
||||
{
|
||||
mask = _highlightsByMask;
|
||||
}
|
||||
else if (_cell.state)
|
||||
mask = _showAltStateMask;
|
||||
{
|
||||
mask = _showAltStateMask;
|
||||
}
|
||||
else
|
||||
mask = NSNoCellMask;
|
||||
|
||||
{
|
||||
mask = NSNoCellMask;
|
||||
}
|
||||
|
||||
if (mask & NSContentsCellMask)
|
||||
{
|
||||
imageToDisplay = _altImage;
|
||||
if (!imageToDisplay)
|
||||
imageToDisplay = _cell_image;
|
||||
{
|
||||
imageToDisplay = _cell_image;
|
||||
}
|
||||
titleToDisplay = _altContents;
|
||||
if (titleToDisplay == nil || [titleToDisplay isEqual: @""])
|
||||
titleToDisplay = _contents;
|
||||
{
|
||||
titleToDisplay = _contents;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -877,10 +892,14 @@
|
|||
}
|
||||
|
||||
if (imageToDisplay)
|
||||
imageSize = [imageToDisplay size];
|
||||
else
|
||||
imageSize = NSZeroSize;
|
||||
|
||||
{
|
||||
imageSize = [imageToDisplay size];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageSize = NSZeroSize;
|
||||
}
|
||||
|
||||
if (titleToDisplay != nil)
|
||||
{
|
||||
titleSize = [self _sizeText: titleToDisplay];
|
||||
|
@ -970,12 +989,14 @@
|
|||
theRect.size.height - 3.);
|
||||
}
|
||||
else
|
||||
return theRect;
|
||||
{
|
||||
return theRect;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setSound:(NSSound *)aSound
|
||||
- (void)setSound: (NSSound *)aSound
|
||||
{
|
||||
_sound = aSound;
|
||||
ASSIGN(_sound, aSound);
|
||||
}
|
||||
|
||||
- (NSSound *)sound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue