Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
76d6f98e
Commit
76d6f98e
authored
Jan 04, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: fix fullscreen and video-on-top toggle across input or video reset
parent
2fcde01a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+23
-11
No files found.
modules/gui/qt4/menus.cpp
View file @
76d6f98e
...
...
@@ -218,6 +218,7 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
#define PUSH_VAR(var) PUSH_OBJVAR(p_object, var)
#define PUSH_INPUTVAR(var) PUSH_OBJVAR(p_input, var)
#define PUSH_PLVAR(var) PUSH_OBJVAR(pl, var)
static
int
InputAutoMenuBuilder
(
input_thread_t
*
p_input
,
QVector
<
vlc_object_t
*>
&
objects
,
QVector
<
const
char
*>
&
varnames
)
...
...
@@ -230,14 +231,14 @@ static int InputAutoMenuBuilder( input_thread_t *p_input,
return
VLC_SUCCESS
;
}
static
int
VideoAutoMenuBuilder
(
input_thread_t
*
p_input
,
static
int
VideoAutoMenuBuilder
(
playlist_t
*
pl
,
input_thread_t
*
p_input
,
QVector
<
vlc_object_t
*>
&
objects
,
QVector
<
const
char
*>
&
varnames
)
{
vout_thread_t
*
p_object
=
p_input
?
input_GetVout
(
p_input
)
:
NULL
;
PUSH_INPUTVAR
(
"video-es"
);
PUSH_VAR
(
"fullscreen"
);
PUSH_VAR
(
"video-on-top"
);
PUSH_
PL
VAR
(
"fullscreen"
);
PUSH_
PL
VAR
(
"video-on-top"
);
PUSH_VAR
(
"video-wallpaper"
);
PUSH_VAR
(
"video-snapshot"
);
PUSH_VAR
(
"zoom"
);
...
...
@@ -691,7 +692,7 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current )
p_input
=
THEMIM
->
getInput
();
VideoAutoMenuBuilder
(
p_input
,
objects
,
varnames
);
VideoAutoMenuBuilder
(
THEPL
,
p_input
,
objects
,
varnames
);
return
Populate
(
p_intf
,
current
,
varnames
,
objects
);
}
...
...
@@ -941,7 +942,7 @@ void VLCMenuBar::VideoPopupMenu( intf_thread_t *p_intf, bool show )
{
POPUP_BOILERPLATE
if
(
p_input
)
VideoAutoMenuBuilder
(
p_input
,
objects
,
varnames
);
VideoAutoMenuBuilder
(
THEPL
,
p_input
,
objects
,
varnames
);
CREATE_POPUP
}
...
...
@@ -1010,7 +1011,7 @@ void VLCMenuBar::PopupMenu( intf_thread_t *p_intf, bool show )
val
.
b_bool
=
false
;
CreateAndConnect
(
menu
,
"fullscreen"
,
qtr
(
"Leave Fullscreen"
),
""
,
ITEM_NORMAL
,
VLC_OBJECT
(
p_vout
),
val
,
VLC_VAR_BOOL
,
b_isFullscreen
);
VLC_OBJECT
(
THEPL
),
val
,
VLC_VAR_BOOL
,
b_isFullscreen
);
}
vlc_object_release
(
p_vout
);
...
...
@@ -1524,15 +1525,26 @@ void VLCMenuBar::DoAction( QObject *data )
const
char
*
var
=
itemData
->
psz_var
;
vlc_value_t
val
=
itemData
->
val
;
/* Preserve settings across vouts via the playlist object: */
if
(
!
strcmp
(
var
,
"fullscreen"
)
||
!
strcmp
(
var
,
"video-on-top"
)
)
var_Set
(
pl_Get
(
p_object
),
var
,
val
);
if
((
var_Type
(
p_object
,
var
)
&
VLC_VAR_CLASS
)
==
VLC_VAR_VOID
)
var_TriggerCallback
(
p_object
,
var
);
else
var_Set
(
p_object
,
var
,
val
);
if
(
!
strcmp
(
var
,
"fullscreen"
)
||
!
strcmp
(
var
,
"video-on-top"
)
)
/* FIXME: reverse abstraction */
{
/* Apply playlist variables to current existing vout too */
input_thread_t
*
input
=
playlist_CurrentInput
((
playlist_t
*
)
p_object
);
if
(
input
!=
NULL
)
{
vout_thread_t
*
vout
=
input_GetVout
(
input
);
vlc_object_release
(
input
);
if
(
vout
!=
NULL
)
{
var_Set
(
vout
,
var
,
val
);
/* never void class */
vlc_object_release
(
vout
);
}
}
}
}
void
VLCMenuBar
::
updateAudioDevice
(
intf_thread_t
*
p_intf
,
audio_output_t
*
p_aout
,
QMenu
*
current
)
...
...
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