Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
a942a4d8
Commit
a942a4d8
authored
Feb 28, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loop on end of search
parent
a4c12384
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+24
-1
No files found.
modules/gui/wxwindows/playlist.cpp
View file @
a942a4d8
...
...
@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
* $Id: playlist.cpp,v 1.4
6
2004/02/2
6
1
2:04:14 gbazin
Exp $
* $Id: playlist.cpp,v 1.4
7
2004/02/2
8
1
9:31:54 zorglub
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
...
...
@@ -835,6 +835,7 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
{
wxString
search_string
=
search_text
->
GetValue
();
bool
b_ok
=
false
;
int
i_current
;
int
i_first
=
0
;
int
i_item
=
-
1
;
...
...
@@ -849,6 +850,11 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
}
}
if
(
i_first
==
listview
->
GetItemCount
()
)
{
i_first
=
-
1
;
}
for
(
i_current
=
i_first
+
1
;
i_current
<
listview
->
GetItemCount
();
i_current
++
)
{
...
...
@@ -858,9 +864,26 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
if
(
listitem
.
m_text
.
Lower
().
Contains
(
search_string
.
Lower
()
)
)
{
i_item
=
i_current
;
b_ok
=
true
;
break
;
}
}
if
(
!
b_ok
)
{
for
(
i_current
=
-
1
;
i_current
<
i_first
-
1
;
i_current
++
)
{
wxListItem
listitem
;
listitem
.
SetId
(
i_current
);
listview
->
GetItem
(
listitem
);
if
(
listitem
.
m_text
.
Lower
().
Contains
(
search_string
.
Lower
()
)
)
{
i_item
=
i_current
;
b_ok
=
true
;
break
;
}
}
}
if
(
i_item
<
0
||
i_item
>=
listview
->
GetItemCount
()
)
return
;
...
...
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