[vlc-commits] macosx: respect hidden cat/subcat "hack"
Lyndon Brown
git at videolan.org
Fri Oct 2 07:18:25 CEST 2020
vlc | branch: master | Lyndon Brown <jnqnfe at gmail.com> | Sun Apr 28 06:45:27 2019 +0100| [05e2f75ad01decaf1c83c7f45e6cabbf3833d5b1] | committer: Felix Paul Kühne
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.
Signed-off-by: Felix Paul Kühne <felix at feepk.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05e2f75ad01decaf1c83c7f45e6cabbf3833d5b1
---
modules/gui/macosx/preferences/prefs.m | 8 ++++++++
1 file changed, 8 insertions(+)
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-commits
mailing list