[vlc-commits] [Git][videolan/vlc][master] macosx: replace deprecated NSAlertStyle constants with modern equivalents

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Apr 3 06:54:23 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
afbd6849 by Serhii Bykov at 2026-04-03T06:41:56+00:00
macosx: replace deprecated NSAlertStyle constants with modern equivalents

- - - - -


5 changed files:

- modules/gui/macosx/panels/VLCAudioEffectsWindowController.m
- modules/gui/macosx/panels/VLCVideoEffectsWindowController.m
- modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
- modules/gui/macosx/preferences/VLCSimplePrefsController.m
- modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m


Changes:

=====================================
modules/gui/macosx/panels/VLCAudioEffectsWindowController.m
=====================================
@@ -568,7 +568,7 @@ static inline void enableTextField(NSTextField *const __unsafe_unretained textFi
             [self->_profilePopup selectItemAtIndex:currentProfileIndex];
 
             NSAlert *alert = [[NSAlert alloc] init];
-            [alert setAlertStyle:NSCriticalAlertStyle];
+            [alert setAlertStyle:NSAlertStyleCritical];
             [alert setMessageText:_NS("Please enter a unique name for the new profile.")];
             [alert setInformativeText:_NS("Multiple profiles with the same name are not allowed.")];
             [alert beginSheetModalForWindow:_self.window


=====================================
modules/gui/macosx/panels/VLCVideoEffectsWindowController.m
=====================================
@@ -822,7 +822,7 @@ NSString *VLCVideoEffectsProfileNamesKey = @"VideoEffectProfileNames";
             [self->_profilePopup selectItemAtIndex:currentProfileIndex];
 
             NSAlert *alert = [[NSAlert alloc] init];
-            [alert setAlertStyle:NSCriticalAlertStyle];
+            [alert setAlertStyle:NSAlertStyleCritical];
             [alert setMessageText:_NS("Please enter a unique name for the new profile.")];
             [alert setInformativeText:_NS("Multiple profiles with the same name are not allowed.")];
             [alert beginSheetModalForWindow:_self.window


=====================================
modules/gui/macosx/panels/dialogs/VLCCoreDialogProvider.m
=====================================
@@ -291,13 +291,13 @@ static void updateProgressCallback(void *p_data,
 
     switch (questionType) {
         case VLC_DIALOG_QUESTION_WARNING:
-            [alert setAlertStyle:NSWarningAlertStyle];
+            [alert setAlertStyle:NSAlertStyleWarning];
             break;
         case VLC_DIALOG_QUESTION_CRITICAL:
-            [alert setAlertStyle:NSCriticalAlertStyle];
+            [alert setAlertStyle:NSAlertStyleCritical];
             break;
         default:
-            [alert setAlertStyle:NSInformationalAlertStyle];
+            [alert setAlertStyle:NSAlertStyleInformational];
             break;
     }
 


=====================================
modules/gui/macosx/preferences/VLCSimplePrefsController.m
=====================================
@@ -890,7 +890,7 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
 - (IBAction)resetPreferences:(NSControl *)sender
 {
     NSAlert *alert = [[NSAlert alloc] init];
-    [alert setAlertStyle:NSInformationalAlertStyle];
+    [alert setAlertStyle:NSAlertStyleInformational];
     [alert setMessageText:_NS("Reset Preferences")];
     [alert setInformativeText:_NS("This will reset VLC media player's preferences.\n\n"
                                   "Note that VLC will restart during the process, so your current "


=====================================
modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m
=====================================
@@ -292,7 +292,7 @@ NSString *VLCConvertAndSaveProfileNamesKey = @"CASProfileNames";
             NSString *muxformat = [self.currentProfile firstObject];
             if ([muxformat isEqualToString:@"wav"] || [muxformat isEqualToString:@"mov"] || [muxformat isEqualToString:@"mp4"] || [muxformat isEqualToString:@"mkv"]) {
                 NSAlert *alert = [[NSAlert alloc] init];
-                [alert setAlertStyle:NSInformationalAlertStyle];
+                [alert setAlertStyle:NSAlertStyleInformational];
                 [alert setMessageText:_NS("Invalid container format for HTTP streaming")];
                 [alert setInformativeText:[NSString stringWithFormat:_NS("Media encapsulated as %@ cannot be streamed through the HTTP protocol for technical reasons."),
                                            [[self currentEncapsulationFormatAsFileExtension:YES] uppercaseString]]];
@@ -555,7 +555,7 @@ NSString *VLCConvertAndSaveProfileNamesKey = @"CASProfileNames";
     /* catch obvious errors */
     if ([[_streamAddressField stringValue] length] == 0) {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setAlertStyle:NSInformationalAlertStyle];
+        [alert setAlertStyle:NSAlertStyleInformational];
         [alert setMessageText:_NS("No Address given")];
         [alert setInformativeText:_NS("In order to stream, a valid destination address is required.")];
         [alert beginSheetModalForWindow:_streamPanel
@@ -565,7 +565,7 @@ NSString *VLCConvertAndSaveProfileNamesKey = @"CASProfileNames";
 
     if ([_streamSAPCheckbox state] && [[_streamChannelField stringValue] length] == 0) {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setAlertStyle:NSInformationalAlertStyle];
+        [alert setAlertStyle:NSAlertStyleInformational];
         [alert setMessageText:_NS("No Channel Name given")];
         [alert setInformativeText:_NS("SAP stream announcement is enabled. However, no channel name is provided.")];
         [alert beginSheetModalForWindow:_streamPanel
@@ -575,7 +575,7 @@ NSString *VLCConvertAndSaveProfileNamesKey = @"CASProfileNames";
 
     if ([_streamSDPMatrix isEnabled] && [_streamSDPMatrix selectedCell] != [_streamSDPMatrix cellWithTag:0] && [[_streamSDPField stringValue] length] == 0) {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setAlertStyle:NSInformationalAlertStyle];
+        [alert setAlertStyle:NSAlertStyleInformational];
         [alert setMessageText:_NS("No SDP URL given")];
         [alert setInformativeText:_NS("A SDP export is requested, but no URL is provided.")];
         [alert beginSheetModalForWindow:_streamPanel



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/afbd6849f001eaf32fc0518cfddb29db86dcffb3
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list