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
75e7a5f3
Commit
75e7a5f3
authored
May 23, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused variable variable type
parent
23b4f051
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
51 deletions
+5
-51
include/vlc_variables.h
include/vlc_variables.h
+0
-1
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+1
-5
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+4
-44
src/misc/variables.c
src/misc/variables.c
+0
-1
No files found.
include/vlc_variables.h
View file @
75e7a5f3
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
#define VLC_VAR_BOOL 0x0020
#define VLC_VAR_BOOL 0x0020
#define VLC_VAR_INTEGER 0x0030
#define VLC_VAR_INTEGER 0x0030
#define VLC_VAR_STRING 0x0040
#define VLC_VAR_STRING 0x0040
#define VLC_VAR_VARIABLE 0x0044
#define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_ADDRESS 0x0070
#define VLC_VAR_ADDRESS 0x0070
#define VLC_VAR_COORDS 0x00A0
#define VLC_VAR_COORDS 0x00A0
...
...
modules/gui/macosx/MainMenu.m
View file @
75e7a5f3
...
@@ -1326,7 +1326,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -1326,7 +1326,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
switch
(
i_type
&
VLC_VAR_TYPE
)
{
switch
(
i_type
&
VLC_VAR_TYPE
)
{
case
VLC_VAR_VOID
:
case
VLC_VAR_VOID
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_VARIABLE
:
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
case
VLC_VAR_INTEGER
:
case
VLC_VAR_INTEGER
:
break
;
break
;
...
@@ -1410,9 +1409,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -1410,9 +1409,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
/* Make sure we want to display the variable */
/* Make sure we want to display the variable */
if
(
i_type
&
VLC_VAR_HASCHOICE
)
{
if
(
i_type
&
VLC_VAR_HASCHOICE
)
{
var_Change
(
p_object
,
psz_variable
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
var_Change
(
p_object
,
psz_variable
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
if
(
val
.
i_int
==
0
)
if
(
val
.
i_int
==
0
||
val
.
i_int
==
1
)
return
;
if
((
i_type
&
VLC_VAR_TYPE
)
!=
VLC_VAR_VARIABLE
&&
val
.
i_int
==
1
)
return
;
return
;
}
}
else
else
...
@@ -1421,7 +1418,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -1421,7 +1418,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
switch
(
i_type
&
VLC_VAR_TYPE
)
{
switch
(
i_type
&
VLC_VAR_TYPE
)
{
case
VLC_VAR_VOID
:
case
VLC_VAR_VOID
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_VARIABLE
:
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
case
VLC_VAR_INTEGER
:
case
VLC_VAR_INTEGER
:
break
;
break
;
...
...
modules/gui/qt4/menus.cpp
View file @
75e7a5f3
...
@@ -1224,44 +1224,13 @@ static bool IsMenuEmpty( const char *psz_var,
...
@@ -1224,44 +1224,13 @@ static bool IsMenuEmpty( const char *psz_var,
vlc_object_t
*
p_object
,
vlc_object_t
*
p_object
,
bool
b_root
=
true
)
bool
b_root
=
true
)
{
{
vlc_value_t
val
,
val_list
;
int
i_type
,
i_result
,
i
;
/* Check the type of the object variable */
i_type
=
var_Type
(
p_object
,
psz_var
);
/* Check if we want to display the variable */
/* Check if we want to display the variable */
if
(
!
(
i_type
&
VLC_VAR_HASCHOICE
)
)
return
false
;
if
(
!
(
var_Type
(
p_object
,
psz_var
)
&
VLC_VAR_HASCHOICE
)
)
return
false
;
vlc_value_t
val
;
var_Change
(
p_object
,
psz_var
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
var_Change
(
p_object
,
psz_var
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
if
(
val
.
i_int
==
0
)
return
true
;
return
val
.
i_int
==
0
||
(
val
.
i_int
==
1
&&
b_root
);
if
(
(
i_type
&
VLC_VAR_TYPE
)
!=
VLC_VAR_VARIABLE
)
{
if
(
val
.
i_int
==
1
&&
b_root
)
return
true
;
else
return
false
;
}
/* Check children variables in case of VLC_VAR_VARIABLE */
if
(
var_Change
(
p_object
,
psz_var
,
VLC_VAR_GETCHOICES
,
&
val_list
,
NULL
)
<
0
)
{
return
true
;
}
for
(
i
=
0
,
i_result
=
true
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
if
(
!
IsMenuEmpty
(
val_list
.
p_list
->
p_values
[
i
].
psz_string
,
p_object
,
false
)
)
{
i_result
=
false
;
break
;
}
}
/* clean up everything */
var_FreeList
(
&
val_list
,
NULL
);
return
i_result
;
}
}
#define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var )
#define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var )
...
@@ -1296,7 +1265,6 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
...
@@ -1296,7 +1265,6 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
{
{
case
VLC_VAR_VOID
:
case
VLC_VAR_VOID
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_VARIABLE
:
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
case
VLC_VAR_INTEGER
:
case
VLC_VAR_INTEGER
:
case
VLC_VAR_FLOAT
:
case
VLC_VAR_FLOAT
:
...
@@ -1418,7 +1386,6 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
...
@@ -1418,7 +1386,6 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
{
{
case
VLC_VAR_VOID
:
case
VLC_VAR_VOID
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_BOOL
:
case
VLC_VAR_VARIABLE
:
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
case
VLC_VAR_INTEGER
:
case
VLC_VAR_INTEGER
:
case
VLC_VAR_FLOAT
:
case
VLC_VAR_FLOAT
:
...
@@ -1442,16 +1409,9 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
...
@@ -1442,16 +1409,9 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
{
{
vlc_value_t
another_val
;
vlc_value_t
another_val
;
QString
menutext
;
QString
menutext
;
QMenu
*
subsubmenu
=
new
QMenu
(
submenu
);
switch
(
i_type
&
VLC_VAR_TYPE
)
switch
(
i_type
&
VLC_VAR_TYPE
)
{
{
case
VLC_VAR_VARIABLE
:
CreateChoicesMenu
(
subsubmenu
,
CURVAL
.
psz_string
,
p_object
,
false
);
subsubmenu
->
setTitle
(
qfue
(
CURTEXT
?
CURTEXT
:
CURVAL
.
psz_string
)
);
submenu
->
addMenu
(
subsubmenu
);
break
;
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
var_Get
(
p_object
,
psz_var
,
&
val
);
var_Get
(
p_object
,
psz_var
,
&
val
);
another_val
.
psz_string
=
strdup
(
CURVAL
.
psz_string
);
another_val
.
psz_string
=
strdup
(
CURVAL
.
psz_string
);
...
...
src/misc/variables.c
View file @
75e7a5f3
...
@@ -1477,7 +1477,6 @@ static void DumpVariable(const void *data, const VISIT which, const int depth)
...
@@ -1477,7 +1477,6 @@ static void DumpVariable(const void *data, const VISIT which, const int depth)
case
VLC_VAR_BOOL
:
typename
=
"bool"
;
break
;
case
VLC_VAR_BOOL
:
typename
=
"bool"
;
break
;
case
VLC_VAR_INTEGER
:
typename
=
"integer"
;
break
;
case
VLC_VAR_INTEGER
:
typename
=
"integer"
;
break
;
case
VLC_VAR_STRING
:
typename
=
"string"
;
break
;
case
VLC_VAR_STRING
:
typename
=
"string"
;
break
;
case
VLC_VAR_VARIABLE
:
typename
=
"variable"
;
break
;
case
VLC_VAR_FLOAT
:
typename
=
"float"
;
break
;
case
VLC_VAR_FLOAT
:
typename
=
"float"
;
break
;
case
VLC_VAR_COORDS
:
typename
=
"coordinates"
;
break
;
case
VLC_VAR_COORDS
:
typename
=
"coordinates"
;
break
;
case
VLC_VAR_ADDRESS
:
typename
=
"address"
;
break
;
case
VLC_VAR_ADDRESS
:
typename
=
"address"
;
break
;
...
...
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