[vlc-commits] [Git][videolan/vlc][master] macosx: remove unused VLCCustomWindowButton

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jul 9 08:13:47 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
40b7ef2d by Serhii Bykov at 2026-07-09T07:45:22+00:00
macosx: remove unused VLCCustomWindowButton

- - - - -


6 changed files:

- extras/package/macosx/VLC.xcodeproj/project.pbxproj
- modules/gui/macosx/Makefile.am
- modules/gui/macosx/library/VLCLibraryWindow.m
- − modules/gui/macosx/views/VLCCustomWindowButton.h
- − modules/gui/macosx/views/VLCCustomWindowButton.m
- po/POTFILES.in


Changes:

=====================================
extras/package/macosx/VLC.xcodeproj/project.pbxproj
=====================================
@@ -217,7 +217,6 @@
 		7D445D8B22032B9200263D34 /* VLCPlayQueueTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D445D8A22032B9200263D34 /* VLCPlayQueueTableView.m */; };
 		7D445D8E2203375100263D34 /* VLCPlayQueueMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D445D8D2203375100263D34 /* VLCPlayQueueMenuController.m */; };
 		7D460B0C229EB4C700097948 /* VLCDragDropView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D460B0B229EB4C700097948 /* VLCDragDropView.m */; };
-		7D61DCE4236C1937008133CF /* VLCCustomWindowButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D61DCE3236C1937008133CF /* VLCCustomWindowButton.m */; };
 		7D66D4362200BC340040D04A /* VLCClickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D66D4352200BC340040D04A /* VLCClickerManager.m */; };
 		7D66D4392200C5B80040D04A /* VLCVideoFilterHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D66D4382200C5B80040D04A /* VLCVideoFilterHelper.m */; };
 		7D67318622C8F4060000AD40 /* VLCMediaSourceCollectionViewItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D67318422C8F4050000AD40 /* VLCMediaSourceCollectionViewItem.m */; };
@@ -809,8 +808,6 @@
 		7D5678EC1D5BA1DC002698F3 /* VLCApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCApplication.m; sourceTree = "<group>"; };
 		7D5678EE1D5BA397002698F3 /* VLCMainWindowControlsBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCMainWindowControlsBar.h; sourceTree = "<group>"; };
 		7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCMainWindowControlsBar.m; sourceTree = "<group>"; };
-		7D61DCE2236C1937008133CF /* VLCCustomWindowButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCCustomWindowButton.h; sourceTree = "<group>"; };
-		7D61DCE3236C1937008133CF /* VLCCustomWindowButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCCustomWindowButton.m; sourceTree = "<group>"; };
 		7D61DCE7236C6A3D008133CF /* window-close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close.png"; path = "Button-Icons/window-close.png"; sourceTree = "<group>"; };
 		7D61DCE8236C6A3D008133CF /* window-close-on-graphite at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-on-graphite at 2x.png"; path = "Button-Icons/window-close-on-graphite at 2x.png"; sourceTree = "<group>"; };
 		7D61DCE9236C6A3D008133CF /* window-close-over-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-over-graphite.png"; path = "Button-Icons/window-close-over-graphite.png"; sourceTree = "<group>"; };
@@ -1169,8 +1166,6 @@
 				536283FF291147C500640C15 /* VLCBasicView.m */,
 				6B0292E41F43256300A50082 /* VLCBottomBarView.h */,
 				6B0292E51F43256300A50082 /* VLCBottomBarView.m */,
-				7D61DCE2236C1937008133CF /* VLCCustomWindowButton.h */,
-				7D61DCE3236C1937008133CF /* VLCCustomWindowButton.m */,
 				6B6A499A1DFD9B23009128AC /* VLCDefaultValueSlider.h */,
 				6B6A499B1DFD9B23009128AC /* VLCDefaultValueSlider.m */,
 				6B6A499C1DFD9B23009128AC /* VLCDefaultValueSliderCell.h */,
@@ -2306,7 +2301,6 @@
 				1CCC88F52078A3D500E5626F /* SyncTracks.xib in Sources */,
 				1CCC88F62078A3D500E5626F /* VLCInformationWindow.xib in Sources */,
 				539BA79F298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.m in Sources */,
-				7D61DCE4236C1937008133CF /* VLCCustomWindowButton.m in Sources */,
 				7DFFF90123682D4800C8B0C9 /* VLCDetachedAudioWindow.m in Sources */,
 				5341F14D2C981B7C003BDF0A /* VLCLibraryWindowAbstractSidebarViewController.m in Sources */,
 				7D66D4392200C5B80040D04A /* VLCVideoFilterHelper.m in Sources */,


=====================================
modules/gui/macosx/Makefile.am
=====================================
@@ -449,8 +449,6 @@ libmacosx_plugin_la_SOURCES = \
 	gui/macosx/views/VLCBasicView.m \
 	gui/macosx/views/VLCBottomBarView.h \
 	gui/macosx/views/VLCBottomBarView.m \
-	gui/macosx/views/VLCCustomWindowButton.h \
-	gui/macosx/views/VLCCustomWindowButton.m \
 	gui/macosx/views/VLCDefaultValueSlider.h \
 	gui/macosx/views/VLCDefaultValueSlider.m \
 	gui/macosx/views/VLCDefaultValueSliderCell.h \


=====================================
modules/gui/macosx/library/VLCLibraryWindow.m
=====================================
@@ -75,7 +75,6 @@
 #import "media-source/VLCLibraryMediaSourceViewNavigationStack.h"
 
 #import "views/VLCBottomBarView.h"
-#import "views/VLCCustomWindowButton.h"
 #import "views/VLCDragDropView.h"
 #import "views/VLCImageView.h"
 #import "views/VLCLoadingOverlayView.h"


=====================================
modules/gui/macosx/views/VLCCustomWindowButton.h deleted
=====================================
@@ -1,60 +0,0 @@
-/*****************************************************************************
-* VLCCustomWindowButton.h: MacOS X interface module
-*****************************************************************************
-* Copyright (C) 2011-2019 VLC authors and VideoLAN
-*
-* Authors: Felix Paul Kühne <fkuehne # videolan -dot- org>
-*          David Fuhrmann <dfuhrmann at videolan dot org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
-*****************************************************************************/
-
-#import <Cocoa/Cocoa.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
- at interface VLCWindowButtonCell : NSButtonCell
-
- at end
-
- at interface VLCCustomWindowButtonPrototype : NSButton
-
-- (void)performDefaultButtonAction:(id)sender;
-
- at end
-
- at interface VLCCustomWindowCloseButton : VLCCustomWindowButtonPrototype
-
- at end
-
-
- at interface VLCCustomWindowMinimizeButton : VLCCustomWindowButtonPrototype
-
- at end
-
-
- at interface VLCCustomWindowZoomButton : VLCCustomWindowButtonPrototype
-
- at end
-
- at interface VLCCustomWindowFullscreenButton : VLCCustomWindowButtonPrototype
-
- at end
-
- at interface VLCCustomEmptyLibraryBrowseButton : NSButton
-
- at end
-
-NS_ASSUME_NONNULL_END


=====================================
modules/gui/macosx/views/VLCCustomWindowButton.m deleted
=====================================
@@ -1,305 +0,0 @@
-/*****************************************************************************
-* VLCCustomWindowButton.m: MacOS X interface module
-*****************************************************************************
-* Copyright (C) 2011-2019 VLC authors and VideoLAN
-*
-* Authors: Felix Paul Kühne <fkuehne # videolan -dot- org>
-*          David Fuhrmann <dfuhrmann at videolan dot org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
-*****************************************************************************/
-
-#import "VLCCustomWindowButton.h"
-
-#import "extensions/NSColor+VLCAdditions.h"
-
- at interface VLCCustomWindowButtonPrototype()
-
- at property (readwrite, retain) NSImage *buttonImage;
- at property (readwrite, retain) NSImage *hoverButtonImage;
- at property (readwrite, retain) NSImage *onClickButtonImage;
-
-- (void)loadButtonIcons;
-- (NSArray *)extendedAccessibilityAttributeNames:(NSArray *)theAttributeNames;
-- (id)extendedAccessibilityAttributeValue:(NSString *)theAttributeName;
-- (NSNumber *)extendedAccessibilityIsAttributeSettable:(NSString *)theAttributeName;
-
- at end
-
- at implementation VLCWindowButtonCell
-
-- (NSArray *)accessibilityAttributeNames
-{
-    NSArray *theAttributeNames = [super accessibilityAttributeNames];
-    id theControlView = [self controlView];
-    return ([theControlView respondsToSelector: @selector(extendedAccessibilityAttributeNames:)] ? [theControlView extendedAccessibilityAttributeNames: theAttributeNames] : theAttributeNames); // ask the cell's control view (i.e., the button) for additional attribute values
-}
-
-- (id)accessibilityAttributeValue:(NSString *)theAttributeName
-{
-    id theControlView = [self controlView];
-    if ([theControlView respondsToSelector: @selector(extendedAccessibilityAttributeValue:)]) {
-        id theValue = [theControlView extendedAccessibilityAttributeValue: theAttributeName];
-        if (theValue) {
-            return theValue; // if this is an extended attribute value we added, return that -- otherwise, fall back to super's implementation
-        }
-    }
-    return [super accessibilityAttributeValue: theAttributeName];
-}
-
-- (BOOL)accessibilityIsAttributeSettable:(NSString *)theAttributeName
-{
-    id theControlView = [self controlView];
-    if ([theControlView respondsToSelector: @selector(extendedAccessibilityIsAttributeSettable:)]) {
-        NSNumber *theValue = [theControlView extendedAccessibilityIsAttributeSettable: theAttributeName];
-        if (theValue)
-            return [theValue boolValue]; // same basic strategy we use in -accessibilityAttributeValue:
-    }
-    return [super accessibilityIsAttributeSettable: theAttributeName];
-}
-
- at end
-
- at implementation VLCCustomWindowButtonPrototype
-
-+ (Class)cellClass
-{
-    return [VLCWindowButtonCell class];
-}
-
-- (instancetype)initWithCoder:(NSCoder *)coder
-{
-    self = [super initWithCoder:coder];
-    if (self) {
-        [self commonInitializer];
-    }
-    return self;
-}
-
-- (instancetype)initWithFrame:(NSRect)frameRect
-{
-    self = [super initWithFrame:frameRect];
-    if (self) {
-        [self commonInitializer];
-    }
-    return self;
-}
-
-- (void)commonInitializer
-{
-    [NSNotificationCenter.defaultCenter addObserver:self
-                                             selector:@selector(controlTintChanged:)
-                                                 name:NSControlTintDidChangeNotification
-                                               object:nil];
-    [self loadButtonIcons];
-    [self setTarget:self];
-    [self setAction:@selector(performDefaultButtonAction:)];
-}
-
-- (NSImage *)getButtonImage:(NSString *)imageName
-{
-    if ([NSColor currentControlTint] != NSBlueControlTint) {
-        imageName = [imageName stringByAppendingString:@"-graphite"];
-    }
-
-    return [NSImage imageNamed:imageName];
-}
-
-- (void)controlTintChanged:(NSNotification *)notification
-{
-    [self loadButtonIcons];
-    [self setNeedsDisplay];
-}
-
-- (void)loadButtonIcons
-{
-    [self setImage:self.buttonImage];
-    [self setAlternateImage:self.hoverButtonImage];
-}
-
-- (void)mouseEntered:(NSEvent *)event
-{
-    [self setImage:self.hoverButtonImage];
-    [super mouseEntered:event];
-}
-
-- (void)mouseExited:(NSEvent *)event
-{
-    [self setImage:self.buttonImage];
-    [super mouseExited:event];
-}
-
-- (void)performDefaultButtonAction:(id)sender
-{
-}
-
-- (NSArray *)extendedAccessibilityAttributeNames:(NSArray *)theAttributeNames {
-    return ([theAttributeNames containsObject: NSAccessibilitySubroleAttribute] ? theAttributeNames : [theAttributeNames arrayByAddingObject: NSAccessibilitySubroleAttribute]); // run-of-the-mill button cells don't usually have a Subrole attribute, so we add that attribute
-}
-
-- (id)extendedAccessibilityAttributeValue:(NSString *)theAttributeName {
-    return nil;
-}
-
-- (NSNumber *)extendedAccessibilityIsAttributeSettable:(NSString *)theAttributeName {
-    return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? [NSNumber numberWithBool:NO] : nil); // make the Subrole attribute we added non-settable
-}
-
-- (void)accessibilityPerformAction:(NSString *)theActionName {
-    if ([theActionName isEqualToString: NSAccessibilityPressAction]) {
-        if ([self isEnabled])
-            [self performClick: nil];
-    } else
-        [super accessibilityPerformAction: theActionName];
-}
-
- at end
-
- at implementation VLCCustomWindowCloseButton
-
-- (id)extendedAccessibilityAttributeValue:(NSString *)theAttributeName
-{
-    return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityCloseButtonAttribute : nil);
-}
-
-- (void)loadButtonIcons
-{
-    self.buttonImage = [self getButtonImage:@"window-close"];
-    self.hoverButtonImage = [self getButtonImage:@"window-close-over"];
-    self.onClickButtonImage = [self getButtonImage:@"window-close-on"];
-
-    [super loadButtonIcons];
-}
-
-- (void)performDefaultButtonAction:(id)sender
-{
-    if (self.window.styleMask & NSWindowStyleMaskClosable) {
-        [[self window] performClose:sender];
-    } else {
-        [[self window] close];
-    }
-}
-
- at end
-
- at implementation VLCCustomWindowMinimizeButton
-
-- (id)extendedAccessibilityAttributeValue:(NSString *)theAttributeName
-{
-    return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityMinimizeButtonAttribute : nil);
-}
-
-- (void)loadButtonIcons
-{
-    self.buttonImage = [self getButtonImage:@"window-minimize"];
-    self.hoverButtonImage = [self getButtonImage:@"window-minimize-over"];
-    self.onClickButtonImage = [self getButtonImage:@"window-minimize-on"];
-
-    [super loadButtonIcons];
-}
-
-- (void)performDefaultButtonAction:(id)sender
-{
-    [[self window] miniaturize: sender];
-}
-
- at end
-
- at implementation VLCCustomWindowZoomButton
-
-- (id)extendedAccessibilityAttributeValue:(NSString *)theAttributeName
-{
-    return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityZoomButtonAttribute : nil);
-}
-
-- (void)loadButtonIcons
-{
-    self.buttonImage = [self getButtonImage:@"window-zoom"];
-    self.hoverButtonImage = [self getButtonImage:@"window-zoom-over"];
-    self.onClickButtonImage = [self getButtonImage:@"window-zoom-on"];
-
-    [super loadButtonIcons];
-}
-
-- (void)performDefaultButtonAction:(id)sender
-{
-    [[self window] performZoom: sender];
-}
-
- at end
-
- at implementation VLCCustomWindowFullscreenButton
-
-- (id)extendedAccessibilityAttributeValue:(NSString *)theAttributeName
-{
-    return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityFullScreenButtonAttribute : nil);
-}
-
-- (void)loadButtonIcons
-{
-    self.buttonImage = [self getButtonImage:@"window-fullscreen"];
-    self.hoverButtonImage = [self getButtonImage:@"window-fullscreen-over"];
-    self.onClickButtonImage = [self getButtonImage:@"window-fullscreen-on"];
-
-    [super loadButtonIcons];
-}
-
-- (void)performDefaultButtonAction:(id)sender
-{
-    [[self window] toggleFullScreen:self];
-}
-
- at end
-
- at implementation VLCCustomEmptyLibraryBrowseButton
-
-- (void)awakeFromNib
-{
-    self.wantsLayer = YES;
-    self.layer.backgroundColor = NSColor.VLCAccentColor.CGColor;
-    self.layer.cornerRadius = 6.0f;
-    
-    self.bezelStyle = NSBezelStyleRecessed;
-    self.bordered = NO;
-        
-    if ([self.cell isKindOfClass:[NSButtonCell class]]) {
-        NSButtonCell *cell = (NSButtonCell *)self.cell;
-        
-        cell.highlightsBy = NSContentsCellMask;
-        cell.imagePosition = NSImageLeft;
-    }
-
-    if (@available(macOS 11.0, *)) {
-        self.image = [NSImage imageWithSystemSymbolName:@"folder" accessibilityDescription:nil];
-        self.image.template = YES;
-        self.imageHugsTitle = YES;
-        self.contentTintColor = NSColor.whiteColor;
-    } else {
-        NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithAttributedString:self.attributedTitle];
-        NSRange const titleRange = NSMakeRange(0, [title length]);
-
-        // Normal
-        [title addAttribute:NSForegroundColorAttributeName value:[NSColor whiteColor] range:titleRange];
-        [self setAttributedTitle:title];
-
-        // Highlighted
-        [title removeAttribute:NSForegroundColorAttributeName range:titleRange];
-        [title addAttribute:NSForegroundColorAttributeName value:NSColor.VLClibraryLightTitleColor range:titleRange];
-
-        [self setAttributedAlternateTitle:title];
-    }
-}
-
- at end


=====================================
po/POTFILES.in
=====================================
@@ -577,8 +577,6 @@ modules/gui/macosx/preferences/prefs_widgets.h
 modules/gui/macosx/preferences/prefs_widgets.m
 modules/gui/macosx/views/VLCBottomBarView.h
 modules/gui/macosx/views/VLCBottomBarView.m
-modules/gui/macosx/views/VLCCustomWindowButton.h
-modules/gui/macosx/views/VLCCustomWindowButton.m
 modules/gui/macosx/views/VLCDefaultValueSlider.h
 modules/gui/macosx/views/VLCDefaultValueSlider.m
 modules/gui/macosx/views/VLCDefaultValueSliderCell.h



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/40b7ef2df492aac025f18e3ca8729d63784a283c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/40b7ef2df492aac025f18e3ca8729d63784a283c
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list