Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
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
Show 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
...
@@ -206,7 +206,6 @@ struct intf_sys_t
/* Search Box context */
/* Search Box context */
char
search_chain
[
20
];
char
search_chain
[
20
];
int
before_search
;
/* Open Box Context */
/* Open Box Context */
char
open_chain
[
50
];
char
open_chain
[
50
];
...
@@ -465,16 +464,15 @@ static int SubSearchPlaylist(intf_sys_t *sys, char *searchstring,
...
@@ -465,16 +464,15 @@ static int SubSearchPlaylist(intf_sys_t *sys, char *searchstring,
return
-
1
;
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
)
if
(
i_first
<
0
)
i_first
=
0
;
i_first
=
0
;
if
(
!
str
||
!*
str
)
{
if
(
!
str
||
!*
str
)
sys
->
box_idx
=
sys
->
before_search
;
return
;
return
;
}
int
i_item
=
SubSearchPlaylist
(
sys
,
str
,
i_first
+
1
,
sys
->
plist_entries
);
int
i_item
=
SubSearchPlaylist
(
sys
,
str
,
i_first
+
1
,
sys
->
plist_entries
);
if
(
i_item
<
0
)
if
(
i_item
<
0
)
...
@@ -909,6 +907,7 @@ static int DrawHelp(intf_thread_t *intf)
...
@@ -909,6 +907,7 @@ static int DrawHelp(intf_thread_t *intf)
H
(
_
(
" O Reverse order Playlist by title"
));
H
(
_
(
" O Reverse order Playlist by title"
));
H
(
_
(
" g Go to the current playing item"
));
H
(
_
(
" g Go to the current playing item"
));
H
(
_
(
" / Look for an item"
));
H
(
_
(
" / Look for an item"
));
H
(
_
(
" ; Look for the next item"
));
H
(
_
(
" A Add an entry"
));
H
(
_
(
" A Add an entry"
));
/* xgettext: You can use ⌫ character to translate <backspace> */
/* xgettext: You can use ⌫ character to translate <backspace> */
H
(
_
(
" D, <backspace>, <del> Delete an entry"
));
H
(
_
(
" D, <backspace>, <del> Delete an entry"
));
...
@@ -1311,6 +1310,10 @@ static bool HandlePlaylistKey(intf_thread_t *intf, int key)
...
@@ -1311,6 +1310,10 @@ static bool HandlePlaylistKey(intf_thread_t *intf, int key)
vlc_mutex_unlock
(
&
sys
->
pl_lock
);
vlc_mutex_unlock
(
&
sys
->
pl_lock
);
return
true
;
return
true
;
case
';'
:
SearchPlaylist
(
sys
);
return
true
;
case
'g'
:
case
'g'
:
FindIndex
(
sys
,
p_playlist
);
FindIndex
(
sys
,
p_playlist
);
return
true
;
return
true
;
...
@@ -1491,7 +1494,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
...
@@ -1491,7 +1494,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
case
'\r'
:
case
'\r'
:
case
'\n'
:
case
'\n'
:
if
(
search
)
if
(
search
)
SearchPlaylist
(
sys
,
sys
->
search_chain
);
SearchPlaylist
(
sys
);
else
else
OpenSelection
(
intf
);
OpenSelection
(
intf
);
...
@@ -1513,10 +1516,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
...
@@ -1513,10 +1516,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
* following function-key sequence.
* following function-key sequence.
*
*
*/
*/
if
(
getch
()
!=
ERR
)
if
(
getch
()
==
ERR
)
return
;
if
(
search
)
sys
->
box_idx
=
sys
->
before_search
;
sys
->
box_type
=
BOX_PLAYLIST
;
sys
->
box_type
=
BOX_PLAYLIST
;
return
;
return
;
...
@@ -1534,7 +1534,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
...
@@ -1534,7 +1534,7 @@ static void HandleEditBoxKey(intf_thread_t *intf, int key, int box)
}
}
if
(
search
)
if
(
search
)
SearchPlaylist
(
sys
,
str
);
SearchPlaylist
(
sys
);
}
}
static
void
InputNavigate
(
input_thread_t
*
p_input
,
const
char
*
var
)
static
void
InputNavigate
(
input_thread_t
*
p_input
,
const
char
*
var
)
...
@@ -1572,20 +1572,11 @@ static void HandleCommonKey(intf_thread_t *intf, int key)
...
@@ -1572,20 +1572,11 @@ static void HandleCommonKey(intf_thread_t *intf, int key)
case
'/'
:
/* Search */
case
'/'
:
/* Search */
sys
->
plidx_follow
=
false
;
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
;
return
;
case
'A'
:
/* Open */
case
'A'
:
/* Open */
sys
->
open_chain
[
0
]
=
'\0'
;
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
;
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