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
c57da819
Commit
c57da819
authored
Jun 07, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gtk: don't use input_ChangeArea.
parent
a7017516
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
116 deletions
+27
-116
modules/gui/gtk/gtk_callbacks.c
modules/gui/gtk/gtk_callbacks.c
+20
-74
modules/gui/gtk/menu.c
modules/gui/gtk/menu.c
+7
-42
No files found.
modules/gui/gtk/gtk_callbacks.c
View file @
c57da819
...
...
@@ -231,106 +231,52 @@ gboolean GtkSliderPress( GtkWidget *widget,
void
GtkTitlePrev
(
GtkButton
*
button
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
;
input_area_t
*
p_area
;
int
i_id
;
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
p_intf
=
GtkGetIntf
(
button
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
i_id
=
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
->
i_id
-
1
;
if
(
i_id
>
0
)
{
p_area
=
p_intf
->
p_sys
->
p_input
->
stream
.
pp_areas
[
i_id
];
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
}
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"prev-title"
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
}
void
GtkTitleNext
(
GtkButton
*
button
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
;
input_area_t
*
p_area
;
unsigned
int
i_id
;
p_intf
=
GtkGetIntf
(
button
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
i_id
=
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
->
i_id
+
1
;
if
(
i_id
<
p_intf
->
p_sys
->
p_input
->
stream
.
i_area_nb
)
{
p_area
=
p_intf
->
p_sys
->
p_input
->
stream
.
pp_areas
[
i_id
];
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
}
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"next-title"
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
}
void
GtkChapterPrev
(
GtkButton
*
button
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
;
input_area_t
*
p_area
;
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
p_intf
=
GtkGetIntf
(
button
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
p_area
=
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
;
if
(
p_area
->
i_part
-
1
>
0
)
{
p_area
->
i_part
--
;
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
}
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"prev-chapter"
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
}
void
GtkChapterNext
(
GtkButton
*
button
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
;
input_area_t
*
p_area
;
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
p_intf
=
GtkGetIntf
(
button
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
p_area
=
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
;
if
(
p_area
->
i_part
+
1
<
p_area
->
i_part_nb
)
{
p_area
->
i_part
++
;
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
}
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"next-chapter"
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
}
...
...
modules/gui/gtk/menu.c
View file @
c57da819
...
...
@@ -160,33 +160,16 @@ void GtkPopupNavigationToggle( GtkCheckMenuItem * menuitem,
guint
i_title
=
DATA2TITLE
(
user_data
);
guint
i_chapter
=
DATA2CHAPTER
(
user_data
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
p_area
=
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
;
i_title
=
__MIN
(
i_title
,
p_intf
->
p_sys
->
p_input
->
stream
.
i_area_nb
-
1
);
i_title
=
__MAX
(
i_title
,
1
);
if
(
p_area
!=
p_intf
->
p_sys
->
p_input
->
stream
.
pp_areas
[
i_title
]
)
{
p_area
=
p_intf
->
p_sys
->
p_input
->
stream
.
pp_areas
[
i_title
];
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
}
i_chapter
=
__MIN
(
i_chapter
,
p_area
->
i_part_nb
-
1
);
i_chapter
=
__MAX
(
i_chapter
,
1
);
p_area
->
i_part
=
i_chapter
;
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
(
input_area_t
*
)
p_area
);
/* FIXME use "navigation" variable */
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"title"
,
i_title
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"chapter"
,
i_chapter
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
@@ -235,22 +218,12 @@ void GtkMenubarTitleToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
{
guint
i_title
=
(
ptrdiff_t
)
user_data
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
i_title
=
__MIN
(
i_title
,
p_intf
->
p_sys
->
p_input
->
stream
.
i_area_nb
-
1
);
i_title
=
__MAX
(
i_title
,
1
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_intf
->
p_sys
->
p_input
->
stream
.
pp_areas
[
i_title
]
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"title"
,
i_title
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
p_intf
->
p_sys
->
b_title_update
=
VLC_FALSE
;
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
@@ -271,13 +244,7 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
if
(
menuitem
->
active
&&
!
p_intf
->
p_sys
->
b_chapter_update
)
{
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
i_chapter
=
__MIN
(
i_chapter
,
p_area
->
i_part_nb
-
1
);
i_chapter
=
__MAX
(
i_chapter
,
1
);
p_area
->
i_part
=
i_chapter
;
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
(
input_area_t
*
)
p_area
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"chapter"
,
i_chapter
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
p_popup_menu
=
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
...
...
@@ -288,8 +255,6 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_FALSE
;
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
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