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
3b4ca0c1
Commit
3b4ca0c1
authored
Jun 17, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix popup menu play and interface entries.
parent
03525e49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
11 deletions
+35
-11
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+30
-8
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+5
-3
No files found.
modules/gui/qt4/menus.cpp
View file @
3b4ca0c1
...
...
@@ -463,7 +463,7 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
**/
QMenu
*
QVLCMenu
::
VideoMenu
(
intf_thread_t
*
p_intf
,
QMenu
*
current
)
{
vlc_object_t
*
p_
objec
t
;
vlc_object_t
*
p_
vou
t
;
input_thread_t
*
p_input
;
vector
<
int
>
objects
;
vector
<
const
char
*>
varnames
;
...
...
@@ -496,13 +496,13 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
p_input
=
THEMIM
->
getInput
();
if
(
p_input
)
vlc_object_yield
(
p_input
);
p_
objec
t
=
(
vlc_object_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_VOUT
,
p_
vou
t
=
(
vlc_object_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
VideoAutoMenuBuilder
(
p_
objec
t
,
p_input
,
objects
,
varnames
);
VideoAutoMenuBuilder
(
p_
vou
t
,
p_input
,
objects
,
varnames
);
if
(
p_
objec
t
)
vlc_object_release
(
p_
objec
t
);
if
(
p_
vou
t
)
vlc_object_release
(
p_
vou
t
);
if
(
p_input
)
vlc_object_release
(
p_input
);
...
...
@@ -639,6 +639,9 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
else
if
(
THEPL
->
items
.
i_size
)
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Play"
),
""
,
":/pixmaps/play_16px.png"
,
SLOT
(
togglePlayPause
()
)
);
else
addDPStaticEntry
(
menu
,
qtr
(
"Play"
),
""
,
":/pixmaps/play_16px.png"
,
SLOT
(
openDialog
()
)
);
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Stop"
),
""
,
":/pixmaps/stop_16px.png"
,
SLOT
(
stop
()
)
);
...
...
@@ -759,15 +762,34 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
QMenu
*
menu
=
new
QMenu
();
QMenu
*
submenu
;
QAction
*
action
;
bool
b_isFullscreen
=
false
;
POPUP_BOILERPLATE
;
PopupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
menu
->
addSeparator
();
bool
b_fullscreen
;
if
(
p_input
)
{
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
);
b_isFullscreen
=
!
(
!
val
.
b_bool
);
if
(
b_isFullscreen
)
CreateAndConnect
(
menu
,
"fullscreen"
,
qtr
(
"Leave Fullscreen"
),
""
,
ITEM_NORMAL
,
p_vout
->
i_object_id
,
val
,
VLC_VAR_BOOL
,
b_isFullscreen
);
}
vlc_object_release
(
p_vout
);
menu
->
addSeparator
();
vlc_object_yield
(
p_input
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
vlc_object_release
(
p_input
);
...
...
@@ -793,8 +815,8 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
menu
->
addSeparator
();
/* Add some special entries for windowed mode */
if
(
!
b_
f
ullscreen
)
/* Add some special entries for windowed mode
: Interface Menu
*/
if
(
!
b_
isF
ullscreen
)
{
submenu
=
new
QMenu
(
qtr
(
"Interface"
),
menu
);
submenu
->
addAction
(
QIcon
(
":/pixmaps/playlist_16px.png"
),
...
...
modules/gui/qt4/menus.hpp
View file @
3b4ca0c1
...
...
@@ -78,7 +78,8 @@ public:
static
QMenu
*
FileMenu
();
static
QMenu
*
SDMenu
(
intf_thread_t
*
);
static
QMenu
*
PlaylistMenu
(
intf_thread_t
*
,
MainInterface
*
);
static
QMenu
*
ToolsMenu
(
intf_thread_t
*
,
QMenu
*
,
MainInterface
*
,
bool
,
bool
with
=
true
);
static
QMenu
*
ToolsMenu
(
intf_thread_t
*
,
QMenu
*
,
MainInterface
*
,
bool
,
bool
with
=
true
);
static
QMenu
*
NavigMenu
(
intf_thread_t
*
,
QMenu
*
);
static
QMenu
*
VideoMenu
(
intf_thread_t
*
,
QMenu
*
);
static
QMenu
*
AudioMenu
(
intf_thread_t
*
,
QMenu
*
);
...
...
@@ -114,7 +115,7 @@ private:
class
MenuFunc
:
public
QObject
{
Q_OBJECT
Q_OBJECT
public:
MenuFunc
(
QMenu
*
_menu
,
int
_id
)
{
menu
=
_menu
;
id
=
_id
;
};
...
...
@@ -128,7 +129,8 @@ public:
case
4
:
QVLCMenu
::
InterfacesMenu
(
p_intf
,
menu
);
break
;
}
};
int
id
;
QMenu
*
menu
;
int
id
;
QMenu
*
menu
;
};
#endif
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