[vlc-commits] macosx: show lua intfs in advanced preferences

David Fuhrmann git at videolan.org
Sun Dec 30 16:09:34 CET 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Dec 30 16:02:53 2012 +0100| [3b4128149119c6b0f9575a6ec16f7d585ac7a388] | committer: David Fuhrmann

macosx: show lua intfs in advanced preferences

hack adapted from the qt interface.

close #7876

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b4128149119c6b0f9575a6ec16f7d585ac7a388
---

 modules/gui/macosx/prefs_widgets.m |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 5c9e3e2..10ea032 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -2048,6 +2048,28 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];     \
                                           arrayWithObjects: o_modulename, o_modulelongname,
                                           o_moduleenabled, nil]];
             }
+
+            /* Parental Advisory HACK:
+             * Selecting HTTP, RC and Telnet interfaces is difficult now
+             * since they are just the lua interface module */
+            if (p_config->i_type == CONFIG_SUBCATEGORY &&
+               !strcmp(module_get_object(p_parser), "lua") &&
+               !strcmp(_p_item->psz_name, "extraintf") &&
+               p_config->value.i == _p_item->min.i) {
+
+#define addLuaIntf(shortname, longname) \
+                if (_p_item->value.psz && strstr(_p_item->value.psz, shortname))\
+                    o_moduleenabled = [NSNumber numberWithBool:YES];\
+                else\
+                    o_moduleenabled = [NSNumber numberWithBool:NO];\
+                [o_modulearray addObject:[NSMutableArray arrayWithObjects: @shortname, _NS(longname), o_moduleenabled, nil]]
+
+                addLuaIntf("http", "Web");
+                addLuaIntf("telnet", "Telnet");
+                addLuaIntf("cli", "Console");
+
+#undef addLuaIntf
+            }
         }
         module_config_free(p_configlist);
     }



More information about the vlc-commits mailing list