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
5fc62fec
Commit
5fc62fec
authored
Jun 17, 2008
by
Jean-Philippe Andre
Committed by
Jean-Baptiste Kempf
Jun 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt menus: Add a fullscreen switch button (popup)
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
17365ad0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+30
-4
No files found.
modules/gui/qt4/menus.cpp
View file @
5fc62fec
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
*
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Jean-Philippe André <jpeg@videolan.org>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -482,7 +483,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
...
@@ -482,7 +483,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
SLOT
(
loadSubtitlesFile
()
)
);
SLOT
(
loadSubtitlesFile
()
)
);
action
->
setData
(
"_static_"
);
action
->
setData
(
"_static_"
);
ACT_ADD
(
current
,
"fullscreen"
,
qtr
(
"&Fullscreen"
)
);
ACT_ADD
(
current
,
"fullscreen"
,
qtr
(
"
Toggle
&Fullscreen"
)
);
ACT_ADD
(
current
,
"zoom"
,
qtr
(
"&Zoom"
)
);
ACT_ADD
(
current
,
"zoom"
,
qtr
(
"&Zoom"
)
);
ACT_ADD
(
current
,
"deinterlace"
,
qtr
(
"&Deinterlace"
)
);
ACT_ADD
(
current
,
"deinterlace"
,
qtr
(
"&Deinterlace"
)
);
ACT_ADD
(
current
,
"aspect-ratio"
,
qtr
(
"&Aspect Ratio"
)
);
ACT_ADD
(
current
,
"aspect-ratio"
,
qtr
(
"&Aspect Ratio"
)
);
...
@@ -750,6 +751,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
...
@@ -750,6 +751,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
/* Main Menu that sticks everything together */
/* Main Menu that sticks everything together */
void
QVLCMenu
::
PopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
void
QVLCMenu
::
PopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
{
{
MainInterface
*
mi
=
p_intf
->
p_sys
->
p_mi
;
if
(
show
)
if
(
show
)
{
{
/* Delete and recreate a popup if there is one */
/* Delete and recreate a popup if there is one */
...
@@ -764,15 +766,31 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -764,15 +766,31 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
PopupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
PopupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
menu
->
addSeparator
();
menu
->
addSeparator
();
bool
b_fullscreen
;
if
(
p_input
)
if
(
p_input
)
{
{
vlc_object_yield
(
p_input
);
vlc_object_yield
(
p_input
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
/* Audio menu */
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
/* Add a fullscreen switch button */
if
(
p_vout
)
{
vlc_value_t
val
;
var_Get
(
p_vout
,
"fullscreen"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
CreateAndConnect
(
menu
,
"fullscreen"
,
qtr
(
"Toggle fullscreen"
),
""
,
ITEM_CHECK
,
p_vout
->
i_object_id
,
val
,
VLC_VAR_BOOL
,
!
val
.
b_bool
);
b_fullscreen
=
!
val
.
b_bool
;
}
/* Audio menu */
AudioAutoMenuBuilder
(
p_aout
,
p_input
,
objects
,
varnames
);
AudioAutoMenuBuilder
(
p_aout
,
p_input
,
objects
,
varnames
);
if
(
p_aout
)
if
(
p_aout
)
vlc_object_release
(
p_aout
);
vlc_object_release
(
p_aout
);
...
@@ -784,8 +802,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -784,8 +802,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
action
->
setEnabled
(
false
);
action
->
setEnabled
(
false
);
/* Video menu */
/* Video menu */
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
VideoAutoMenuBuilder
(
p_vout
,
p_input
,
objects
,
varnames
);
VideoAutoMenuBuilder
(
p_vout
,
p_input
,
objects
,
varnames
);
if
(
p_vout
)
if
(
p_vout
)
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
...
@@ -800,6 +816,16 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -800,6 +816,16 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
}
}
menu
->
addSeparator
();
menu
->
addSeparator
();
/* Add some special entries for windowed mode */
if
(
!
b_fullscreen
)
{
submenu
=
new
QMenu
(
qtr
(
"Interface"
),
menu
);
submenu
->
addAction
(
QIcon
(
":/pixmaps/playlist_16px.png"
),
qtr
(
"Show Playlist"
),
mi
,
SLOT
(
togglePlaylist
()
)
);
menu
->
addMenu
(
submenu
);
}
PopupMenuStaticEntries
(
p_intf
,
menu
);
PopupMenuStaticEntries
(
p_intf
,
menu
);
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
...
...
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