mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 15:11:04 +00:00
Extended NSCursor to handle missing standard cursor.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20428 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
25ff6e9629
commit
8281fcdf28
6 changed files with 28 additions and 2 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-12-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCursor.m (getStandardCursor()): If not standard cursor
|
||||
is available, try an image cursor with an image of the same name.
|
||||
* Images/common_OpenHandCursor.tiff
|
||||
* Images/common_ClosedHandCursor.tiff: New cursor image files by
|
||||
Fabien Vallon <fabien@sonappart.net>.
|
||||
* Images/GNUmakefile: Install the new files.
|
||||
* Images/nsmapping.strings: Register the new cursor files for the
|
||||
names used in NSCursor.m.
|
||||
|
||||
2004-11-11 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/GSDragView.m ([GSDragView -_setCursor]): Initialize variable.
|
||||
|
|
|
@ -117,6 +117,8 @@ common_ToolbarSeparatorItem.tiff \
|
|||
common_ToolbarShowColorsItem.tiff \
|
||||
common_ToolbarShowFontsItem.tiff \
|
||||
common_ToolbarSpaceItem.tiff \
|
||||
common_ClosedHandCursor.tiff \
|
||||
common_OpenHandCursor.tiff \
|
||||
page_landscape.tiff \
|
||||
page_portrait.tiff
|
||||
|
||||
|
|
BIN
Images/common_ClosedHandCursor.tiff
Normal file
BIN
Images/common_ClosedHandCursor.tiff
Normal file
Binary file not shown.
BIN
Images/common_OpenHandCursor.tiff
Normal file
BIN
Images/common_OpenHandCursor.tiff
Normal file
Binary file not shown.
|
@ -11,3 +11,5 @@ NSMenuCheckmark = common_2DCheckMark;
|
|||
NSMenuArrow = common_3DArrowRight;
|
||||
NSMenuMixedState = common_2DDash;
|
||||
NSComboArrow = common_ComboBoxEllipsis;
|
||||
GSClosedHandCursor = common_ClosedHandCursor;
|
||||
GSOpenHandCursor = common_OpenHandCursor;
|
|
@ -177,11 +177,22 @@ NSCursor *getStandardCursor(NSString *name, int style)
|
|||
|
||||
if (cursor == nil)
|
||||
{
|
||||
void *c;
|
||||
void *c = NULL;
|
||||
|
||||
cursor = [[NSCursor_class alloc] initWithImage: nil];
|
||||
[GSCurrentServer() standardcursor: style : &c];
|
||||
[cursor _setCid: c];
|
||||
if (c == NULL)
|
||||
{
|
||||
/*
|
||||
There is no standard cursor with this name defined in the
|
||||
backend, so try an image with this name.
|
||||
*/
|
||||
[cursor setImage: [NSImage imageNamed: name]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[cursor _setCid: c];
|
||||
}
|
||||
[cursorDict setObject: cursor forKey: name];
|
||||
RELEASE(cursor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue