Code

ncmpc.git
15 years agofilelist: removed "path" attribute
Max Kellermann [Sun, 13 Sep 2009 09:06:07 +0000 (11:06 +0200)]
filelist: removed "path" attribute

Callers should track their current path manually, instead of relying
on an the filelist object.

15 years agoscreen_browser: browser_change_directory() to screen_file.c
Max Kellermann [Sun, 13 Sep 2009 09:06:05 +0000 (11:06 +0200)]
screen_browser: browser_change_directory() to screen_file.c

This is completely specific to screen_file, and should live there.

15 years agoscreen_browser: export browser_get_selected_entry()
Max Kellermann [Sun, 13 Sep 2009 09:05:45 +0000 (11:05 +0200)]
screen_browser: export browser_get_selected_entry()

Rename browser_get_selected() to browser_get_selected_entry() first.

15 years agoscreen_browser: added function browser_get_selected_song()
Max Kellermann [Sun, 13 Sep 2009 09:05:44 +0000 (11:05 +0200)]
screen_browser: added function browser_get_selected_song()

Shortcut for several command handlers.

15 years agoscreen_browser: pass mpd_PlaylistFile object to load_playlist()
Max Kellermann [Sun, 13 Sep 2009 09:05:23 +0000 (11:05 +0200)]
screen_browser: pass mpd_PlaylistFile object to load_playlist()

15 years agoscreen_browser: moved range selection check to browser_get_selected()
Max Kellermann [Sun, 13 Sep 2009 07:58:33 +0000 (09:58 +0200)]
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).

15 years agoplugin: show plugin error messages on the screen
Max Kellermann [Sun, 13 Sep 2009 06:37:26 +0000 (08:37 +0200)]
plugin: show plugin error messages on the screen

Due to a typo, stdout was redirected twice to the pipe, and stderr was
forgotten.

15 years agoupdate lyricwiki plugin to lyric.wikia.com
Thomas Jansen [Sat, 12 Sep 2009 22:29:28 +0000 (00:29 +0200)]
update lyricwiki plugin to lyric.wikia.com

Lyricwiki was integrated into wikia.com. This changed the URL and once
again the API.

15 years agoupdate lyrics screen when a new song starts
Thomas Jansen [Fri, 11 Sep 2009 14:11:30 +0000 (16:11 +0200)]
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.

15 years agompdclient: moved code to mpdclient_handle_error()
Max Kellermann [Thu, 10 Sep 2009 15:52:32 +0000 (17:52 +0200)]
mpdclient: moved code to mpdclient_handle_error()

15 years agoMerge branch 'master' of git://git.musicpd.org/patrick/ncmpc
Max Kellermann [Thu, 10 Sep 2009 15:50:32 +0000 (17:50 +0200)]
Merge branch 'master' of git://git.musicpd.org/patrick/ncmpc

15 years agoautomatically save lyrics
Thomas Jansen [Wed, 9 Sep 2009 07:51:35 +0000 (09:51 +0200)]
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.

15 years agoupdated lyricwiki plugin
Thomas Jansen [Wed, 9 Sep 2009 07:19:33 +0000 (09:19 +0200)]
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.

15 years agoscreen_play: Fixed the scrolling in the playlist screen.
Patrick Hallen [Fri, 4 Sep 2009 21:00:54 +0000 (23:00 +0200)]
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.

15 years agoscreen_song: Added the length of the song to the song screen.
Patrick Hallen [Fri, 4 Sep 2009 11:12:57 +0000 (13:12 +0200)]
screen_song: Added the length of the song to the song screen.

15 years agopo: removed superfluous "<" character from Hebrew
Max Kellermann [Fri, 4 Sep 2009 10:59:09 +0000 (12:59 +0200)]
po: removed superfluous "<" character from Hebrew

Broken by the previous commit :(

15 years agopo: added missing %s in Hebrew format string
Max Kellermann [Fri, 4 Sep 2009 10:54:36 +0000 (12:54 +0200)]
po: added missing %s in Hebrew format string

15 years agopo: added Hebrew translation
Itai Kloog [Fri, 4 Sep 2009 10:16:04 +0000 (12:16 +0200)]
po: added Hebrew translation

15 years agompdclient: pass const song object to mpdclient_cmd_add()
Max Kellermann [Mon, 24 Aug 2009 22:43:48 +0000 (00:43 +0200)]
mpdclient: pass const song object to mpdclient_cmd_add()

15 years agoFixed rogue character after volume change
Thomas Jansen [Mon, 17 Aug 2009 10:19:37 +0000 (12:19 +0200)]
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.

15 years agompdclient: pass const strings
Max Kellermann [Sat, 15 Aug 2009 21:40:55 +0000 (23:40 +0200)]
mpdclient: pass const strings

The mpdclient library doesn't modify the parameter strings, let's make
them const.

15 years agoadded valgrind.suppressions
Max Kellermann [Fri, 14 Aug 2009 21:50:25 +0000 (23:50 +0200)]
added valgrind.suppressions

15 years agoscreen_song: free mpd_stats object
Max Kellermann [Fri, 14 Aug 2009 21:50:25 +0000 (23:50 +0200)]
screen_song: free mpd_stats object

Fix a memory leak.

15 years agomain: free timers on exit
Max Kellermann [Fri, 14 Aug 2009 21:50:17 +0000 (23:50 +0200)]
main: free timers on exit

Make valgrind happier.

15 years agoncu: free the SCREEN on exit
Max Kellermann [Fri, 14 Aug 2009 21:45:17 +0000 (23:45 +0200)]
ncu: free the SCREEN on exit

Make valgrind happier.

15 years agooptions: added options_deinit()
Max Kellermann [Fri, 14 Aug 2009 21:44:06 +0000 (23:44 +0200)]
options: added options_deinit()

Clean up before exiting, make valgrind happy.

15 years agooptions: removed NULL checks before g_free()
Max Kellermann [Fri, 14 Aug 2009 21:44:06 +0000 (23:44 +0200)]
options: removed NULL checks before g_free()

g_free() handles NULL parameters well.

15 years agoscreen: free ncurses windows with delwin()
Max Kellermann [Fri, 14 Aug 2009 21:44:06 +0000 (23:44 +0200)]
screen: free ncurses windows with delwin()

Clean up before exiting, make valgrind happy.

15 years agoplaylist: addded playlist_get_index_from_same_song()
Max Kellermann [Thu, 9 Jul 2009 17:21:38 +0000 (19:21 +0200)]
playlist: addded playlist_get_index_from_same_song()

15 years agoplaylist: pass const pointers when possible
Max Kellermann [Thu, 9 Jul 2009 17:20:25 +0000 (19:20 +0200)]
playlist: pass const pointers when possible

15 years agoscreen_play: use "idx" instead of "song->pos"
Max Kellermann [Wed, 8 Jul 2009 21:11:40 +0000 (23:11 +0200)]
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.

15 years agoscreen_play: fix duration "0:-1"
Max Kellermann [Wed, 8 Jul 2009 21:09:30 +0000 (23:09 +0200)]
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.

15 years agoscreen_play: moved g_strdup_printf() call to format_duration()
Max Kellermann [Wed, 8 Jul 2009 21:07:22 +0000 (23:07 +0200)]
screen_play: moved g_strdup_printf() call to format_duration()

15 years agofile: moved strcmp() call to inline function same_song()
Max Kellermann [Wed, 8 Jul 2009 19:38:33 +0000 (21:38 +0200)]
file: moved strcmp() call to inline function same_song()

15 years agolist_window: added the "hardware_cursor" option
Max Kellermann [Sun, 14 Jun 2009 16:12:03 +0000 (18:12 +0200)]
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.

15 years agoupdated NEWS
Max Kellermann [Sun, 14 Jun 2009 15:29:43 +0000 (17:29 +0200)]
updated NEWS

15 years agodisplay songs time in playlist
Romain Bignon [Sun, 14 Jun 2009 15:24:08 +0000 (17:24 +0200)]
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]

15 years agompdclient: added mpdclient_cmd_volume_up(), mpdclient_cmd_volume_down()
Max Kellermann [Fri, 12 Jun 2009 17:41:24 +0000 (19:41 +0200)]
mpdclient: added mpdclient_cmd_volume_up(), mpdclient_cmd_volume_down()

15 years agompdclient: moved browse callback invocation from screen.c
Max Kellermann [Fri, 12 Jun 2009 17:41:07 +0000 (19:41 +0200)]
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.

15 years agompdclient: tweak updatingdb in mpdclient.c
Max Kellermann [Fri, 12 Jun 2009 17:40:08 +0000 (19:40 +0200)]
mpdclient: tweak updatingdb in mpdclient.c

The mpdclient library should care about setting the new (temporary)
MPD update status.

15 years agoscreen_search: removed unused macros
Max Kellermann [Fri, 12 Jun 2009 15:51:08 +0000 (17:51 +0200)]
screen_search: removed unused macros

Removed SEARCH_TITLE, ...

15 years agoscreen: added local "state" variable
Max Kellermann [Thu, 11 Jun 2009 15:24:20 +0000 (17:24 +0200)]
screen: added local "state" variable

Don't check "status != NULL" each time we need the MPD state.

15 years agoscreen: moved code to get_volume()
Max Kellermann [Thu, 11 Jun 2009 14:32:39 +0000 (16:32 +0200)]
screen: moved code to get_volume()

15 years agoscreen: removed spaces from the "Volume" strings
Max Kellermann [Thu, 11 Jun 2009 14:32:22 +0000 (16:32 +0200)]
screen: removed spaces from the "Volume" strings

Don't let translators bother with whitespace.

15 years agopo: regenerated ncmpc.pot
Max Kellermann [Thu, 11 Jun 2009 14:32:14 +0000 (16:32 +0200)]
po: regenerated ncmpc.pot

15 years agopo: updated Swedish translation
Björn Pettersson [Thu, 11 Jun 2009 14:31:45 +0000 (16:31 +0200)]
po: updated Swedish translation

15 years agopo: updated Norwegian translation
Espen Jones [Thu, 11 Jun 2009 14:31:28 +0000 (16:31 +0200)]
po: updated Norwegian translation

15 years agompdclient: return from mpdclient_cmd_crop() on error
Max Kellermann [Thu, 11 Jun 2009 13:19:44 +0000 (15:19 +0200)]
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.

15 years agompdclient: finish the "status" command in mpdclient_cmd_crop()
Max Kellermann [Thu, 11 Jun 2009 13:18:26 +0000 (15:18 +0200)]
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.

15 years agompdclient: convert MPD_ERROR() to an inline function
Max Kellermann [Thu, 11 Jun 2009 12:29:49 +0000 (14:29 +0200)]
mpdclient: convert MPD_ERROR() to an inline function

15 years agompdclient: include utils.h
Max Kellermann [Thu, 11 Jun 2009 12:24:54 +0000 (14:24 +0200)]
mpdclient: include utils.h

Don't import string_list_free() manually.

15 years agompdclient: pass const message to error callback
Max Kellermann [Thu, 11 Jun 2009 12:04:08 +0000 (14:04 +0200)]
mpdclient: pass const message to error callback

15 years agoMakefile.am: run sparse once
Max Kellermann [Wed, 10 Jun 2009 22:23:08 +0000 (00:23 +0200)]
Makefile.am: run sparse once

15 years agoMakefile.am: install lyrics plugins with automake
Max Kellermann [Wed, 10 Jun 2009 22:22:58 +0000 (00:22 +0200)]
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.

15 years agoMakefile.am: no recursive Makefile
Max Kellermann [Wed, 10 Jun 2009 22:05:00 +0000 (00:05 +0200)]
Makefile.am: no recursive Makefile

15 years agopo: updated Danish translation
Niels Anker [Tue, 28 Apr 2009 19:09:39 +0000 (21:09 +0200)]
po: updated Danish translation

15 years agoscreen_play: added CMD_SELECT_PLAYING
Jeffrey Middleton [Thu, 23 Apr 2009 22:04:12 +0000 (17:04 -0500)]
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.

15 years agoModify version string to post-release version 0.15~git
Avuton Olrich [Tue, 21 Apr 2009 14:47:14 +0000 (07:47 -0700)]
Modify version string to post-release version 0.15~git

15 years agoncmpc version 0.14 release-0.14 v0.14
Avuton Olrich [Tue, 21 Apr 2009 14:47:14 +0000 (07:47 -0700)]
ncmpc version 0.14

15 years agopo: updated Danish and Swedish translation
Niels Anker [Sat, 18 Apr 2009 11:05:28 +0000 (13:05 +0200)]
po: updated Danish and Swedish translation

15 years agopo: updated German translation
Monika Brinkert [Fri, 17 Apr 2009 17:43:28 +0000 (19:43 +0200)]
po: updated German translation

15 years agopo: updated Korean translation
Atie [Fri, 17 Apr 2009 05:54:39 +0000 (07:54 +0200)]
po: updated Korean translation

15 years ago.gitignore: added ncmpc-tiny
Jeffrey Middleton [Wed, 15 Apr 2009 21:45:47 +0000 (16:45 -0500)]
.gitignore: added ncmpc-tiny

15 years agoscreen_play: make center_playing_item aware of scroll offset
Jeffrey Middleton [Wed, 15 Apr 2009 19:07:41 +0000 (14:07 -0500)]
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.)

15 years agopo: updated Spanish and Galician translation
Johám-Luís Miguéns Vila [Fri, 17 Apr 2009 07:48:03 +0000 (09:48 +0200)]
po: updated Spanish and Galician translation

15 years agopo: updated Russian translation
Max Arnold [Thu, 16 Apr 2009 11:36:23 +0000 (13:36 +0200)]
po: updated Russian translation

15 years agopo: updated Simplified Chinese translation
Gao Jie [Thu, 16 Apr 2009 05:19:31 +0000 (07:19 +0200)]
po: updated Simplified Chinese translation

15 years agoscreen_help: added translator comment for CMD_INTERRUPT
Max Kellermann [Thu, 16 Apr 2009 04:50:57 +0000 (06:50 +0200)]
screen_help: added translator comment for CMD_INTERRUPT

15 years agopo: updated Simplified Chinese translation
Gao Jie [Thu, 16 Apr 2009 04:49:56 +0000 (06:49 +0200)]
po: updated Simplified Chinese translation

15 years agopo: updated Slovak translation
Jozef Riha [Wed, 15 Apr 2009 20:32:48 +0000 (22:32 +0200)]
po: updated Slovak translation

15 years agopo: updated French translation
Bastien Leblanc [Wed, 15 Apr 2009 20:18:44 +0000 (22:18 +0200)]
po: updated French translation

15 years agopo: updated Hungarian translation
László Áshin [Wed, 15 Apr 2009 18:28:29 +0000 (20:28 +0200)]
po: updated Hungarian translation

15 years agoAUTHORS: added new translators
Max Kellermann [Wed, 15 Apr 2009 16:22:56 +0000 (18:22 +0200)]
AUTHORS: added new translators

15 years agoupdated NEWS file for 0.14
Max Kellermann [Wed, 15 Apr 2009 16:19:26 +0000 (18:19 +0200)]
updated NEWS file for 0.14

15 years agolist_window: check range selection
Max Kellermann [Wed, 15 Apr 2009 16:12:03 +0000 (18:12 +0200)]
list_window: check range selection

Check if the numbers in selected_start and selected_end are correct in
the function list_window_check_selected().

15 years agopo: added Dutch translation
Thomas Casteleyn [Wed, 15 Apr 2009 09:53:34 +0000 (11:53 +0200)]
po: added Dutch translation

15 years agoscreen_search.c: Fix typo and tweak spacing of search help.
Loui Chang [Tue, 14 Apr 2009 15:10:47 +0000 (11:10 -0400)]
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>
15 years agopo: updated Ukrainian translation
Oleksandr Kovalenko [Tue, 14 Apr 2009 04:41:46 +0000 (06:41 +0200)]
po: updated Ukrainian translation

15 years agolist_window: removed the unused "xoffset" variable
Max Kellermann [Fri, 10 Apr 2009 07:14:49 +0000 (09:14 +0200)]
list_window: removed the unused "xoffset" variable

15 years agocommand: added missing "the" in translatable strings
Max Kellermann [Thu, 9 Apr 2009 10:56:32 +0000 (12:56 +0200)]
command: added missing "the" in translatable strings

"Move cursor to top of screen" -> "Move cursor to *the* top of screen".

15 years ago'Home' & 'End' translation difficult
Oleksandr Kovalenko [Thu, 9 Apr 2009 06:20:19 +0000 (08:20 +0200)]
'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'.

15 years agodoc: Updated config.sample.
Patrick Hallen [Wed, 8 Apr 2009 12:34:27 +0000 (14:34 +0200)]
doc: Updated config.sample.

Added new options to config.sample and copied the descriptions from the manpage.

15 years agoadded scroll-offset option; fixed scrolling bug
Jeffrey Middleton [Tue, 7 Apr 2009 18:30:43 +0000 (13:30 -0500)]
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.

15 years agopo: added Ukrainian translation
Oleksandr Kovalenko [Wed, 8 Apr 2009 05:36:20 +0000 (07:36 +0200)]
po: added Ukrainian translation

15 years agopo: updated Danish translation
Niels Anker [Wed, 8 Apr 2009 04:32:18 +0000 (06:32 +0200)]
po: updated Danish translation

15 years agopo: updated Danish, Norwegian and Swedish translation
Niels Anker [Mon, 6 Apr 2009 09:19:53 +0000 (11:19 +0200)]
po: updated Danish, Norwegian and Swedish translation

15 years agopo: updated Hungarian translation
László Áshin [Mon, 6 Apr 2009 09:16:15 +0000 (11:16 +0200)]
po: updated Hungarian translation

15 years agoAdded screen swap to help screen
Jeffrey Middleton [Fri, 3 Apr 2009 12:25:48 +0000 (07:25 -0500)]
Added screen swap to help screen

Help text was already present but command hadn't been added to screen_help.c.

15 years agoupdated translation
Romain Bignon [Fri, 3 Apr 2009 22:23:23 +0000 (00:23 +0200)]
updated translation

15 years agopo: updated Slovak translation
Jozef Riha [Wed, 1 Apr 2009 21:23:21 +0000 (23:23 +0200)]
po: updated Slovak translation

15 years agoscreen: explain new MPD modes in translator comments
Max Kellermann [Wed, 1 Apr 2009 21:16:58 +0000 (23:16 +0200)]
screen: explain new MPD modes in translator comments

15 years agopo: updated Galician and Spanish translation
Johám-Luís Miguéns Vila [Wed, 1 Apr 2009 14:46:48 +0000 (16:46 +0200)]
po: updated Galician and Spanish translation

15 years agopo: updated Russian translation
Max Arnold [Wed, 1 Apr 2009 14:14:17 +0000 (16:14 +0200)]
po: updated Russian translation

15 years agopo: updated Korean translation
Atie [Wed, 1 Apr 2009 10:42:35 +0000 (12:42 +0200)]
po: updated Korean translation

15 years agopo: updated Czech translation
Vojtěch Trefný [Wed, 1 Apr 2009 09:57:14 +0000 (11:57 +0200)]
po: updated Czech translation

15 years agopo: added Czech translation
Vojtěch Trefný [Tue, 31 Mar 2009 19:25:43 +0000 (21:25 +0200)]
po: added Czech translation

15 years agopo: updated ncmpc.pot and *.po
Max Kellermann [Tue, 31 Mar 2009 19:25:03 +0000 (21:25 +0200)]
po: updated ncmpc.pot and *.po

15 years agoscreen: added "mode" in mode message
Max Kellermann [Tue, 31 Mar 2009 19:24:22 +0000 (21:24 +0200)]
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.

15 years agoMerge branch 'master' of git://git.musicpd.org/patrick/ncmpc
Max Kellermann [Mon, 30 Mar 2009 17:34:01 +0000 (19:34 +0200)]
Merge branch 'master' of git://git.musicpd.org/patrick/ncmpc

15 years agosupport the 'consume' mode
Romain Bignon [Sun, 29 Mar 2009 22:01:50 +0000 (00:01 +0200)]
support the 'consume' mode