Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
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
Show 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 @@
...
@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc
* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
* Copyright (C) 2000-2004 VideoLAN
* $Id: playlist.cpp,v 1.4
6 2004/02/26 12:04:14 gbazin
Exp $
* $Id: playlist.cpp,v 1.4
7 2004/02/28 19:31:54 zorglub
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
*
...
@@ -835,6 +835,7 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
...
@@ -835,6 +835,7 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
{
{
wxString
search_string
=
search_text
->
GetValue
();
wxString
search_string
=
search_text
->
GetValue
();
bool
b_ok
=
false
;
int
i_current
;
int
i_current
;
int
i_first
=
0
;
int
i_first
=
0
;
int
i_item
=
-
1
;
int
i_item
=
-
1
;
...
@@ -849,6 +850,11 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
...
@@ -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
();
for
(
i_current
=
i_first
+
1
;
i_current
<
listview
->
GetItemCount
();
i_current
++
)
i_current
++
)
{
{
...
@@ -858,9 +864,26 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
...
@@ -858,9 +864,26 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
if
(
listitem
.
m_text
.
Lower
().
Contains
(
search_string
.
Lower
()
)
)
if
(
listitem
.
m_text
.
Lower
().
Contains
(
search_string
.
Lower
()
)
)
{
{
i_item
=
i_current
;
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
;
break
;
}
}
}
}
}
if
(
i_item
<
0
||
i_item
>=
listview
->
GetItemCount
()
)
return
;
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