Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
6a13a256
Commit
6a13a256
authored
Nov 22, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore search
parent
315f9cd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
11 deletions
+40
-11
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+38
-11
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+2
-0
No files found.
modules/gui/wxwindows/playlist.cpp
View file @
6a13a256
...
...
@@ -401,6 +401,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
vlc_object_release
(
p_playlist
);
/* Update the playlist */
Rebuild
();
}
...
...
@@ -542,7 +543,7 @@ wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
return
dummy
;
}
/*wxTreeItemId Playlist::FindItemByName( wxTreeItemId root, wxString search_string, wxTreeItemId current
)
wxTreeItemId
Playlist
::
FindItemByName
(
wxTreeItemId
root
,
wxString
search_string
,
wxTreeItemId
current
,
vlc_bool_t
*
pb_current_found
)
{
long
cookie
;
PlaylistItem
*
p_wxcurrent
;
...
...
@@ -555,10 +556,19 @@ wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
if
(
treectrl
->
GetItemText
(
item
).
Lower
().
Contains
(
search_string
.
Lower
()
)
)
{
return item;
if
(
!
current
.
IsOk
()
||
*
pb_current_found
==
VLC_TRUE
)
{
return
item
;
}
else
if
(
current
.
IsOk
()
&&
item
==
current
)
{
*
pb_current_found
=
VLC_TRUE
;
}
}
if
(
treectrl
->
ItemHasChildren
(
item
)
)
{
wxTreeItemId search = FindItem( item, p_item );
wxTreeItemId
search
=
FindItemByName
(
item
,
search_string
,
current
,
pb_current_found
);
if
(
search
.
IsOk
()
)
{
return
search
;
...
...
@@ -566,12 +576,10 @@ wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
}
item
=
treectrl
->
GetNextChild
(
root
,
cookie
);
}
*/
/* Not found */
/*
wxTreeItemId dummy;
/* Not found */
wxTreeItemId
dummy
;
return
dummy
;
}
*/
void
Playlist
::
SetCurrentItem
(
wxTreeItemId
item
)
...
...
@@ -990,10 +998,29 @@ 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
;
vlc_bool_t
pb_found
=
VLC_FALSE
;
wxTreeItemId
found
=
FindItemByName
(
treectrl
->
GetRootItem
(),
search_string
,
search_current
,
&
pb_found
);
if
(
found
.
IsOk
()
)
{
search_current
=
found
;
treectrl
->
SelectItem
(
found
,
true
);
}
else
{
wxTreeItemId
dummy
;
search_current
=
dummy
;
found
=
FindItemByName
(
treectrl
->
GetRootItem
(),
search_string
,
search_current
,
&
pb_found
);
if
(
found
.
IsOk
()
)
{
search_current
=
found
;
treectrl
->
SelectItem
(
found
,
true
);
}
}
}
#if 0
...
...
modules/gui/wxwindows/wxwindows.h
View file @
6a13a256
...
...
@@ -842,6 +842,7 @@ private:
void
CreateNode
(
playlist_t
*
,
playlist_item_t
*
,
wxTreeItemId
);
wxTreeItemId
FindItem
(
wxTreeItemId
,
playlist_item_t
*
);
wxTreeItemId
FindItemByName
(
wxTreeItemId
,
wxString
,
wxTreeItemId
,
vlc_bool_t
*
);
void
SetCurrentItem
(
wxTreeItemId
);
void
UpdateTreeItem
(
playlist_t
*
,
wxTreeItemId
);
...
...
@@ -869,6 +870,7 @@ private:
int
i_current_view
;
wxTreeItemId
i_popup_item
;
wxTreeItemId
search_current
;
playlist_item_t
*
p_popup_item
;
playlist_item_t
*
p_popup_parent
;
...
...
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