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
d8e39549
Commit
d8e39549
authored
Apr 28, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Popup Menu: Add open and help. Correct the tool menu behaviour. Other small fix.
parent
3a9d24fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
47 deletions
+61
-47
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+61
-47
No files found.
modules/gui/qt4/menus.cpp
View file @
d8e39549
...
@@ -440,9 +440,23 @@ QMenu *QVLCMenu::HelpMenu()
...
@@ -440,9 +440,23 @@ QMenu *QVLCMenu::HelpMenu()
intfmenu->setTitle( qtr("Interfaces" ) ); \
intfmenu->setTitle( qtr("Interfaces" ) ); \
menu->addMenu( intfmenu ); \
menu->addMenu( intfmenu ); \
\
\
QMenu *toolsmenu = ToolsMenu( p_intf, NULL, false, false ); \
QMenu *toolsmenu = ToolsMenu( p_intf, NULL, false, false
, false
); \
toolsmenu->setTitle( qtr("Tools" ) ); \
toolsmenu->setTitle( qtr("Tools" ) ); \
menu->addMenu( toolsmenu ); \
menu->addMenu( toolsmenu ); \
\
QMenu *openmenu = new QMenu( qtr("Open") ); \
openmenu->addAction( qtr("Open &File..." ), THEDP, SLOT( openFileDialog() ) ); \
openmenu->addAction( qtr("Open &Disc..." ), THEDP, SLOT( openDiscDialog() ) ); \
openmenu->addAction( qtr("Open &Network..." ), THEDP, SLOT( openNetDialog() ) ); \
openmenu->addAction( qtr("Open &Capture Device..." ), THEDP, \
SLOT( openCaptureDialog() ) ); \
menu->addMenu( openmenu ); \
\
menu->addSeparator(); \
QMenu *helpmenu = HelpMenu(); \
helpmenu->setTitle( qtr("Help") ); \
menu->addMenu( helpmenu ); \
\
DP_SADD( qtr("Quit"), "", "", quit() , "Ctrl+Q" );
DP_SADD( qtr("Quit"), "", "", quit() , "Ctrl+Q" );
void
QVLCMenu
::
VideoPopupMenu
(
intf_thread_t
*
p_intf
)
void
QVLCMenu
::
VideoPopupMenu
(
intf_thread_t
*
p_intf
)
...
@@ -513,55 +527,55 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -513,55 +527,55 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
{
{
if
(
show
)
if
(
show
)
{
{
// create a popup if there is none
// create a popup if there is none
if
(
!
p_intf
->
p_sys
->
p_popup_menu
)
if
(
!
p_intf
->
p_sys
->
p_popup_menu
)
{
{
POPUP_BOILERPLATE
;
POPUP_BOILERPLATE
;
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
);
/* Video menu */
/* Video menu */
PUSH_SEPARATOR
;
PUSH_SEPARATOR
;
varnames
.
push_back
(
"video-es"
);
varnames
.
push_back
(
"video-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
objects
.
push_back
(
p_input
->
i_object_id
);
varnames
.
push_back
(
"spu-es"
);
varnames
.
push_back
(
"spu-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
objects
.
push_back
(
p_input
->
i_object_id
);
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
VLC_OBJECT_VOUT
,
FIND_CHILD
);
if
(
p_vout
)
if
(
p_vout
)
{
{
VideoAutoMenuBuilder
(
p_vout
,
objects
,
varnames
);
VideoAutoMenuBuilder
(
p_vout
,
objects
,
varnames
);
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
}
}
/* Audio menu */
/* Audio menu */
PUSH_SEPARATOR
PUSH_SEPARATOR
varnames
.
push_back
(
"audio-es"
);
varnames
.
push_back
(
"audio-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
objects
.
push_back
(
p_input
->
i_object_id
);
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
if
(
p_aout
)
if
(
p_aout
)
{
{
AudioAutoMenuBuilder
(
p_aout
,
objects
,
varnames
);
AudioAutoMenuBuilder
(
p_aout
,
objects
,
varnames
);
vlc_object_release
(
p_aout
);
vlc_object_release
(
p_aout
);
}
}
}
}
QMenu
*
menu
=
new
QMenu
();
QMenu
*
menu
=
new
QMenu
();
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
menu
->
addSeparator
();
menu
->
addSeparator
();
POPUP_STATIC_ENTRIES
;
POPUP_STATIC_ENTRIES
;
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
}
}
p_intf
->
p_sys
->
p_popup_menu
->
popup
(
QCursor
::
pos
()
);
p_intf
->
p_sys
->
p_popup_menu
->
popup
(
QCursor
::
pos
()
);
}
}
else
else
{
{
// destroy popup if there is one
// destroy popup if there is one
delete
p_intf
->
p_sys
->
p_popup_menu
;
delete
p_intf
->
p_sys
->
p_popup_menu
;
p_intf
->
p_sys
->
p_popup_menu
=
NULL
;
p_intf
->
p_sys
->
p_popup_menu
=
NULL
;
}
}
}
}
...
...
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