[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Implement preference for autoloading extensions

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 27 07:00:18 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a6669dc7 by Claudio Cambra at 2025-11-27T06:33:23+00:00
macosx: Implement preference for autoloading extensions

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
1f18f88a by Claudio Cambra at 2025-11-27T06:33:23+00:00
macosx: Autoload extensions on init of VLCExtensionsManager if the preference is set

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
fd3b0b3e by Claudio Cambra at 2025-11-27T06:33:23+00:00
macosx: Remove extension loading from VLCMainMenu

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


3 changed files:

- modules/gui/macosx/main/macosx.m
- modules/gui/macosx/menus/VLCMainMenu.m
- modules/gui/macosx/windows/extensions/VLCExtensionsManager.m


Changes:

=====================================
modules/gui/macosx/main/macosx.m
=====================================
@@ -107,6 +107,9 @@ int  WindowOpen   (vlc_window_t *);
 #define ITUNES_TEXT N_("Control external music players")
 #define ITUNES_LONGTEXT N_("VLC will pause and resume supported music players on playback.")
 
+#define AUTOLOAD_EXTENSIONS_TEXT N_("Automatically load extensions on startup")
+#define AUTOLOAD_EXTENSIONS_LONGTEXT N_("Automatically load and enable VLC extensions when the application starts.")
+
 static const int itunes_list[] =
     { 0, 1, 2 };
 static const char *const itunes_list_text[] = {
@@ -146,6 +149,7 @@ vlc_module_begin()
         add_bool("macosx-pause-minimized", false, PAUSE_MINIMIZED_TEXT, PAUSE_MINIMIZED_LONGTEXT)
         add_bool("macosx-lock-aspect-ratio", true, LOCK_ASPECT_RATIO_TEXT, NULL)
         add_bool("macosx-dim-keyboard", false, DIM_KEYBOARD_PLAYBACK_TEXT, DIM_KEYBOARD_PLAYBACK_LONGTEXT)
+        add_bool("macosx-autoload-extensions", true, AUTOLOAD_EXTENSIONS_TEXT, AUTOLOAD_EXTENSIONS_LONGTEXT)
         add_integer("macosx-control-itunes", 1, ITUNES_TEXT, ITUNES_LONGTEXT)
         change_integer_list(itunes_list, itunes_list_text)
         add_integer("macosx-continue-playback", 0, CONTINUE_PLAYBACK_TEXT, CONTINUE_PLAYBACK_LONGTEXT)


=====================================
modules/gui/macosx/menus/VLCMainMenu.m
=====================================
@@ -244,11 +244,6 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
     [extMgr buildMenu:_extensionsMenu];
     [_extensions setEnabled:([_extensionsMenu numberOfItems] > 0)];
 
-    // FIXME: Implement preference for autoloading extensions on mac
-    // FIXME: this is definitely the wrong place to do this.
-    if (![extMgr isLoaded] && ![extMgr cannotLoad])
-        [extMgr loadExtensions];
-
     /* setup post-proc menu */
     [_postprocessingMenu removeAllItems];
     [_postprocessingMenu setAutoenablesItems: YES];


=====================================
modules/gui/macosx/windows/extensions/VLCExtensionsManager.m
=====================================
@@ -58,6 +58,11 @@
 
         _isUnloading = false;
         b_failed = false;
+
+        // Load extensions if autoload preference is enabled
+        if (var_InheritBool(getIntf(), "macosx-autoload-extensions")) {
+            [self loadExtensions];
+        }
     }
 
     return self;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ba4c434b280a8949a770e5b886c74365d6ae7e10...fd3b0b3ec5e7c4472c7894ea64a9cdfa0676bab6

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


VideoLAN code repository instance


More information about the vlc-commits mailing list