Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d858c445
Commit
d858c445
authored
Feb 12, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: don't make 1 way only vars/commands radio items
parent
8731aa87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+5
-3
No files found.
modules/gui/qt4/menus.cpp
View file @
d858c445
...
...
@@ -1379,6 +1379,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
#define CURVAL val_list.p_list->p_values[i]
#define CURTEXT text_list.p_list->p_values[i].psz_string
#define RADIO_OR_COMMAND ( i_type & VLC_VAR_ISCOMMAND ) ? ITEM_NORMAL : ITEM_RADIO
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
...
...
@@ -1398,7 +1399,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
var_Get
(
p_object
,
psz_var
,
&
val
);
another_val
.
psz_string
=
strdup
(
CURVAL
.
psz_string
);
menutext
=
qfu
(
CURTEXT
?
CURTEXT
:
another_val
.
psz_string
);
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
ITEM_RADIO
,
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
RADIO_OR_COMMAND
,
p_object
,
another_val
,
i_type
,
val
.
psz_string
&&
!
strcmp
(
val
.
psz_string
,
CURVAL
.
psz_string
)
);
...
...
@@ -1409,7 +1410,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
var_Get
(
p_object
,
psz_var
,
&
val
);
if
(
CURTEXT
)
menutext
=
qfu
(
CURTEXT
);
else
menutext
.
sprintf
(
"%"
PRId64
,
CURVAL
.
i_int
);
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
ITEM_RADIO
,
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
RADIO_OR_COMMAND
,
p_object
,
CURVAL
,
i_type
,
(
CURVAL
.
i_int
==
val
.
i_int
)
&&
CheckTitle
(
p_object
,
psz_var
)
);
...
...
@@ -1419,7 +1420,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
var_Get
(
p_object
,
psz_var
,
&
val
);
if
(
CURTEXT
)
menutext
=
qfu
(
CURTEXT
);
else
menutext
.
sprintf
(
"%.2f"
,
CURVAL
.
f_float
);
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
ITEM_RADIO
,
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
RADIO_OR_COMMAND
,
p_object
,
CURVAL
,
i_type
,
CURVAL
.
f_float
==
val
.
f_float
);
break
;
...
...
@@ -1433,6 +1434,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
/* clean up everything */
var_FreeList
(
&
val_list
,
&
text_list
);
#undef RADIO_OR_COMMAND
#undef CURVAL
#undef CURTEXT
return
submenu
->
isEmpty
()
?
VLC_EGENERIC
:
VLC_SUCCESS
;
...
...
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