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
17365ad0
Commit
17365ad0
authored
Jun 16, 2008
by
Jean-Philippe Andre
Committed by
Jean-Baptiste Kempf
Jun 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean popup menu
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
02e74e70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
33 deletions
+51
-33
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+51
-33
No files found.
modules/gui/qt4/menus.cpp
View file @
17365ad0
...
...
@@ -654,9 +654,11 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
void
QVLCMenu
::
PopupMenuStaticEntries
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
)
{
#if 0
QMenu *toolsmenu = ToolsMenu( p_intf, menu, false, true );
toolsmenu->setTitle( qtr( "Tools" ) );
menu->addMenu( toolsmenu );
#endif
QMenu
*
openmenu
=
new
QMenu
(
qtr
(
"Open"
),
menu
);
openmenu
->
addAction
(
qtr
(
"Open &File..."
),
THEDP
,
...
...
@@ -670,9 +672,11 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
menu
->
addMenu
(
openmenu
);
menu
->
addSeparator
();
#if 0
QMenu *helpmenu = HelpMenu( menu );
helpmenu->setTitle( qtr( "Help" ) );
menu->addMenu( helpmenu );
#endif
addDPStaticEntry
(
menu
,
qtr
(
"Quit"
),
""
,
""
,
SLOT
(
quit
()
)
,
"Ctrl+Q"
);
}
...
...
@@ -748,43 +752,57 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
{
if
(
show
)
{
// create a popup if there is none
if
(
!
p_intf
->
p_sys
->
p_popup_menu
)
/* Delete and recreate a popup if there is one */
if
(
p_intf
->
p_sys
->
p_popup_menu
)
delete
p_intf
->
p_sys
->
p_popup_menu
;
QMenu
*
menu
=
new
QMenu
();
QMenu
*
submenu
;
QAction
*
action
;
POPUP_BOILERPLATE
;
PopupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
menu
->
addSeparator
();
if
(
p_input
)
{
POPUP_BOILERPLATE
;
if
(
p_input
)
{
vlc_object_yield
(
p_input
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
/* Audio menu */
PUSH_SEPARATOR
;
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
AudioAutoMenuBuilder
(
p_aout
,
p_input
,
objects
,
varnames
);
if
(
p_aout
)
vlc_object_release
(
p_aout
);
/* Video menu */
PUSH_SEPARATOR
;
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
);
if
(
p_vout
)
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_input
);
}
vlc_object_yield
(
p_input
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
/* Audio menu */
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
AudioAutoMenuBuilder
(
p_aout
,
p_input
,
objects
,
varnames
);
if
(
p_aout
)
vlc_object_release
(
p_aout
);
submenu
=
Populate
(
p_intf
,
NULL
,
varnames
,
objects
);
varnames
.
clear
();
objects
.
clear
();
action
=
menu
->
addMenu
(
submenu
);
action
->
setText
(
qtr
(
"Audio"
)
);
if
(
submenu
->
isEmpty
()
)
action
->
setEnabled
(
false
);
QMenu
*
menu
=
new
QMenu
();
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
menu
->
addSeparator
();
PopupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
menu
->
addSeparator
();
PopupMenuStaticEntries
(
p_intf
,
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
);
if
(
p_vout
)
vlc_object_release
(
p_vout
);
submenu
=
Populate
(
p_intf
,
NULL
,
varnames
,
objects
);
varnames
.
clear
();
objects
.
clear
();
action
=
menu
->
addMenu
(
submenu
);
action
->
setText
(
qtr
(
"Video"
)
);
if
(
submenu
->
isEmpty
()
)
action
->
setEnabled
(
false
);
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
vlc_object_release
(
p_input
)
;
}
menu
->
addSeparator
();
PopupMenuStaticEntries
(
p_intf
,
menu
);
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
p_intf
->
p_sys
->
p_popup_menu
->
popup
(
QCursor
::
pos
()
);
}
else
...
...
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