Code

ncmpc.git
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

15 years agofix bug which showed only a part of help
Romain Bignon [Sun, 29 Mar 2009 21:28:25 +0000 (23:28 +0200)]
fix bug which showed only a part of help

Index was incremented twice each iteration.

15 years agooptions.c: Fixed compilation with --enable-mini --enable-debug
Patrick Hallen [Sun, 29 Mar 2009 16:24:19 +0000 (18:24 +0200)]
options.c: Fixed compilation with --enable-mini --enable-debug

With NCMPC_MINI we have no configuration file, so we can't dump the keys.

15 years agoscreen_help: Fixed an endless-loop-bug.
Patrick Hallen [Sat, 28 Mar 2009 19:39:54 +0000 (20:39 +0100)]
screen_help: Fixed an endless-loop-bug.

The cursor of the help screen was placed outside the list_window, so the
list_window_find() went into an endless loop, when wrap was enabled. Now the
cursor is placed on the first item of the list_window, so the find function
should work.

15 years agoman: Added "jump-prefix-only" to the configuration section.
Patrick Hallen [Sat, 28 Mar 2009 18:59:52 +0000 (19:59 +0100)]
man: Added "jump-prefix-only" to the configuration section.

Added a description about the new "jump-prefix" only option the the
configuration section of the manpage.

15 years agoconf: Added new "jump-prefix-only" option.
Patrick Hallen [Sat, 28 Mar 2009 18:03:51 +0000 (19:03 +0100)]
conf: Added new "jump-prefix-only" option.

Commit b36fbc3ed8b9ceed41 broke the usecase of jumping
directly to the first entry which begins with a certain letter.
This patch adds a new option, which enables the old behaviour,
which searches for the beginning of a string and not for the first
occurence.

15 years agoscreen_song: Replaced "DB last updated" with "Most recent db update"
Patrick Hallen [Sat, 28 Mar 2009 18:03:29 +0000 (19:03 +0100)]
screen_song: Replaced "DB last updated" with "Most recent db update"

15 years agoscreen_utils: Fixed backspace with widecharacters in screen_jump().
Patrick Hallen [Sat, 28 Mar 2009 18:01:31 +0000 (19:01 +0100)]
screen_utils: Fixed backspace with widecharacters in screen_jump().

Deleting widecharacters with backspace would leave bytes in the buffer
before. Now every byte of a deleted widecharacter is replaced with '\0'.

15 years agoutils: Use singular in time_seconds_to_durationstr() if appropriate.
Patrick Hallen [Wed, 18 Mar 2009 16:48:20 +0000 (17:48 +0100)]
utils: Use singular in time_seconds_to_durationstr() if appropriate.

15 years agoscreen_song: check c->status!=NULL
Max Kellermann [Fri, 27 Mar 2009 18:21:15 +0000 (19:21 +0100)]
screen_song: check c->status!=NULL

When the connection to the MPD server is closed, c->status may become
NULL.  All of the ncmpc code has to check that, including the song
screen.

15 years agosupport the new 'single' state feature
Romain Bignon [Fri, 27 Mar 2009 14:54:31 +0000 (15:54 +0100)]
support the new 'single' state feature

15 years agosupport the ^W shortcut in wreadline input
Romain Bignon [Fri, 27 Mar 2009 09:09:29 +0000 (10:09 +0100)]
support the ^W shortcut in wreadline input

15 years agoconf: Allow descriptive search modes
Jeffrey Middleton [Wed, 25 Mar 2009 17:33:38 +0000 (12:33 -0500)]
conf: Allow descriptive search modes

Previously only integers were accepted, to be interpreted as indices in
screen_search's list of search types.  Now the corresponding mode names
(title, artist, album, filename, artist+title) are accepted.

15 years agoman: configuration section updated
Jeffrey Middleton [Wed, 25 Mar 2009 15:48:48 +0000 (10:48 -0500)]
man: configuration section updated

Add undocumented options to the configuration section, and organize it
into subsections - it's getting long!

15 years agoconf: screen-list fix, removed unused option
Jeffrey Middleton [Wed, 25 Mar 2009 15:46:32 +0000 (10:46 -0500)]
conf: screen-list fix, removed unused option

screen-list produced errors due to empty fields between multiple
consecutive delimiters.  Check to make sure the field is nonempty before
attempting to parse it.

enable-bell is not used at all (it has been replaced by audible- and
visible-bell).

15 years agoNEWS: list commands added since release 0.13
Jeffrey Middleton [Wed, 25 Mar 2009 14:35:41 +0000 (09:35 -0500)]
NEWS: list commands added since release 0.13

Select range, HML cursor movement, scrolling commands, screen swap.

15 years agocommand: Changed key for screen swap to `
Jeffrey Middleton [Wed, 25 Mar 2009 14:34:30 +0000 (09:34 -0500)]
command: Changed key for screen swap to `

No need to push shift for a tilde when the backtick isn't taken.

15 years agoupdated translation
Romain Bignon [Thu, 26 Mar 2009 23:45:28 +0000 (00:45 +0100)]
updated translation

15 years agorenamed visual selection to range selection
Romain Bignon [Thu, 26 Mar 2009 23:15:16 +0000 (00:15 +0100)]
renamed visual selection to range selection