[vlc-devel] [PATCH 5/5] macosx: respect hidden cat/subcat "hack"
Lyndon Brown
jnqnfe at gmail.com
Thu Sep 24 01:11:43 CEST 2020
From: Lyndon Brown <jnqnfe at gmail.com>
Date: Sun, 28 Apr 2019 06:45:27 +0100
Subject: 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.
diff --git a/modules/gui/macosx/preferences/prefs.m b/modules/gui/macosx/preferences/prefs.m
index 60d7aef2a9..7b9b2200cf 100644
--- a/modules/gui/macosx/preferences/prefs.m
+++ b/modules/gui/macosx/preferences/prefs.m
@@ -510,6 +510,10 @@
int configType = p_configs[j].i_type;
if (configType == CONFIG_CATEGORY) {
+ if( p_configs[j].value.i == -1 ) {
+ categoryItem = nil;
+ continue;
+ }
categoryItem = [self itemRepresentingCategory:(int)p_configs[j].value.i];
if (!categoryItem) {
categoryItem = [VLCTreeCategoryItem categoryTreeItemWithCategory:(int)p_configs[j].value.i];
@@ -521,6 +525,10 @@
if (configType == CONFIG_SUBCATEGORY) {
lastsubcat = (int)p_configs[j].value.i;
+ if( lastsubcat == -1 ) {
+ subCategoryItem = nil;
+ continue;
+ }
if (categoryItem && ![self isSubCategoryGeneral:lastsubcat]) {
subCategoryItem = [categoryItem itemRepresentingSubCategory:lastsubcat];
if (!subCategoryItem) {
More information about the vlc-devel
mailing list