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
9be6878a
Commit
9be6878a
authored
Apr 25, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Qt4: fix popup menu
parent
31439d7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
41 deletions
+53
-41
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+1
-1
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+51
-39
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+1
-1
No files found.
modules/gui/qt4/dialogs_provider.cpp
View file @
9be6878a
...
...
@@ -105,7 +105,7 @@ void DialogsProvider::customEvent( QEvent *event )
extendedDialog
();
break
;
/* We might want to make it better with custom functions */
case
INTF_DIALOG_POPUPMENU
:
QVLCMenu
::
PopupMenu
(
p_intf
);
break
;
QVLCMenu
::
PopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
case
INTF_DIALOG_AUDIOPOPUPMENU
:
QVLCMenu
::
AudioPopupMenu
(
p_intf
);
break
;
case
INTF_DIALOG_VIDEOPOPUPMENU
:
...
...
modules/gui/qt4/menus.cpp
View file @
9be6878a
...
...
@@ -504,48 +504,60 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
p_intf
->
p_sys
->
p_popup_menu
=
NULL
;
}
void
QVLCMenu
::
PopupMenu
(
intf_thread_t
*
p_intf
)
void
QVLCMenu
::
PopupMenu
(
intf_thread_t
*
p_intf
,
bool
show
)
{
POPUP_BOILERPLATE
;
if
(
p_input
)
if
(
show
)
{
vlc_object_yield
(
p_input
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
/* Video menu */
PUSH_SEPARATOR
;
varnames
.
push_back
(
"video-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
varnames
.
push_back
(
"spu-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
if
(
p_vout
)
{
VideoAutoMenuBuilder
(
p_vout
,
objects
,
varnames
);
vlc_object_release
(
p_vout
);
}
/* Audio menu */
PUSH_SEPARATOR
varnames
.
push_back
(
"audio-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
if
(
p_aout
)
{
AudioAutoMenuBuilder
(
p_aout
,
objects
,
varnames
);
vlc_object_release
(
p_aout
);
}
// create a popup if there is none
if
(
!
p_intf
->
p_sys
->
p_popup_menu
)
{
POPUP_BOILERPLATE
;
if
(
p_input
)
{
vlc_object_yield
(
p_input
);
InputAutoMenuBuilder
(
VLC_OBJECT
(
p_input
),
objects
,
varnames
);
/* Video menu */
PUSH_SEPARATOR
;
varnames
.
push_back
(
"video-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
varnames
.
push_back
(
"spu-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
if
(
p_vout
)
{
VideoAutoMenuBuilder
(
p_vout
,
objects
,
varnames
);
vlc_object_release
(
p_vout
);
}
/* Audio menu */
PUSH_SEPARATOR
varnames
.
push_back
(
"audio-es"
);
objects
.
push_back
(
p_input
->
i_object_id
);
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
if
(
p_aout
)
{
AudioAutoMenuBuilder
(
p_aout
,
objects
,
varnames
);
vlc_object_release
(
p_aout
);
}
}
QMenu
*
menu
=
new
QMenu
();
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
menu
->
addSeparator
();
POPUP_STATIC_ENTRIES
;
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
}
p_intf
->
p_sys
->
p_popup_menu
->
popup
(
QCursor
::
pos
()
);
}
else
{
// destroy popup if there is one
delete
p_intf
->
p_sys
->
p_popup_menu
;
p_intf
->
p_sys
->
p_popup_menu
=
NULL
;
}
QMenu
*
menu
=
new
QMenu
();
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
menu
->
addSeparator
();
POPUP_STATIC_ENTRIES
;
p_intf
->
p_sys
->
p_popup_menu
=
menu
;
menu
->
popup
(
QCursor
::
pos
()
);
p_intf
->
p_sys
->
p_popup_menu
=
NULL
;
}
#undef PUSH_VAR
...
...
modules/gui/qt4/menus.hpp
View file @
9be6878a
...
...
@@ -79,7 +79,7 @@ public:
static
void
AudioPopupMenu
(
intf_thread_t
*
);
static
void
VideoPopupMenu
(
intf_thread_t
*
);
static
void
MiscPopupMenu
(
intf_thread_t
*
);
static
void
PopupMenu
(
intf_thread_t
*
);
static
void
PopupMenu
(
intf_thread_t
*
,
bool
);
static
void
DoAction
(
intf_thread_t
*
,
QObject
*
);
private:
...
...
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