Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e15ff43d
Commit
e15ff43d
authored
May 14, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt, menu: code simplification
parent
1a7e7c83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+1
-8
No files found.
modules/gui/qt4/menus.cpp
View file @
e15ff43d
...
@@ -205,10 +205,6 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
...
@@ -205,10 +205,6 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
#define PUSH_INPUTVAR( var ) varnames.push_back( var ); \
#define PUSH_INPUTVAR( var ) varnames.push_back( var ); \
objects.push_back( VLC_OBJECT(p_input) );
objects.push_back( VLC_OBJECT(p_input) );
#define PUSH_SEPARATOR if( objects.size() != i_last_separator ) { \
objects.push_back( 0 ); varnames.push_back( "" ); \
i_last_separator = objects.size(); }
static
int
InputAutoMenuBuilder
(
input_thread_t
*
p_object
,
static
int
InputAutoMenuBuilder
(
input_thread_t
*
p_object
,
vector
<
vlc_object_t
*>
&
objects
,
vector
<
vlc_object_t
*>
&
objects
,
vector
<
const
char
*>
&
varnames
)
vector
<
const
char
*>
&
varnames
)
...
@@ -746,7 +742,6 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
...
@@ -746,7 +742,6 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
delete menu; menu = NULL; \
delete menu; menu = NULL; \
if( !show ) \
if( !show ) \
return; \
return; \
unsigned int i_last_separator = 0; \
vector<vlc_object_t *> objects; \
vector<vlc_object_t *> objects; \
vector<const char *> varnames; \
vector<const char *> varnames; \
input_thread_t *p_input = THEMIM->getInput();
input_thread_t *p_input = THEMIM->getInput();
...
@@ -755,7 +750,6 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
...
@@ -755,7 +750,6 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
menu = new QMenu(); \
menu = new QMenu(); \
Populate( p_intf, menu, varnames, objects ); \
Populate( p_intf, menu, varnames, objects ); \
menu->popup( QCursor::pos() ); \
menu->popup( QCursor::pos() ); \
i_last_separator = 0;
void
QVLCMenu
::
PopupPlayEntries
(
QMenu
*
menu
,
void
QVLCMenu
::
PopupPlayEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
intf_thread_t
*
p_intf
,
...
@@ -916,7 +910,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf, bool show )
...
@@ -916,7 +910,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf, bool show )
{
{
varnames
.
push_back
(
"audio-es"
);
varnames
.
push_back
(
"audio-es"
);
InputAutoMenuBuilder
(
p_input
,
objects
,
varnames
);
InputAutoMenuBuilder
(
p_input
,
objects
,
varnames
);
PUSH_SEPARATOR
;
menu
->
addSeparator
()
;
}
}
menu
=
new
QMenu
();
menu
=
new
QMenu
();
...
@@ -1099,7 +1093,6 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
...
@@ -1099,7 +1093,6 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
#undef PUSH_VAR
#undef PUSH_VAR
#undef PUSH_SEPARATOR
/*************************************************************************
/*************************************************************************
* Builders for automenus
* Builders for automenus
...
...
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