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
a8c9c25d
Commit
a8c9c25d
authored
Jun 03, 2009
by
Jean-Philippe Andre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #2765: DVD chapters navigation menu.
parent
a0d23587
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+15
-1
src/input/var.c
src/input/var.c
+10
-0
No files found.
modules/gui/qt4/menus.cpp
View file @
a8c9c25d
...
@@ -1257,6 +1257,19 @@ void QVLCMenu::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
...
@@ -1257,6 +1257,19 @@ void QVLCMenu::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
#undef TEXT_OR_VAR
#undef TEXT_OR_VAR
/** HACK for the navigation submenu:
* "title %2i" variables take the value 0 if not set
*/
static
bool
CheckTitle
(
vlc_object_t
*
p_object
,
const
char
*
psz_var
)
{
int
i_title
=
0
;
if
(
sscanf
(
psz_var
,
"title %2i"
,
&
i_title
)
<=
0
)
return
true
;
int
i_current_title
=
var_GetInteger
(
p_object
,
"title"
);
return
(
i_title
==
i_current_title
);
}
int
QVLCMenu
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
int
QVLCMenu
::
CreateChoicesMenu
(
QMenu
*
submenu
,
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_root
)
vlc_object_t
*
p_object
,
bool
b_root
)
...
@@ -1325,7 +1338,8 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
...
@@ -1325,7 +1338,8 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
else
menutext
.
sprintf
(
"%d"
,
CURVAL
.
i_int
);
else
menutext
.
sprintf
(
"%d"
,
CURVAL
.
i_int
);
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
ITEM_RADIO
,
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
ITEM_RADIO
,
p_object
,
CURVAL
,
i_type
,
p_object
,
CURVAL
,
i_type
,
CURVAL
.
i_int
==
val
.
i_int
);
(
CURVAL
.
i_int
==
val
.
i_int
)
&&
CheckTitle
(
p_object
,
psz_var
)
);
break
;
break
;
case
VLC_VAR_FLOAT
:
case
VLC_VAR_FLOAT
:
...
...
src/input/var.c
View file @
a8c9c25d
...
@@ -711,6 +711,16 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -711,6 +711,16 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
else
else
{
{
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_SEEKPOINT
,
&
newval
);
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_SEEKPOINT
,
&
newval
);
val
.
i_int
=
newval
.
i_int
;
}
/* Actualize "title %2i" variable */
if
(
val
.
i_int
>=
0
&&
val
.
i_int
<
count
.
i_int
)
{
int
i_title
=
var_GetInteger
(
p_input
,
"title"
);
char
psz_titlevar
[
10
]
=
{
0
};
snprintf
(
psz_titlevar
,
10
,
"title %2i"
,
i_title
);
var_Change
(
p_input
,
psz_titlevar
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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