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
087123fe
Commit
087123fe
authored
Feb 20, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: menu, code simplification.
parent
4d866e7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
modules/gui/qt4/actions_manager.hpp
modules/gui/qt4/actions_manager.hpp
+1
-1
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+15
-15
No files found.
modules/gui/qt4/actions_manager.hpp
View file @
087123fe
...
@@ -79,8 +79,8 @@ public slots:
...
@@ -79,8 +79,8 @@ public slots:
void
toggleMuteAudio
();
void
toggleMuteAudio
();
void
AudioUp
();
void
AudioUp
();
void
AudioDown
();
void
AudioDown
();
protected
slots
:
void
play
();
void
play
();
protected
slots
:
void
fullscreen
();
void
fullscreen
();
void
snapshot
();
void
snapshot
();
void
playlist
();
void
playlist
();
...
...
modules/gui/qt4/menus.cpp
View file @
087123fe
...
@@ -614,6 +614,7 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
...
@@ -614,6 +614,7 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
}
}
/* */
input_thread_t
*
p_object
;
input_thread_t
*
p_object
;
vector
<
vlc_object_t
*>
objects
;
vector
<
vlc_object_t
*>
objects
;
vector
<
const
char
*>
varnames
;
vector
<
const
char
*>
varnames
;
...
@@ -622,15 +623,20 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
...
@@ -622,15 +623,20 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
if
(
p_object
)
if
(
p_object
)
vlc_object_hold
(
p_object
);
vlc_object_hold
(
p_object
);
InputAutoMenuBuilder
(
p_object
,
objects
,
varnames
);
InputAutoMenuBuilder
(
p_object
,
objects
,
varnames
);
/* Title and so on */
PUSH_VAR
(
"prev-title"
);
PUSH_VAR
(
"prev-title"
);
PUSH_VAR
(
"next-title"
);
PUSH_VAR
(
"next-title"
);
PUSH_VAR
(
"prev-chapter"
);
PUSH_VAR
(
"prev-chapter"
);
PUSH_VAR
(
"next-chapter"
);
PUSH_VAR
(
"next-chapter"
);
menu
->
addSeparator
();
EnableStaticEntries
(
menu
,
(
p_object
!=
NULL
)
);
EnableStaticEntries
(
menu
,
(
p_object
!=
NULL
)
);
if
(
p_object
)
if
(
p_object
)
{
vlc_object_release
(
p_object
);
vlc_object_release
(
p_object
);
}
return
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
return
Populate
(
p_intf
,
menu
,
varnames
,
objects
);
}
}
...
@@ -715,23 +721,17 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
...
@@ -715,23 +721,17 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
intf_thread_t
*
p_intf
,
intf_thread_t
*
p_intf
,
input_thread_t
*
p_input
)
input_thread_t
*
p_input
)
{
{
if
(
p_input
)
if
(
!
p_input
||
var_GetInteger
(
p_input
,
"state"
)
!=
PLAYING_S
)
{
QAction
*
action
=
menu
->
addAction
(
qtr
(
"Play"
),
ActionsManager
::
getInstance
(
p_intf
),
SLOT
(
play
()
)
);
action
->
setIcon
(
QIcon
(
":/play"
)
);
}
else
{
{
vlc_value_t
val
;
var_Get
(
p_input
,
"state"
,
&
val
);
if
(
val
.
i_int
==
PLAYING_S
)
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Pause"
),
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Pause"
),
":/pause"
,
SLOT
(
togglePlayPause
()
)
);
":/pause"
,
SLOT
(
togglePlayPause
()
)
);
else
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Play"
),
":/play"
,
SLOT
(
togglePlayPause
()
)
);
}
}
else
if
(
THEPL
->
items
.
i_size
)
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Play"
),
":/play"
,
SLOT
(
togglePlayPause
()
)
);
else
addDPStaticEntry
(
menu
,
qtr
(
"Play"
),
":/play"
,
SLOT
(
openDialog
()
)
);
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Stop"
),
addMIMStaticEntry
(
p_intf
,
menu
,
qtr
(
"Stop"
),
":/stop"
,
SLOT
(
stop
()
)
);
":/stop"
,
SLOT
(
stop
()
)
);
...
...
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