diff --git a/ChangeLog b/ChangeLog index 77d65e930..c63651de7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-12-09 Fred Kiefer + + * 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 . + * 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 * Source/GSDragView.m ([GSDragView -_setCursor]): Initialize variable. diff --git a/Images/GNUmakefile b/Images/GNUmakefile index 657c7c272..fdad33d97 100644 --- a/Images/GNUmakefile +++ b/Images/GNUmakefile @@ -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 diff --git a/Images/common_ClosedHandCursor.tiff b/Images/common_ClosedHandCursor.tiff new file mode 100644 index 000000000..0b15f5d7e Binary files /dev/null and b/Images/common_ClosedHandCursor.tiff differ diff --git a/Images/common_OpenHandCursor.tiff b/Images/common_OpenHandCursor.tiff new file mode 100644 index 000000000..e1cd4eb79 Binary files /dev/null and b/Images/common_OpenHandCursor.tiff differ diff --git a/Images/nsmapping.strings b/Images/nsmapping.strings index 77adf9bac..2bcbde76d 100644 --- a/Images/nsmapping.strings +++ b/Images/nsmapping.strings @@ -11,3 +11,5 @@ NSMenuCheckmark = common_2DCheckMark; NSMenuArrow = common_3DArrowRight; NSMenuMixedState = common_2DDash; NSComboArrow = common_ComboBoxEllipsis; +GSClosedHandCursor = common_ClosedHandCursor; +GSOpenHandCursor = common_OpenHandCursor; \ No newline at end of file diff --git a/Source/NSCursor.m b/Source/NSCursor.m index 65f5e347c..54801964b 100644 --- a/Source/NSCursor.m +++ b/Source/NSCursor.m @@ -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); }