[vlc-commits] [Git][videolan/vlc][3.0.x] macosx: respect hidden cat/subcat "hack"

Jean-Baptiste Kempf gitlab at videolan.org
Wed Jun 16 04:27:46 UTC 2021



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
faa4e1b4 by Lyndon Brown at 2021-06-16T03:03:49+00:00
macosx: respect hidden cat/subcat "hack"

Certain sets of options in the core option set use a cat/subcat of -1 as
a "hack" to avoid those options showing up in the GUI prefs set. This is
the case for options like --help for instance. While the Qt GUI plugin
respects this, the MacOSX one was missing checks for this, and so surely
(I don't have a mac so I can't look and see) it was including them when
it shouldn't.

(cherry picked from commit 05e2f75ad01decaf1c83c7f45e6cabbf3833d5b1)

- - - - -


1 changed file:

- modules/gui/macosx/prefs.m


Changes:

=====================================
modules/gui/macosx/prefs.m
=====================================
@@ -508,6 +508,10 @@
         for (unsigned int j = 0; j < confsize; j++) {
             int configType = p_configs[j].i_type;
             if (configType == CONFIG_CATEGORY) {
+                if( p_configs[j].value.i == -1 ) {
+                    categoryItem = nil;
+                    continue;
+                }
                 categoryItem = [self itemRepresentingCategory:p_configs[j].value.i];
                 if (!categoryItem) {
                     categoryItem = [VLCTreeCategoryItem categoryTreeItemWithCategory:p_configs[j].value.i];
@@ -517,6 +521,10 @@
             }
             else if (configType == CONFIG_SUBCATEGORY) {
                 lastsubcat = p_configs[j].value.i;
+                if( lastsubcat == -1 ) {
+                    subCategoryItem = nil;
+                    continue;
+                }
                 if (categoryItem && ![self isSubCategoryGeneral:lastsubcat]) {
                     subCategoryItem = [categoryItem itemRepresentingSubCategory:lastsubcat];
                     if (!subCategoryItem) {



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

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




More information about the vlc-commits mailing list