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
e94bb0dd
Commit
e94bb0dd
authored
Jan 21, 2005
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/ncurses.c: incremental search works now with tree playlist.
parent
5de2de98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
22 deletions
+41
-22
modules/gui/ncurses.c
modules/gui/ncurses.c
+41
-22
No files found.
modules/gui/ncurses.c
View file @
e94bb0dd
...
...
@@ -82,6 +82,7 @@ static int PlaylistChanged( vlc_object_t *, const char *, vlc_value_t,
vlc_value_t
,
void
*
);
static
void
FindIndex
(
intf_thread_t
*
);
static
void
SearchPlaylist
(
intf_thread_t
*
,
char
*
);
static
int
SubSearchPlaylist
(
intf_thread_t
*
,
char
*
,
int
,
int
);
static
void
ManageSlider
(
intf_thread_t
*
);
static
void
ReadDir
(
intf_thread_t
*
);
...
...
@@ -968,15 +969,16 @@ static void ManageSlider( intf_thread_t *p_intf )
static
void
SearchPlaylist
(
intf_thread_t
*
p_intf
,
char
*
psz_searchstring
)
{
bool
b_ok
=
false
;
int
i_current
;
int
i_max
;
int
i_first
=
0
;
int
i_item
=
-
1
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
playlist_t
*
p_playlist
=
p_sys
->
p_playlist
;
if
(
p_sys
->
i_before_search
>=
0
)
{
i_first
=
p_sys
->
i_before_search
;
}
if
(
(
!
psz_searchstring
)
||
strlen
(
psz_searchstring
)
<=
0
)
{
...
...
@@ -984,38 +986,55 @@ static void SearchPlaylist( intf_thread_t *p_intf, char *psz_searchstring )
return
;
}
for
(
i_current
=
i_first
+
1
;
i_current
<
p_playlist
->
i_size
;
i_current
++
)
i_max
=
p_sys
->
i_current_view
==
VIEW_ALL
?
p_playlist
->
i_size
:
p_sys
->
i_plist_entries
;
i_item
=
SubSearchPlaylist
(
p_intf
,
psz_searchstring
,
i_first
+
1
,
i_max
);
if
(
i_item
<
0
)
{
if
(
strcasestr
(
p_playlist
->
pp_items
[
i_current
]
->
input
.
psz_name
,
psz_searchstring
)
!=
NULL
||
strcasestr
(
p_playlist
->
pp_items
[
i_current
]
->
input
.
psz_uri
,
psz_searchstring
)
!=
NULL
)
{
i_item
=
i_current
;
b_ok
=
true
;
break
;
}
i_item
=
SubSearchPlaylist
(
p_intf
,
psz_searchstring
,
0
,
i_first
);
}
if
(
!
b_ok
)
if
(
i_item
<
0
||
i_item
>=
i_max
)
return
;
p_sys
->
i_box_plidx
=
i_item
;
}
static
int
SubSearchPlaylist
(
intf_thread_t
*
p_intf
,
char
*
psz_searchstring
,
int
i_start
,
int
i_stop
)
{
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
playlist_t
*
p_playlist
=
p_sys
->
p_playlist
;
int
i
,
i_item
=
-
1
;
if
(
p_sys
->
i_current_view
==
VIEW_ALL
)
{
for
(
i
_current
=
0
;
i_current
<
i_first
;
i_current
++
)
for
(
i
=
i_start
+
1
;
i
<
i_stop
;
i
++
)
{
if
(
strcasestr
(
p_playlist
->
pp_items
[
i
_current
]
->
input
.
psz_name
,
if
(
strcasestr
(
p_playlist
->
pp_items
[
i
]
->
input
.
psz_name
,
psz_searchstring
)
!=
NULL
||
strcasestr
(
p_playlist
->
pp_items
[
i
_current
]
->
input
.
psz_uri
,
||
strcasestr
(
p_playlist
->
pp_items
[
i
]
->
input
.
psz_uri
,
psz_searchstring
)
!=
NULL
)
{
i_item
=
i_current
;
b_ok
=
true
;
i_item
=
i
;
break
;
}
}
}
else
{
for
(
i
=
i_start
+
1
;
i
<
i_stop
;
i
++
)
{
if
(
strcasestr
(
p_sys
->
pp_plist
[
i
]
->
psz_display
,
psz_searchstring
)
!=
NULL
)
{
i_item
=
i
;
break
;
}
}
}
if
(
i_item
<
0
||
i_item
>=
p_playlist
->
i_size
)
return
;
p_sys
->
i_box_plidx
=
i_item
;
return
i_item
;
}
...
...
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