Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
d2adc9f3
Commit
d2adc9f3
authored
Dec 14, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement add_module_cat to add a module by category + use this for intf
parent
dc7674b5
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
97 additions
and
11 deletions
+97
-11
include/configuration.h
include/configuration.h
+8
-2
modules/control/http.c
modules/control/http.c
+1
-1
modules/control/rc.c
modules/control/rc.c
+2
-3
modules/control/rtci.c
modules/control/rtci.c
+2
-3
modules/control/telnet.c
modules/control/telnet.c
+2
-0
modules/gui/wxwindows/preferences_widgets.cpp
modules/gui/wxwindows/preferences_widgets.cpp
+66
-0
modules/gui/wxwindows/preferences_widgets.h
modules/gui/wxwindows/preferences_widgets.h
+12
-1
modules/visualization/xosd.c
modules/visualization/xosd.c
+2
-0
src/libvlc.h
src/libvlc.h
+1
-1
src/misc/configuration.c
src/misc/configuration.c
+1
-0
No files found.
include/configuration.h
View file @
d2adc9f3
...
@@ -51,8 +51,9 @@
...
@@ -51,8 +51,9 @@
#define CONFIG_ITEM_FLOAT 0x0060
/* Float option */
#define CONFIG_ITEM_FLOAT 0x0060
/* Float option */
#define CONFIG_ITEM_DIRECTORY 0x0070
/* Directory option */
#define CONFIG_ITEM_DIRECTORY 0x0070
/* Directory option */
#define CONFIG_ITEM_KEY 0x0080
/* Hot key option */
#define CONFIG_ITEM_KEY 0x0080
/* Hot key option */
#define CONFIG_ITEM_MODULE_LIST 0x0090
/* Module option */
#define CONFIG_ITEM_MODULE_CAT 0x0090
/* Module option */
#define CONFIG_ITEM_MODULE_LIST_CAT 0x00A0
/* Module option */
#define CONFIG_ITEM_MODULE_LIST 0x00A0
/* Module option */
#define CONFIG_ITEM_MODULE_LIST_CAT 0x00B0
/* Module option */
#define CONFIG_ITEM 0x00F0
#define CONFIG_ITEM 0x00F0
...
@@ -276,6 +277,11 @@ int config_CreateDir( vlc_object_t *, char * );
...
@@ -276,6 +277,11 @@ int config_CreateDir( vlc_object_t *, char * );
(i_config+11) * sizeof(module_config_t)); \
(i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; }
{ static module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; }
#define add_module_cat( name, i_subcategory, psz_value, p_callback, text, longtext, advc ) \
i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_ITEM_MODULE_CAT, NULL, name, '\0', text, longtext, psz_value, 0, 0.0, i_subcategory }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; }
#define add_module_list( name, psz_caps, psz_value, p_callback, text, longtext, advc ) \
#define add_module_list( name, psz_caps, psz_value, p_callback, text, longtext, advc ) \
i_config++; \
i_config++; \
...
...
modules/control/http.c
View file @
d2adc9f3
...
@@ -92,7 +92,7 @@ static void Close( vlc_object_t * );
...
@@ -92,7 +92,7 @@ static void Close( vlc_object_t * );
vlc_module_begin
();
vlc_module_begin
();
set_description
(
_
(
"HTTP remote control interface"
)
);
set_description
(
_
(
"HTTP remote control interface"
)
);
set_category
(
CAT_INTERFACE
);
set_category
(
CAT_INTERFACE
);
set_subcategory
(
SUBCAT_INTERFACE_
CONTRO
L
);
set_subcategory
(
SUBCAT_INTERFACE_
GENERA
L
);
add_string
(
"http-host"
,
NULL
,
NULL
,
HOST_TEXT
,
HOST_LONGTEXT
,
VLC_TRUE
);
add_string
(
"http-host"
,
NULL
,
NULL
,
HOST_TEXT
,
HOST_LONGTEXT
,
VLC_TRUE
);
add_string
(
"http-src"
,
NULL
,
NULL
,
SRC_TEXT
,
SRC_LONGTEXT
,
VLC_TRUE
);
add_string
(
"http-src"
,
NULL
,
NULL
,
SRC_TEXT
,
SRC_LONGTEXT
,
VLC_TRUE
);
add_string
(
"http-intf-cert"
,
NULL
,
NULL
,
CERT_TEXT
,
CERT_LONGTEXT
,
VLC_TRUE
);
add_string
(
"http-intf-cert"
,
NULL
,
NULL
,
CERT_TEXT
,
CERT_LONGTEXT
,
VLC_TRUE
);
...
...
modules/control/rc.c
View file @
d2adc9f3
...
@@ -139,7 +139,6 @@ void __msg_rc( intf_thread_t *p_intf, const char *psz_fmt, ... )
...
@@ -139,7 +139,6 @@ void __msg_rc( intf_thread_t *p_intf, const char *psz_fmt, ... )
#define EXTEND_TEXT N_("Extended help")
#define EXTEND_TEXT N_("Extended help")
#define EXTEND_LONGTEXT N_("List additional commands.")
#define EXTEND_LONGTEXT N_("List additional commands.")
#ifdef WIN32
#ifdef WIN32
#define QUIET_TEXT N_("Do not open a DOS command box interface")
#define QUIET_TEXT N_("Do not open a DOS command box interface")
#define QUIET_LONGTEXT N_( \
#define QUIET_LONGTEXT N_( \
...
@@ -151,7 +150,7 @@ void __msg_rc( intf_thread_t *p_intf, const char *psz_fmt, ... )
...
@@ -151,7 +150,7 @@ void __msg_rc( intf_thread_t *p_intf, const char *psz_fmt, ... )
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_INTERFACE
);
set_category
(
CAT_INTERFACE
);
set_subcategory
(
SUBCAT_INTERFACE_
CONTRO
L
);
set_subcategory
(
SUBCAT_INTERFACE_
GENERA
L
);
set_description
(
_
(
"Remote control interface"
)
);
set_description
(
_
(
"Remote control interface"
)
);
add_bool
(
"rc-show-pos"
,
0
,
NULL
,
POS_TEXT
,
POS_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"rc-show-pos"
,
0
,
NULL
,
POS_TEXT
,
POS_LONGTEXT
,
VLC_TRUE
);
#ifdef HAVE_ISATTY
#ifdef HAVE_ISATTY
...
...
modules/control/rtci.c
View file @
d2adc9f3
...
@@ -142,7 +142,6 @@ static void __msg_rtci( intf_thread_t *p_intf, const char *psz_fmt, ... )
...
@@ -142,7 +142,6 @@ static void __msg_rtci( intf_thread_t *p_intf, const char *psz_fmt, ... )
#define EXTEND_TEXT N_("Extended help")
#define EXTEND_TEXT N_("Extended help")
#define EXTEND_LONGTEXT N_("List additional commands.")
#define EXTEND_LONGTEXT N_("List additional commands.")
#ifdef WIN32
#ifdef WIN32
#define QUIET_TEXT N_("Do not open a DOS command box interface")
#define QUIET_TEXT N_("Do not open a DOS command box interface")
#define QUIET_LONGTEXT N_( \
#define QUIET_LONGTEXT N_( \
...
@@ -153,7 +152,7 @@ static void __msg_rtci( intf_thread_t *p_intf, const char *psz_fmt, ... )
...
@@ -153,7 +152,7 @@ static void __msg_rtci( intf_thread_t *p_intf, const char *psz_fmt, ... )
vlc_module_begin
();
vlc_module_begin
();
set_description
(
_
(
"Real time control interface"
)
);
set_description
(
_
(
"Real time control interface"
)
);
set_category
(
CAT_INTERFACE
);
set_category
(
CAT_INTERFACE
);
set_subcategory
(
SUBCAT_INTERFACE_
CONTRO
L
);
set_subcategory
(
SUBCAT_INTERFACE_
GENERA
L
);
add_bool
(
"rtci-show-pos"
,
0
,
NULL
,
POS_TEXT
,
POS_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"rtci-show-pos"
,
0
,
NULL
,
POS_TEXT
,
POS_LONGTEXT
,
VLC_TRUE
);
#ifdef HAVE_ISATTY
#ifdef HAVE_ISATTY
add_bool
(
"rtci-fake-tty"
,
0
,
NULL
,
TTY_TEXT
,
TTY_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"rtci-fake-tty"
,
0
,
NULL
,
TTY_TEXT
,
TTY_LONGTEXT
,
VLC_TRUE
);
...
...
modules/control/telnet.c
View file @
d2adc9f3
...
@@ -82,6 +82,8 @@ static void Close( vlc_object_t * );
...
@@ -82,6 +82,8 @@ static void Close( vlc_object_t * );
#define TELNETPWD_LONGTEXT N_( "Default to admin" )
#define TELNETPWD_LONGTEXT N_( "Default to admin" )
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_INTERFACE
);
set_subcategory
(
SUBCAT_INTERFACE_GENERAL
);
add_integer
(
"telnet-port"
,
4212
,
NULL
,
TELNETPORT_TEXT
,
add_integer
(
"telnet-port"
,
4212
,
NULL
,
TELNETPORT_TEXT
,
TELNETPORT_LONGTEXT
,
VLC_TRUE
);
TELNETPORT_LONGTEXT
,
VLC_TRUE
);
add_string
(
"telnet-password"
,
"admin"
,
NULL
,
TELNETPWD_TEXT
,
add_string
(
"telnet-password"
,
"admin"
,
NULL
,
TELNETPWD_TEXT
,
...
...
modules/gui/wxwindows/preferences_widgets.cpp
View file @
d2adc9f3
...
@@ -53,6 +53,9 @@ ConfigControl *CreateConfigControl( vlc_object_t *p_this,
...
@@ -53,6 +53,9 @@ ConfigControl *CreateConfigControl( vlc_object_t *p_this,
case
CONFIG_ITEM_MODULE
:
case
CONFIG_ITEM_MODULE
:
p_control
=
new
ModuleConfigControl
(
p_this
,
p_item
,
parent
);
p_control
=
new
ModuleConfigControl
(
p_this
,
p_item
,
parent
);
break
;
break
;
case
CONFIG_ITEM_MODULE_CAT
:
p_control
=
new
ModuleCatConfigControl
(
p_this
,
p_item
,
parent
);
break
;
case
CONFIG_ITEM_MODULE_LIST_CAT
:
case
CONFIG_ITEM_MODULE_LIST_CAT
:
p_control
=
new
ModuleListCatConfigControl
(
p_this
,
p_item
,
parent
);
p_control
=
new
ModuleListCatConfigControl
(
p_this
,
p_item
,
parent
);
break
;
break
;
...
@@ -290,6 +293,68 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *p_this,
...
@@ -290,6 +293,68 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *p_this,
this
->
SetSizerAndFit
(
sizer
);
this
->
SetSizerAndFit
(
sizer
);
}
}
ModuleCatConfigControl
::~
ModuleCatConfigControl
()
{
;
}
wxString
ModuleCatConfigControl
::
GetPszValue
()
{
return
wxU
(
(
char
*
)
combo
->
GetClientData
(
combo
->
GetSelection
()
));
}
/*****************************************************************************
* ModuleCatConfigControl implementation
*****************************************************************************/
ModuleCatConfigControl
::
ModuleCatConfigControl
(
vlc_object_t
*
p_this
,
module_config_t
*
p_item
,
wxWindow
*
parent
)
:
ConfigControl
(
p_this
,
p_item
,
parent
)
{
vlc_list_t
*
p_list
;
module_t
*
p_parser
;
label
=
new
wxStaticText
(
this
,
-
1
,
wxU
(
p_item
->
psz_text
));
combo
=
new
wxComboBox
(
this
,
-
1
,
wxL2U
(
p_item
->
psz_value
),
wxDefaultPosition
,
wxDefaultSize
,
0
,
NULL
,
wxCB_READONLY
|
wxCB_SORT
);
combo
->
Append
(
wxU
(
_
(
"Default"
)),
(
void
*
)
NULL
);
combo
->
SetSelection
(
0
);
/* build a list of available modules */
p_list
=
vlc_list_find
(
p_this
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
for
(
int
i_index
=
0
;
i_index
<
p_list
->
i_count
;
i_index
++
)
{
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
!
strcmp
(
p_parser
->
psz_object_name
,
"main"
)
)
continue
;
module_config_t
*
p_config
=
p_parser
->
p_config
;
if
(
p_config
)
do
{
/* Hack: required subcategory is stored in i_min */
if
(
p_config
->
i_type
==
CONFIG_SUBCATEGORY
&&
p_config
->
i_value
==
p_item
->
i_min
)
{
combo
->
Append
(
wxU
(
p_parser
->
psz_longname
),
p_parser
->
psz_object_name
);
if
(
p_item
->
psz_value
&&
!
strcmp
(
p_item
->
psz_value
,
p_parser
->
psz_object_name
)
)
combo
->
SetValue
(
wxU
(
p_parser
->
psz_longname
)
);
}
}
while
(
p_config
->
i_type
!=
CONFIG_HINT_END
&&
p_config
++
);
}
vlc_list_release
(
p_list
);
combo
->
SetToolTip
(
wxU
(
p_item
->
psz_longtext
)
);
sizer
->
Add
(
label
,
1
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
sizer
->
Add
(
combo
,
1
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
sizer
->
Layout
();
this
->
SetSizerAndFit
(
sizer
);
}
ModuleConfigControl
::~
ModuleConfigControl
()
ModuleConfigControl
::~
ModuleConfigControl
()
{
{
;
;
...
@@ -300,6 +365,7 @@ wxString ModuleConfigControl::GetPszValue()
...
@@ -300,6 +365,7 @@ wxString ModuleConfigControl::GetPszValue()
return
wxU
(
(
char
*
)
combo
->
GetClientData
(
combo
->
GetSelection
()
));
return
wxU
(
(
char
*
)
combo
->
GetClientData
(
combo
->
GetSelection
()
));
}
}
/*****************************************************************************
/*****************************************************************************
* ModuleListCatonfigControl implementation
* ModuleListCatonfigControl implementation
*****************************************************************************/
*****************************************************************************/
...
...
modules/gui/wxwindows/preferences_widgets.h
View file @
d2adc9f3
...
@@ -89,6 +89,17 @@ struct moduleCheckBox {
...
@@ -89,6 +89,17 @@ struct moduleCheckBox {
char
*
psz_module
;
char
*
psz_module
;
};
};
class
ModuleCatConfigControl
:
public
ConfigControl
{
public:
ModuleCatConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
wxWindow
*
);
~
ModuleCatConfigControl
();
virtual
wxString
GetPszValue
();
private:
wxComboBox
*
combo
;
};
class
ModuleListCatConfigControl
:
public
ConfigControl
class
ModuleListCatConfigControl
:
public
ConfigControl
{
{
public:
public:
...
...
modules/visualization/xosd.c
View file @
d2adc9f3
...
@@ -77,6 +77,8 @@ static int PlaylistNext( vlc_object_t *p_this, const char *psz_variable,
...
@@ -77,6 +77,8 @@ static int PlaylistNext( vlc_object_t *p_this, const char *psz_variable,
#define COLOUR_LONGTEXT ("Colour used to display text in the xosd output")
#define COLOUR_LONGTEXT ("Colour used to display text in the xosd output")
vlc_module_begin
();
vlc_module_begin
();
set_category
(
CAT_INTERFACE
);
set_subcategory
(
SUBCAT_INTERFACE_CONTROL
);
set_description
(
_
(
"XOSD interface"
)
);
set_description
(
_
(
"XOSD interface"
)
);
add_bool
(
"xosd-position"
,
1
,
NULL
,
POSITION_TEXT
,
POSITION_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"xosd-position"
,
1
,
NULL
,
POSITION_TEXT
,
POSITION_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"xosd-text-offset"
,
30
,
NULL
,
TXT_OFS_TEXT
,
TXT_OFS_LONGTEXT
,
VLC_TRUE
);
add_integer
(
"xosd-text-offset"
,
30
,
NULL
,
TXT_OFS_TEXT
,
TXT_OFS_LONGTEXT
,
VLC_TRUE
);
...
...
src/libvlc.h
View file @
d2adc9f3
...
@@ -1126,7 +1126,7 @@ vlc_module_begin();
...
@@ -1126,7 +1126,7 @@ vlc_module_begin();
set_subcategory
(
SUBCAT_INTERFACE_GENERAL
);
set_subcategory
(
SUBCAT_INTERFACE_GENERAL
);
set_section
(
N_
(
"Interface module"
),
NULL
);
set_section
(
N_
(
"Interface module"
),
NULL
);
add_module
(
"intf"
,
"interface"
,
NULL
,
NULL
,
INTF_TEXT
,
add_module
_cat
(
"intf"
,
SUBCAT_INTERFACE_GENERAL
,
NULL
,
NULL
,
INTF_TEXT
,
INTF_LONGTEXT
,
VLC_FALSE
);
INTF_LONGTEXT
,
VLC_FALSE
);
change_short
(
'I'
);
change_short
(
'I'
);
...
...
src/misc/configuration.c
View file @
d2adc9f3
...
@@ -205,6 +205,7 @@ char * __config_GetPsz( vlc_object_t *p_this, const char *psz_name )
...
@@ -205,6 +205,7 @@ char * __config_GetPsz( vlc_object_t *p_this, const char *psz_name )
(
p_config
->
i_type
!=
CONFIG_ITEM_DIRECTORY
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_DIRECTORY
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE_LIST
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE_LIST
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE_LIST_CAT
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE_LIST_CAT
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE_CAT
)
&&
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE
)
)
(
p_config
->
i_type
!=
CONFIG_ITEM_MODULE
)
)
{
{
msg_Err
(
p_this
,
"option %s does not refer to a string"
,
psz_name
);
msg_Err
(
p_this
,
"option %s does not refer to a string"
,
psz_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment