From c361b0e670b0d3b3cb3900b5b9c798d7a8c99317 Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 25 Jun 2024 13:29:22 +0200 Subject: [PATCH] remove support for very old GUI versions --- FSNode/FSNIconsView.m | 12 +----------- GWorkspace/Desktop/GWDesktopView.m | 22 ++++------------------ 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/FSNode/FSNIconsView.m b/FSNode/FSNIconsView.m index e554b17b..afe65e85 100644 --- a/FSNode/FSNIconsView.m +++ b/FSNode/FSNIconsView.m @@ -72,18 +72,9 @@ DockStyleModern = 1 } DockStyle; -#define SUPPORTS_XOR ((GNUSTEP_GUI_MAJOR_VERSION > 0) \ - || (GNUSTEP_GUI_MAJOR_VERSION == 0 \ - && GNUSTEP_GUI_MINOR_VERSION > 22) \ - || (GNUSTEP_GUI_MAJOR_VERSION == 0 \ - && GNUSTEP_GUI_MINOR_VERSION == 22 \ - && GNUSTEP_GUI_SUBMINOR_VERSION > 0)) - static void GWHighlightFrameRect(NSRect aRect) { -#if SUPPORTS_XOR NSFrameRectWithWidthUsingOperation(aRect, 1.0, GSCompositeHighlight); -#endif } @@ -595,7 +586,6 @@ - (void)mouseDragged:(NSEvent *)theEvent // Erase the previous rect if (transparentSelection - || !SUPPORTS_XOR || (!transparentSelection && scrolled)) { [self setNeedsDisplayInRect: oldRect]; @@ -605,7 +595,7 @@ - (void)mouseDragged:(NSEvent *)theEvent // Draw the new rect [self lockFocus]; - if (transparentSelection || !SUPPORTS_XOR) + if (transparentSelection) { [[NSColor darkGrayColor] set]; NSFrameRect(r); diff --git a/GWorkspace/Desktop/GWDesktopView.m b/GWorkspace/Desktop/GWDesktopView.m index 42551319..33d7b208 100644 --- a/GWorkspace/Desktop/GWDesktopView.m +++ b/GWorkspace/Desktop/GWDesktopView.m @@ -839,18 +839,9 @@ - (void)mouseDown:(NSEvent *)theEvent } } -#define SUPPORTS_XOR ((GNUSTEP_GUI_MAJOR_VERSION > 0) \ - || (GNUSTEP_GUI_MAJOR_VERSION == 0 \ - && GNUSTEP_GUI_MINOR_VERSION > 22) \ - || (GNUSTEP_GUI_MAJOR_VERSION == 0 \ - && GNUSTEP_GUI_MINOR_VERSION == 22 \ - && GNUSTEP_GUI_SUBMINOR_VERSION > 0)) - static void GWHighlightFrameRect(NSRect aRect) { -#if SUPPORTS_XOR NSFrameRectWithWidthUsingOperation(aRect, 1.0, GSCompositeHighlight); -#endif } - (void)mouseDragged:(NSEvent *)theEvent @@ -895,8 +886,7 @@ - (void)mouseDragged:(NSEvent *)theEvent // Erase the previous rect - - if (transparentSelection || !SUPPORTS_XOR) + if (transparentSelection) { [self setNeedsDisplayInRect: oldRect]; [[self window] displayIfNeeded]; @@ -907,16 +897,12 @@ - (void)mouseDragged:(NSEvent *)theEvent } // Draw the new rect - - if (transparentSelection || !SUPPORTS_XOR) + if (transparentSelection) { [[NSColor darkGrayColor] set]; NSFrameRect(r); - if (transparentSelection) - { - [[[NSColor darkGrayColor] colorWithAlphaComponent: 0.33] set]; - NSRectFillUsingOperation(r, NSCompositeSourceOver); - } + [[[NSColor darkGrayColor] colorWithAlphaComponent: 0.33] set]; + NSRectFillUsingOperation(r, NSCompositeSourceOver); } else {