[vlc-devel] commit: Set intf-add before loading the interface module ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat May 23 20:18:17 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 23 20:28:09 2009 +0300| [156dd2adfd686140ee7cafc272a5cc2d5c644150] | committer: Rémi Denis-Courmont
Set intf-add before loading the interface module
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=156dd2adfd686140ee7cafc272a5cc2d5c644150
---
src/interface/interface.c | 52 +++++++++++++++++++++-----------------------
1 files changed, 25 insertions(+), 27 deletions(-)
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 105783c..766c521 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -89,6 +89,31 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
if( !p_intf )
return VLC_ENOMEM;
+ /* Variable used for interface spawning */
+ vlc_value_t val, text;
+ var_Create( p_intf, "intf-add", VLC_VAR_STRING |
+ VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND );
+ text.psz_string = _("Add Interface");
+ var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL );
+
+ val.psz_string = (char *)"rc";
+ text.psz_string = (char *)_("Console");
+ var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
+ val.psz_string = (char *)"telnet";
+ text.psz_string = (char *)_("Telnet Interface");
+ var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
+ val.psz_string = (char *)"http";
+ text.psz_string = (char *)_("Web Interface");
+ var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
+ val.psz_string = (char *)"logger";
+ text.psz_string = (char *)_("Debug logging");
+ var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
+ val.psz_string = (char *)"gestures";
+ text.psz_string = (char *)_("Mouse Gestures");
+ var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
+
+ var_AddCallback( p_intf, "intf-add", AddIntfCallback, NULL );
+
/* Attach interface to its parent object */
vlc_object_attach( p_intf, p_this );
vlc_object_set_destructor( p_intf, intf_Destroy );
@@ -178,33 +203,6 @@ void intf_StopThread( intf_thread_t *p_intf )
static void* RunInterface( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
- vlc_value_t val, text;
- int canc = vlc_savecancel ();
-
- /* Variable used for interface spawning */
- var_Create( p_intf, "intf-add", VLC_VAR_STRING |
- VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND );
- text.psz_string = _("Add Interface");
- var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL );
-
- val.psz_string = (char *)"rc";
- text.psz_string = (char *)_("Console");
- var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = (char *)"telnet";
- text.psz_string = (char *)_("Telnet Interface");
- var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = (char *)"http";
- text.psz_string = (char *)_("Web Interface");
- var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = (char *)"logger";
- text.psz_string = (char *)_("Debug logging");
- var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = (char *)"gestures";
- text.psz_string = (char *)_("Mouse Gestures");
- var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
-
- var_AddCallback( p_intf, "intf-add", AddIntfCallback, NULL );
- vlc_restorecancel (canc);
/* Give control to the interface */
if( p_intf->pf_run )
More information about the vlc-devel
mailing list