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
9ea4f58e
Commit
9ea4f58e
authored
Apr 16, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Subtitles menu
parent
9cbd95e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+15
-11
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+6
-2
No files found.
modules/gui/qt4/menus.cpp
View file @
9ea4f58e
...
...
@@ -321,6 +321,7 @@ void VLCMenuBar::createMenuBar( MainInterface *mi,
BAR_DADD
(
NavigMenu
(
p_intf
,
bar
),
qtr
(
"P&layback"
),
3
);
BAR_DADD
(
AudioMenu
(
p_intf
,
bar
),
qtr
(
"&Audio"
),
1
);
BAR_DADD
(
VideoMenu
(
p_intf
,
bar
),
qtr
(
"&Video"
),
2
);
BAR_DADD
(
SubtitleMenu
(
p_intf
,
bar
),
qtr
(
"Subti&tle"
),
5
);
addMenuToMainbar
(
ToolsMenu
(
bar
),
qtr
(
"&Tools"
),
bar
);
...
...
@@ -619,8 +620,10 @@ QMenu *VLCMenuBar::AudioMenu( intf_thread_t *p_intf, QMenu * current )
}
/* Subtitles */
QMenu
*
VLCMenuBar
::
SubtitleMenu
(
QMenu
*
current
)
QMenu
*
VLCMenuBar
::
SubtitleMenu
(
intf_thread_t
*
,
QMenu
*
current
)
{
if
(
current
->
isEmpty
()
)
{
QAction
*
action
;
QMenu
*
submenu
=
new
QMenu
(
qtr
(
"&Subtitle Track"
),
current
);
action
=
current
->
addMenu
(
submenu
);
...
...
@@ -628,7 +631,8 @@ QMenu *VLCMenuBar::SubtitleMenu( QMenu *current )
addDPStaticEntry
(
submenu
,
qtr
(
"Open File..."
),
""
,
SLOT
(
loadSubtitlesFile
()
)
);
submenu
->
addSeparator
();
return
submenu
;
}
return
current
;
}
/**
...
...
@@ -646,7 +650,7 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subt
{
addActionWithSubmenu
(
current
,
"video-es"
,
qtr
(
"Video &Track"
)
);
if
(
b_subtitle
)
SubtitleMenu
(
current
);
SubtitleMenu
(
p_intf
,
current
);
current
->
addSeparator
();
/* Surface modifiers */
...
...
@@ -1036,7 +1040,7 @@ void VLCMenuBar::PopupMenu( intf_thread_t *p_intf, bool show )
if
(
action
->
menu
()
->
isEmpty
()
)
action
->
setEnabled
(
false
);
submenu
=
SubtitleMenu
(
menu
);
submenu
=
SubtitleMenu
(
p_intf
,
menu
);
submenu
->
setTitle
(
qtr
(
"Subti&tle"
)
);
UpdateItem
(
p_intf
,
menu
,
"spu-es"
,
VLC_OBJECT
(
p_input
),
true
);
...
...
modules/gui/qt4/menus.hpp
View file @
9ea4f58e
...
...
@@ -117,11 +117,14 @@ private:
}
static
QMenu
*
RebuildNavigMenu
(
intf_thread_t
*
,
QMenu
*
,
bool
b_keep
=
false
);
static
QMenu
*
VideoMenu
(
intf_thread_t
*
,
QMenu
*
,
bool
b_subtitle
=
tru
e
);
static
QMenu
*
VideoMenu
(
intf_thread_t
*
,
QMenu
*
,
bool
b_subtitle
=
fals
e
);
static
QMenu
*
VideoMenu
(
intf_thread_t
*
p_intf
,
QWidget
*
parent
)
{
return
VideoMenu
(
p_intf
,
new
QMenu
(
parent
)
);
}
static
QMenu
*
SubtitleMenu
(
QMenu
*
current
);
static
QMenu
*
SubtitleMenu
(
intf_thread_t
*
,
QMenu
*
current
);
static
QMenu
*
SubtitleMenu
(
intf_thread_t
*
p_intf
,
QWidget
*
parent
)
{
return
SubtitleMenu
(
p_intf
,
new
QMenu
(
parent
)
);
}
static
QMenu
*
AudioMenu
(
intf_thread_t
*
,
QMenu
*
);
static
QMenu
*
AudioMenu
(
intf_thread_t
*
p_intf
,
QWidget
*
parent
)
{
...
...
@@ -173,6 +176,7 @@ public:
case
2
:
VLCMenuBar
::
VideoMenu
(
p_intf
,
menu
);
break
;
case
3
:
VLCMenuBar
::
RebuildNavigMenu
(
p_intf
,
menu
);
break
;
case
4
:
VLCMenuBar
::
ViewMenu
(
p_intf
,
menu
);
break
;
case
5
:
VLCMenuBar
::
SubtitleMenu
(
p_intf
,
menu
);
break
;
}
}
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