[vlc-commits] macosx: disable subtitles styles menu creation until this is properly supported
Felix Paul Kühne
git at videolan.org
Fri Jul 15 16:31:06 CEST 2016
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jul 15 16:30:50 2016 +0200| [fd3bc0eaac2e050292b959ec39cf3a4fec00ac7f] | committer: Felix Paul Kühne
macosx: disable subtitles styles menu creation until this is properly supported
This also replaces an assert with a more meaningful error message
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd3bc0eaac2e050292b959ec39cf3a4fec00ac7f
---
modules/gui/macosx/MainMenu.m | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 02aa3b1..f8e593c 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -258,11 +258,14 @@
[self refreshAudioDeviceList];
/* setup subtitles menu */
+#warning subtitles styles menu disabled due to missing adaptation to VLC 3.0
+#if 0
[self setupMenu: _subtitle_sizeMenu withIntList:"freetype-rel-fontsize" andSelector:@selector(switchSubtitleOption:)];
[self setupMenu: _subtitle_textcolorMenu withIntList:"freetype-color" andSelector:@selector(switchSubtitleOption:)];
[_subtitle_bgopacity_sld setIntValue: config_GetInt(VLC_OBJECT(p_intf), "freetype-background-opacity")];
[self setupMenu: _subtitle_bgcolorMenu withIntList:"freetype-background-color" andSelector:@selector(switchSubtitleOption:)];
[self setupMenu: _subtitle_outlinethicknessMenu withIntList:"freetype-outline-thickness" andSelector:@selector(switchSubtitleOption:)];
+#endif
}
- (void)setupMenu: (NSMenu*)menu withIntList: (char *)psz_name andSelector:(SEL)selector
@@ -272,8 +275,10 @@
[menu removeAllItems];
p_item = config_FindConfig(VLC_OBJECT(getIntf()), psz_name);
- /* serious problem, if no item found */
- assert(p_item);
+ if (!p_item) {
+ msg_Err(getIntf(), "couldn't create menu int list for item '%s' as it does not exist", psz_name);
+ return;
+ }
for (int i = 0; i < p_item->list_count; i++) {
NSMenuItem *mi;
More information about the vlc-commits
mailing list