Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
2735cac2
Commit
2735cac2
authored
Apr 21, 2003
by
Cyril Deguet
Browse files
* fixed refresh of the playlist (and a segfault...)
parent
53d2284d
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/gui/skins/controls/playlist.cpp
View file @
2735cac2
...
...
@@ -2,7 +2,7 @@
* playlist.cpp: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.cpp,v 1.
5
2003/04/2
0 15:00:19 karibu
Exp $
* $Id: playlist.cpp,v 1.
6
2003/04/2
1 00:18:37 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -215,11 +215,13 @@ bool ControlPlayList::ProcessEvent( Event *evt )
case
PLAYLIST_ID_DEL
:
if
(
(
GenericControl
*
)
evt
->
GetParam1
()
==
this
)
{
vlc_mutex_lock
(
&
PlayList
->
object_lock
);
for
(
int
i
=
PlayList
->
i_size
-
1
;
i
>=
0
;
i
--
)
{
if
(
Select
[
i
]
&&
i
!=
PlayList
->
i_index
)
playlist_Delete
(
PlayList
,
i
);
}
vlc_mutex_unlock
(
&
PlayList
->
object_lock
);
RefreshAll
();
}
break
;
...
...
@@ -229,6 +231,8 @@ bool ControlPlayList::ProcessEvent( Event *evt )
//---------------------------------------------------------------------------
void
ControlPlayList
::
RefreshList
()
{
vlc_mutex_lock
(
&
PlayList
->
object_lock
);
if
(
NumOfItems
!=
PlayList
->
i_size
)
{
if
(
NumOfItems
>
0
)
...
...
@@ -252,6 +256,8 @@ void ControlPlayList::RefreshList()
Slider
->
ChangeSliderRange
(
Range
);
StartIndex
=
Slider
->
GetCursorPosition
();
}
vlc_mutex_unlock
(
&
PlayList
->
object_lock
);
}
//---------------------------------------------------------------------------
void
ControlPlayList
::
RefreshAll
()
...
...
@@ -290,7 +296,7 @@ void ControlPlayList::Draw( int x, int y, int w, int h, Graphics *dest )
void
ControlPlayList
::
DrawAllCase
(
Graphics
*
dest
,
int
x
,
int
y
,
int
w
,
int
h
)
{
int
i
;
for
(
i
=
0
;
i
<
PlayList
->
i_size
-
StartIndex
&&
i
<
Line
*
Column
;
i
++
)
for
(
i
=
0
;
i
<
NumOfItems
-
StartIndex
&&
i
<
Line
*
Column
;
i
++
)
{
DrawCase
(
dest
,
i
+
StartIndex
,
x
,
y
,
w
,
h
);
}
...
...
modules/gui/skins/gtk2/gtk2_api.cpp
View file @
2735cac2
...
...
@@ -2,7 +2,7 @@
* gtk2_api.cpp: Various gtk2-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_api.cpp,v 1.1
1
2003/04/
16 21:40:07 ipkiss
Exp $
* $Id: gtk2_api.cpp,v 1.1
2
2003/04/
21 00:18:37 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -53,6 +53,7 @@ void OSAPI_PostMessage( Window *win, unsigned int message, unsigned int param1,
long
param2
)
{
GdkEventClient
*
event
=
new
GdkEventClient
;
event
->
type
=
GDK_CLIENT_EVENT
;
if
(
win
==
NULL
)
event
->
window
=
NULL
;
...
...
modules/gui/skins/src/vlcproc.cpp
View file @
2735cac2
...
...
@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.1
0
2003/04/2
0 2
0:
2
8:3
9 ipkiss
Exp $
* $Id: vlcproc.cpp,v 1.1
1
2003/04/2
1 0
0:
1
8:3
7 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -232,10 +232,8 @@ void VlcProc::InterfaceRefresh( bool All )
Theme
*
Thema
=
Sys
->
p_theme
;
playlist_t
*
PlayList
=
Sys
->
p_playlist
;
// Refresh
if
(
PlayList
!=
NULL
&&
Sys
->
p_input
!=
NULL
&&
Sys
->
p_input
->
stream
.
b_seekable
)
if
(
PlayList
!=
NULL
)
{
// Refresh stream control controls ! :)
switch
(
PlayList
->
i_status
)
...
...
Write
Preview
Supports
Markdown
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