Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
610c68d8
Commit
610c68d8
authored
Nov 28, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ncurses: add ';' shortcut to search next item
parent
9d759fed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
modules/gui/ncurses.c
modules/gui/ncurses.c
+15
-24
No files found.
modules/gui/ncurses.c
View file @
610c68d8
...
...
@@ -206,7 +206,6 @@ struct intf_sys_t
/* Search Box context */
char
search_chain
[
20
];
int
before_search
;
/* Open Box Context */
char
open_chain
[
50
];
...
...
@@ -465,16 +464,15 @@ static int SubSearchPlaylist(intf_sys_t *sys, char *searchstring,
return
-
1
;
}
static
void
SearchPlaylist
(
intf_sys_t
*
sys
,
char
*
str
)
static
void
SearchPlaylist
(
intf_sys_t
*
sys
)
{
int
i_first
=
sys
->
before_search
;
char
*
str
=
sys
->
search_chain
;
int
i_first
=
sys
->
box_idx
;
if
(
i_first
<
0
)
i_first
=
0
;
if
(
!
str
||
!*
str
)
{
sys
->
box_idx
=
sys
->
before_search
;
if
(
!
str
||
!*
str
)
return
;
}
int
i_item
=
SubSearchPlaylist
(
sys
,
str
,
i_first
+
1
,
sys
->
plist_entries
);
if
(
i_item
<
0
)
...
...
@@ -909,6 +907,7 @@ static int DrawHelp(intf_thread_t *intf)
H
(
_
(
" O Reverse order Playlist by title"
));
H
(
_
(
" g Go to the current playing item"
));
H
(
_
(
" / Look for an item"
));
H
(
_
(
" ; Look for the next item"
));
H
(
_
(
" A Add an entry"
));
/* xgettext: You can use ⌫ character to translate <backspace> */
H
(
_
(
" D, <backspace>, <del> Delete an entry"
));
...
...
@@ -1311,6 +1310,10 @@ static bool HandlePlaylistKey(intf_thread_t *intf, int key)
vlc_mutex_unlock
(
&
sys
->
pl_lock
);
return
true
;
case
';'
:
SearchPlaylist
(
sys
);
return
true
;
case
'g'
:
FindIndex
(
sys
,
p_playlist
);
return
true
;
...
...
@@ -1491,7 +1494,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
case
'\r'
:
case
'\n'
:
if
(
search
)
SearchPlaylist
(
sys
,
sys
->
search_chain
);
SearchPlaylist
(
sys
);
else
OpenSelection
(
intf
);
...
...
@@ -1513,11 +1516,8 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
* following function-key sequence.
*
*/
if
(
getch
()
!=
ERR
)
return
;
if
(
search
)
sys
->
box_idx
=
sys
->
before_search
;
sys
->
box_type
=
BOX_PLAYLIST
;
if
(
getch
()
==
ERR
)
sys
->
box_type
=
BOX_PLAYLIST
;
return
;
case
KEY_BACKSPACE
:
...
...
@@ -1534,7 +1534,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
}
if
(
search
)
SearchPlaylist
(
sys
,
str
);
SearchPlaylist
(
sys
);
}
static
void
InputNavigate
(
input_thread_t
*
p_input
,
const
char
*
var
)
...
...
@@ -1572,21 +1572,12 @@ static void HandleCommonKey(intf_thread_t *intf, int key)
case
'/'
:
/* Search */
sys
->
plidx_follow
=
false
;
if
(
sys
->
box_type
==
BOX_PLAYLIST
)
{
sys
->
before_search
=
sys
->
box_idx
;
sys
->
box_type
=
BOX_SEARCH
;
}
else
{
sys
->
before_search
=
0
;
BoxSwitch
(
sys
,
BOX_SEARCH
);
}
BoxSwitch
(
sys
,
BOX_SEARCH
);
return
;
case
'A'
:
/* Open */
sys
->
open_chain
[
0
]
=
'\0'
;
if
(
sys
->
box_type
==
BOX_PLAYLIST
)
sys
->
box_type
=
BOX_OPEN
;
else
BoxSwitch
(
sys
,
BOX_OPEN
);
BoxSwitch
(
sys
,
BOX_OPEN
);
return
;
/* Navigation */
...
...
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