Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
456
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
4cd2fe1b
Commit
4cd2fe1b
authored
18 years ago
by
zorglub
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug with menu items selection
parent
ef366726
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/qt4/menus.cpp
+7
-8
7 additions, 8 deletions
modules/gui/qt4/menus.cpp
with
7 additions
and
8 deletions
modules/gui/qt4/menus.cpp
+
7
−
8
View file @
4cd2fe1b
...
...
@@ -554,7 +554,7 @@ static bool IsMenuEmpty( const char *psz_var, vlc_object_t *p_object,
if
(
(
i_type
&
VLC_VAR_TYPE
)
!=
VLC_VAR_VARIABLE
)
{
/* Very evil hack ! intf-switch can have only one value */
/* Very evil hack ! intf-switch can have only one value */
if
(
!
strcmp
(
psz_var
,
"intf-switch"
)
)
return
FALSE
;
if
(
val
.
i_int
==
1
&&
b_root
)
return
TRUE
;
else
return
FALSE
;
...
...
@@ -640,7 +640,6 @@ void QVLCMenu::CreateItem( QMenu *menu, const char *psz_var,
case
VLC_VAR_BOOL
:
var_Get
(
p_object
,
psz_var
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
CreateAndConnect
(
menu
,
psz_var
,
TEXT_OR_VAR
,
""
,
ITEM_CHECK
,
p_object
->
i_object_id
,
val
,
i_type
,
val
.
b_bool
);
break
;
...
...
@@ -649,7 +648,7 @@ void QVLCMenu::CreateItem( QMenu *menu, const char *psz_var,
}
int
QVLCMenu
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
int
QVLCMenu
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_root
)
{
vlc_value_t
val
,
val_list
,
text_list
;
...
...
@@ -702,7 +701,6 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
case
VLC_VAR_STRING
:
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
,
""
,
NORMAL_OR_RADIO
,
p_object
->
i_object_id
,
another_val
,
i_type
,
...
...
@@ -734,6 +732,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
break
;
}
}
currentGroup
=
NULL
;
/* clean up everything */
var_Change
(
p_object
,
psz_var
,
VLC_VAR_FREELIST
,
&
val_list
,
&
text_list
);
...
...
@@ -758,7 +757,6 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
if
(
i_item_type
==
ITEM_CHECK
)
{
action
->
setCheckable
(
true
);
currentGroup
=
NULL
;
}
else
if
(
i_item_type
==
ITEM_RADIO
)
{
...
...
@@ -767,10 +765,11 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
currentGroup
=
new
QActionGroup
(
menu
);
currentGroup
->
addAction
(
action
);
}
else
currentGroup
=
NULL
;
if
(
checked
)
action
->
setChecked
(
true
);
if
(
checked
)
{
action
->
setChecked
(
true
);
}
MenuItemData
*
itemData
=
new
MenuItemData
(
i_object_id
,
i_val_type
,
val
,
psz_var
);
connect
(
action
,
SIGNAL
(
triggered
()),
THEDP
->
menusMapper
,
SLOT
(
map
())
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment