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
08af2ba7
Commit
08af2ba7
authored
Dec 06, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 Menu macro removal.
parent
5268bc2d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
31 deletions
+38
-31
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+37
-31
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+1
-0
No files found.
modules/gui/qt4/menus.cpp
View file @
08af2ba7
...
...
@@ -78,12 +78,12 @@ void addMIMStaticEntry( intf_thread_t *p_intf,
{
if
(
strlen
(
icon
)
>
0
)
{
QAction
*
action
=
menu
->
addAction
(
text
,
THEMIM
,
SLOT
(
slot
)
);
QAction
*
action
=
menu
->
addAction
(
text
,
THEMIM
,
member
);
action
->
setIcon
(
QIcon
(
icon
)
);
}
else
{
menu
->
addAction
(
text
,
THEMIM
,
SLOT
(
slot
)
);
menu
->
addAction
(
text
,
THEMIM
,
member
);
}
}
...
...
@@ -213,6 +213,7 @@ QMenu *QVLCMenu::FileMenu()
return
menu
;
}
/* Playlist/MediaLibrary Control */
QMenu
*
QVLCMenu
::
PlaylistMenu
(
intf_thread_t
*
p_intf
,
MainInterface
*
mi
)
{
QMenu
*
menu
=
new
QMenu
();
...
...
@@ -235,6 +236,7 @@ QMenu *QVLCMenu::PlaylistMenu( intf_thread_t *p_intf, MainInterface *mi )
* Tools/View Menu
* This is kept in the same menu for now, but could change if it gets much
* longer.
* This menu can be an interface menu but also a right click menu.
**/
QMenu
*
QVLCMenu
::
ToolsMenu
(
intf_thread_t
*
p_intf
,
MainInterface
*
mi
,
...
...
@@ -481,28 +483,32 @@ QMenu *QVLCMenu::HelpMenu()
p_intf->p_sys->p_popup_menu = NULL; \
i_last_separator = 0;
#define POPUP_PLAY_ENTRIES( menu )\
if( p_input ) \
{ \
vlc_value_t val; \
var_Get( p_input, "state", &val ); \
if( val.i_int == PLAYING_S ) \
addMIMStaticEntry( p_intf, menu, qtr( "Pause" ), "", \
":/pixmaps/pause_16px.png", SLOT( togglePlayPause() ) ); \
else \
addMIMStaticEntry( p_intf, menu, qtr( "Play" ), "", \
":/pixmaps/play_16px.png", SLOT( togglePlayPause() ) ); \
} \
else if( THEPL->items.i_size && THEPL->i_enabled ) \
addMIMStaticEntry( p_intf, menu, qtr( "Play" ), "", \
":/pixmaps/play_16px.png", SLOT( togglePlayPause() ) ); \
\
addMIMStaticEntry( p_intf, menu, qtr( "Stop" ), "", \
":/pixmaps/stop_16px.png", SLOT( stop() ) ); \
addMIMStaticEntry( p_intf, menu, qtr( "Previous" ), "", \
":/pixmaps/previous_16px.png", SLOT( prev() ) ); \
addMIMStaticEntry( p_intf, menu, qtr( "Next" ), "", \
void
QVLCMenu
::
PopupMenuControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
input_thread_t
*
p_input
)
{
if
(
p_input
)
{
vlc_value_t
val
;
var_Get
(
p_input
,
"state"
,
&
val
);
if
(
val
.
i_int
==
PLAYING_S
)
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Pause"
),
""
,
":/pixmaps/pause_16px.png"
,
SLOT
(
togglePlayPause
()
)
);
else
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Play"
),
""
,
":/pixmaps/play_16px.png"
,
SLOT
(
togglePlayPause
()
)
);
}
else
if
(
THEPL
->
items
.
i_size
&&
THEPL
->
i_enabled
)
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Play"
),
""
,
":/pixmaps/play_16px.png"
,
SLOT
(
togglePlayPause
()
)
);
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Stop"
),
""
,
":/pixmaps/stop_16px.png"
,
SLOT
(
stop
()
)
);
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Previous"
),
""
,
":/pixmaps/previous_16px.png"
,
SLOT
(
prev
()
)
);
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Next"
),
""
,
":/pixmaps/next_16px.png"
,
SLOT
(
next
()
)
);
}
void
QVLCMenu
::
PopupMenuStaticEntries
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
)
{
...
...
@@ -593,7 +599,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
menu
->
addSeparator
();
P
OPUP_PLAY_ENTRIES
(
menu
);
P
opupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
menu
->
addSeparator
();
PopupMenuStaticEntries
(
p_intf
,
menu
);
...
...
@@ -647,7 +653,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
QMenu
*
menu
=
new
QMenu
();
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
menu
->
addSeparator
();
P
OPUP_PLAY_ENTRIES
(
menu
);
P
opupMenuControlEntries
(
menu
,
p_intf
,
p_input
);
menu
->
addSeparator
();
PopupMenuStaticEntries
(
p_intf
,
menu
);
...
...
@@ -692,7 +698,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
}
sysMenu
->
addSeparator
();
P
OPUP_PLAY_ENTRIES
(
sysMenu
);
P
opupMenuControlEntries
(
sysMenu
,
p_intf
,
p_input
);
sysMenu
->
addSeparator
();
addDPStaticEntry
(
sysMenu
,
qtr
(
"&Open Media"
),
""
,
...
...
modules/gui/qt4/menus.hpp
View file @
08af2ba7
...
...
@@ -92,6 +92,7 @@ public:
static
void
PopupMenu
(
intf_thread_t
*
,
bool
);
static
void
PopupMenuStaticEntries
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
);
static
void
PopupMenuControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
input_thread_t
*
p_input
);
/* Systray */
static
void
updateSystrayMenu
(
MainInterface
*
,
intf_thread_t
*
,
bool
b_force_visible
=
false
);
...
...
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