From 49b8a5ecc07e435626c20ca75a792e8d99c1cf2d Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Tue, 19 Nov 2024 13:47:53 +0100 Subject: [PATCH] GSColorSliderCell: Move to libs-gui This class is shared between the StandardPicker bundle and the WheelPicker bundles. Exposing a class with the same name in two separate bundles results in undefined behavior. Move this class to a shared module (libs-gui in this case) to resolve that. --- ColorPickers/GNUmakefile | 7 +++---- Source/GNUmakefile | 3 ++- {ColorPickers => Source}/GSColorSliderCell.h | 1 + {ColorPickers => Source}/GSColorSliderCell.m | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) rename {ColorPickers => Source}/GSColorSliderCell.h (98%) rename {ColorPickers => Source}/GSColorSliderCell.m (99%) diff --git a/ColorPickers/GNUmakefile b/ColorPickers/GNUmakefile index 31e2ab1041..006769fa67 100644 --- a/ColorPickers/GNUmakefile +++ b/ColorPickers/GNUmakefile @@ -34,7 +34,7 @@ BUNDLE_NAME = StandardPicker NamedPicker WheelPicker BUNDLE_INSTALL_DIR = $(GNUSTEP_LIBRARY)/ColorPickers -ADDITIONAL_INCLUDE_DIRS += -I../Headers/Additions -I../Headers +ADDITIONAL_INCLUDE_DIRS += -I../Headers/Additions -I../Headers -I../Source ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR) -L../Models/$(GNUSTEP_OBJ_DIR) @@ -43,10 +43,9 @@ StandardPicker_OBJC_FILES = GSStandardColorPicker.m \ GSRGBColorPicker.m \ GSCMYKColorPicker.m \ GSHSBColorPicker.m \ - GSGrayColorPicker.m \ - GSColorSliderCell.m + GSGrayColorPicker.m NamedPicker_OBJC_FILES = GSNamedColorPicker.m -WheelPicker_OBJC_FILES = GSWheelColorPicker.m GSColorSliderCell.m +WheelPicker_OBJC_FILES = GSWheelColorPicker.m # The class to load StandardPicker_PRINCIPAL_CLASS = GSStandardColorPicker diff --git a/Source/GNUmakefile b/Source/GNUmakefile index d184a5f2a9..51fb140bb8 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -373,7 +373,8 @@ GSCSLinearExpression.m \ GSCSStrength.m \ GSCSEditInfo.m \ GSCSEditVariableManager.m \ -GSCSTableau.m +GSCSTableau.m \ +GSColorSliderCell.m # Turn off NSMenuItem warning that NSMenuItem conforms to , # but does not implement 's methods itself (it inherits diff --git a/ColorPickers/GSColorSliderCell.h b/Source/GSColorSliderCell.h similarity index 98% rename from ColorPickers/GSColorSliderCell.h rename to Source/GSColorSliderCell.h index fe439ee7b6..17dcd73672 100644 --- a/ColorPickers/GSColorSliderCell.h +++ b/Source/GSColorSliderCell.h @@ -31,6 +31,7 @@ #include +APPKIT_EXPORT_CLASS @interface GSColorSliderCell : NSSliderCell { int mode; diff --git a/ColorPickers/GSColorSliderCell.m b/Source/GSColorSliderCell.m similarity index 99% rename from ColorPickers/GSColorSliderCell.m rename to Source/GSColorSliderCell.m index fef346c345..a719dda43e 100644 --- a/ColorPickers/GSColorSliderCell.m +++ b/Source/GSColorSliderCell.m @@ -1,4 +1,4 @@ -/* GSStandardColorPicker.m +/* GSColorSliderCell.m Copyright (C) 2007 Free Software Foundation, Inc.