screen_browser: export browser_get_selected_entry()
Rename browser_get_selected() to browser_get_selected_entry() first.
Rename browser_get_selected() to browser_get_selected_entry() first.
screen_browser: added function browser_get_selected_song()
Shortcut for several command handlers.
Shortcut for several command handlers.
screen_browser: pass mpd_PlaylistFile object to load_playlist()
screen_browser: moved range selection check to browser_get_selected()
browser_get_selected() should not return an item when multiple items
are selected (range selection).
browser_get_selected() should not return an item when multiple items
are selected (range selection).
plugin: show plugin error messages on the screen
Due to a typo, stdout was redirected twice to the pipe, and stderr was
forgotten.
Due to a typo, stdout was redirected twice to the pipe, and stderr was
forgotten.
update lyricwiki plugin to lyric.wikia.com
Lyricwiki was integrated into wikia.com. This changed the URL and once
again the API.
Lyricwiki was integrated into wikia.com. This changed the URL and once
again the API.
update lyrics screen when a new song starts
When a new song starts and the lyrics screen is displayed, fetch the lyrics
for the new song and display them. Don't switch to the new song's lyrics if
the lyrics screen was opened for a specific song.
When a new song starts and the lyrics screen is displayed, fetch the lyrics
for the new song and display them. Don't switch to the new song's lyrics if
the lyrics screen was opened for a specific song.
mpdclient: moved code to mpdclient_handle_error()
Merge branch 'master' of git://git.musicpd.org/patrick/ncmpc
automatically save lyrics
Added the option "lyrics-autosave" to save lyrics automatically after
receiving them. By default, the option is off. If the option is enabled,
lyrics are only saved if no such file exists, so we don't accidentally
overwrite lyrics.
Added the option "lyrics-autosave" to save lyrics automatically after
receiving them. By default, the option is off. If the option is enabled,
lyrics are only saved if no such file exists, so we don't accidentally
overwrite lyrics.
updated lyricwiki plugin
Lyricwiki doesn't provide lyrics directly through it's API anymore. Instead, a
link to the lyrics is returned if they were found. Follow that link to get the
real thing.
Lyricwiki doesn't provide lyrics directly through it's API anymore. Instead, a
link to the lyrics is returned if they were found. Follow that link to get the
real thing.
screen_play: Fixed the scrolling in the playlist screen.
Since commit 850ad87b588dd6cbb96e5558ee671f2c95cc839d, which introduced
a second column with the length of the song in the playlist screen, scrolling
of the entries would sometimes not work, if the entry was smaller than the
screen, but bigger than the first column.
This easy patch fixes this by using the real size of the first column to decide
whether to start scrolling.
Since commit 850ad87b588dd6cbb96e5558ee671f2c95cc839d, which introduced
a second column with the length of the song in the playlist screen, scrolling
of the entries would sometimes not work, if the entry was smaller than the
screen, but bigger than the first column.
This easy patch fixes this by using the real size of the first column to decide
whether to start scrolling.
screen_song: Added the length of the song to the song screen.
po: removed superfluous "<" character from Hebrew
Broken by the previous commit :(
Broken by the previous commit :(
po: added missing %s in Hebrew format string
po: added Hebrew translation
mpdclient: pass const song object to mpdclient_cmd_add()
Fixed rogue character after volume change
Volume changes that result in a shorter string length did not clean up the
now unused characters. We check the expected (relative) string length before
updating the screen and do a full repaint in that case.
Volume changes that result in a shorter string length did not clean up the
now unused characters. We check the expected (relative) string length before
updating the screen and do a full repaint in that case.
mpdclient: pass const strings
The mpdclient library doesn't modify the parameter strings, let's make
them const.
The mpdclient library doesn't modify the parameter strings, let's make
them const.
added valgrind.suppressions
screen_song: free mpd_stats object
Fix a memory leak.
Fix a memory leak.
main: free timers on exit
Make valgrind happier.
Make valgrind happier.
ncu: free the SCREEN on exit
Make valgrind happier.
Make valgrind happier.
options: added options_deinit()
Clean up before exiting, make valgrind happy.
Clean up before exiting, make valgrind happy.
options: removed NULL checks before g_free()
g_free() handles NULL parameters well.
g_free() handles NULL parameters well.
screen: free ncurses windows with delwin()
Clean up before exiting, make valgrind happy.
Clean up before exiting, make valgrind happy.
playlist: addded playlist_get_index_from_same_song()
playlist: pass const pointers when possible
screen_play: use "idx" instead of "song->pos"
The attribute song->pos may be unreliable. Since the list_window.c
code already passed the current position to us (parameter "idx"),
let's use it instead.
The attribute song->pos may be unreliable. Since the list_window.c
code already passed the current position to us (parameter "idx"),
let's use it instead.
screen_play: fix duration "0:-1"
If the song duration is not known (MPD_SONG_NO_TIME), don't attempt to
print -1 in the second column.
If the song duration is not known (MPD_SONG_NO_TIME), don't attempt to
print -1 in the second column.
screen_play: moved g_strdup_printf() call to format_duration()
file: moved strcmp() call to inline function same_song()
list_window: added the "hardware_cursor" option
This option makes ncurses look a little bit ugly, but it is important
for blind ncmpc users who depend on a braille display. The braille
display shows the position of the hardware cursor, but is unable to
display the "inverse colors" of the traditional ncmpc cursor.
This option makes ncurses look a little bit ugly, but it is important
for blind ncmpc users who depend on a braille display. The braille
display shows the position of the hardware cursor, but is unable to
display the "inverse colors" of the traditional ncmpc cursor.
updated NEWS
display songs time in playlist
Add the way to display a second column in a list window, and use it to
display the songs time in playlist.
It isn't displayed with NCMPC_MINI.
[mk: unbreak wide-cursor=no]
Add the way to display a second column in a list window, and use it to
display the songs time in playlist.
It isn't displayed with NCMPC_MINI.
[mk: unbreak wide-cursor=no]
mpdclient: added mpdclient_cmd_volume_up(), mpdclient_cmd_volume_down()
mpdclient: moved browse callback invocation from screen.c
The screen code shouldn't bother to do any callbacks, because screen.c
should only care about the GUI. Move that invocation to the mpdclient
library.
The screen code shouldn't bother to do any callbacks, because screen.c
should only care about the GUI. Move that invocation to the mpdclient
library.
mpdclient: tweak updatingdb in mpdclient.c
The mpdclient library should care about setting the new (temporary)
MPD update status.
The mpdclient library should care about setting the new (temporary)
MPD update status.
screen_search: removed unused macros
Removed SEARCH_TITLE, ...
Removed SEARCH_TITLE, ...
screen: added local "state" variable
Don't check "status != NULL" each time we need the MPD state.
Don't check "status != NULL" each time we need the MPD state.
screen: moved code to get_volume()
screen: removed spaces from the "Volume" strings
Don't let translators bother with whitespace.
Don't let translators bother with whitespace.
po: regenerated ncmpc.pot
po: updated Swedish translation
po: updated Norwegian translation
mpdclient: return from mpdclient_cmd_crop() on error
When the playlist is too small for crop, or when MPD is not playing,
"return" from mpdclient_cmd_crop() instead of stepping over the
command list block. This patch also simplifies the command list, and
frees the mpd_Status object before all checks are done.
When the playlist is too small for crop, or when MPD is not playing,
"return" from mpdclient_cmd_crop() instead of stepping over the
command list block. This patch also simplifies the command list, and
frees the mpd_Status object before all checks are done.
mpdclient: finish the "status" command in mpdclient_cmd_crop()
The crop function calls mpd_getStatus(), but never finishes that
command. There's a mpdclient_finish_command() call at the end of the
function, but that is supposed to finish the delete command list.
The crop function calls mpd_getStatus(), but never finishes that
command. There's a mpdclient_finish_command() call at the end of the
function, but that is supposed to finish the delete command list.
mpdclient: convert MPD_ERROR() to an inline function
mpdclient: include utils.h
Don't import string_list_free() manually.
Don't import string_list_free() manually.
mpdclient: pass const message to error callback
Makefile.am: run sparse once
Makefile.am: install lyrics plugins with automake
Set $(lyrics_SCRIPTS) instead of manually installing those plugins.
This is more consistent with automake, and automake gives us
uninstall.
Set $(lyrics_SCRIPTS) instead of manually installing those plugins.
This is more consistent with automake, and automake gives us
uninstall.
Makefile.am: no recursive Makefile
po: updated Danish translation
screen_play: added CMD_SELECT_PLAYING
This command immediately selects (but doesn't center) the currently
playing song. It is mapped by default to 'l' - there aren't many single
characters left, and this one is at least similar to ctrl-l, which
centers the currently playing song.
This command immediately selects (but doesn't center) the currently
playing song. It is mapped by default to 'l' - there aren't many single
characters left, and this one is at least similar to ctrl-l, which
centers the currently playing song.
Modify version string to post-release version 0.15~git
ncmpc version 0.14
po: updated Danish and Swedish translation
po: updated German translation
po: updated Korean translation
.gitignore: added ncmpc-tiny
screen_play: make center_playing_item aware of scroll offset
When moving the cursor to make sure it is visible after recentering,
move it to the offset position from the edge of the screen.
(Previously, it was placed at the edge, causing the offset to force the
screen to scroll.)
When moving the cursor to make sure it is visible after recentering,
move it to the offset position from the edge of the screen.
(Previously, it was placed at the edge, causing the offset to force the
screen to scroll.)
po: updated Spanish and Galician translation
po: updated Russian translation
po: updated Simplified Chinese translation
screen_help: added translator comment for CMD_INTERRUPT
po: updated Simplified Chinese translation
po: updated Slovak translation
po: updated French translation
po: updated Hungarian translation
AUTHORS: added new translators
updated NEWS file for 0.14
list_window: check range selection
Check if the numbers in selected_start and selected_end are correct in
the function list_window_check_selected().
Check if the numbers in selected_start and selected_end are correct in
the function list_window_check_selected().
po: added Dutch translation
screen_search.c: Fix typo and tweak spacing of search help.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Max Kellermann <max@duempel.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Max Kellermann <max@duempel.org>
po: updated Ukrainian translation
list_window: removed the unused "xoffset" variable
command: added missing "the" in translatable strings
"Move cursor to top of screen" -> "Move cursor to *the* top of screen".
"Move cursor to top of screen" -> "Move cursor to *the* top of screen".
'Home' & 'End' translation difficult
There are two 'Home' strings in command.c. One of them means button
name, and other means the action. Translators (like me) have only one
in pot-file and can not translate them right. Button name 'Home'
always does not need to be translated, but the action 'Home' must be.
I propose to rename action to something like 'Move cursor Home'. As
result we will have two strings to translate except one.
All of this concerned also 'End'.
There are two 'Home' strings in command.c. One of them means button
name, and other means the action. Translators (like me) have only one
in pot-file and can not translate them right. Button name 'Home'
always does not need to be translated, but the action 'Home' must be.
I propose to rename action to something like 'Move cursor Home'. As
result we will have two strings to translate except one.
All of this concerned also 'End'.
doc: Updated config.sample.
Added new options to config.sample and copied the descriptions from the manpage.
Added new options to config.sample and copied the descriptions from the manpage.
added scroll-offset option; fixed scrolling bug
scroll-offset (default 0) is the number of entries to be displayed on
either side of the cursor; this helps the user avoid overshooting when
moving the cursor to a desired entry past the end of the window. The
exact behavior is copied from Vim, as detailed below.
The interaction with the top/bottom (H/L) commands is the same as in
Vim: they jump to the top+offset/bottom-offset, unless the top/bottom is
the beginning/end of the list, in which case they jump all the way to
the edge.
Large values of the offset (at least half the screen height) also work
the same as in Vim, causing the cursor to always be centered.
Finally, there is some slightly odd behavior when using scrolling
commands while the cursor is in the offset range at the edge of the
list. For example, if the screen is scrolled to the top, and the cursor
is also on the first item, scrolling down by a line causes the cursor to
jump down to the offset position. This is also the same as Vim and I
don't really see a better (but simple) alternative.
The behavior of the scroll down command at the bottom of the list was
also broken; this was fixed here instead of separately since the
relevant code was modified for this update anyway.
scroll-offset (default 0) is the number of entries to be displayed on
either side of the cursor; this helps the user avoid overshooting when
moving the cursor to a desired entry past the end of the window. The
exact behavior is copied from Vim, as detailed below.
The interaction with the top/bottom (H/L) commands is the same as in
Vim: they jump to the top+offset/bottom-offset, unless the top/bottom is
the beginning/end of the list, in which case they jump all the way to
the edge.
Large values of the offset (at least half the screen height) also work
the same as in Vim, causing the cursor to always be centered.
Finally, there is some slightly odd behavior when using scrolling
commands while the cursor is in the offset range at the edge of the
list. For example, if the screen is scrolled to the top, and the cursor
is also on the first item, scrolling down by a line causes the cursor to
jump down to the offset position. This is also the same as Vim and I
don't really see a better (but simple) alternative.
The behavior of the scroll down command at the bottom of the list was
also broken; this was fixed here instead of separately since the
relevant code was modified for this update anyway.
po: added Ukrainian translation
po: updated Danish translation
po: updated Danish, Norwegian and Swedish translation
po: updated Hungarian translation
Added screen swap to help screen
Help text was already present but command hadn't been added to screen_help.c.
Help text was already present but command hadn't been added to screen_help.c.
updated translation
po: updated Slovak translation
screen: explain new MPD modes in translator comments
po: updated Galician and Spanish translation
po: updated Russian translation
po: updated Korean translation
po: updated Czech translation
po: added Czech translation
po: updated ncmpc.pot and *.po
screen: added "mode" in mode message
Print "Single _mode_ is on" instead of just "Single is on". This is
intended to be clearer for both users and translators.
Print "Single _mode_ is on" instead of just "Single is on". This is
intended to be clearer for both users and translators.
Merge branch 'master' of git://git.musicpd.org/patrick/ncmpc
support the 'consume' mode
fix bug which showed only a part of help
Index was incremented twice each iteration.
Index was incremented twice each iteration.
options.c: Fixed compilation with --enable-mini --enable-debug
With NCMPC_MINI we have no configuration file, so we can't dump the keys.
With NCMPC_MINI we have no configuration file, so we can't dump the keys.