Skip to content

Commit

Permalink
GSColorSliderCell: Move to libs-gui (#321)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
qmfrederik authored Nov 19, 2024
1 parent 82717ee commit 68e2716
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 3 additions & 4 deletions ColorPickers/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Source/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NSObject>,
# but does not implement <NSObject>'s methods itself (it inherits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include <AppKit/NSSliderCell.h>

APPKIT_EXPORT_CLASS
@interface GSColorSliderCell : NSSliderCell
{
int mode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* GSStandardColorPicker.m
/* GSColorSliderCell.m
Copyright (C) 2007 Free Software Foundation, Inc.
Expand Down

0 comments on commit 68e2716

Please sign in to comment.