Code

ncmpc.git
13 years agofilelist: simplify some code
Jonathan Neuschäfer [Tue, 27 Sep 2011 17:13:43 +0000 (19:13 +0200)]
filelist: simplify some code

clang --analyze pointed me to this code:
src/filelist.c:146:3: warning: Value stored to 'iter' is never read

13 years agodocument screen_find, make it return bool
Jonathan Neuschäfer [Sun, 25 Sep 2011 22:02:40 +0000 (00:02 +0200)]
document screen_find, make it return bool

13 years agopo: update Ukrainian translation
Oleksandr Kovalenko [Wed, 21 Sep 2011 15:23:01 +0000 (17:23 +0200)]
po: update Ukrainian translation

13 years agoMinor grammar errors and inconsistent punctuation in the ncmpc man page
Isabell Long [Fri, 16 Sep 2011 19:25:17 +0000 (21:25 +0200)]
Minor grammar errors and inconsistent punctuation in the ncmpc man page

13 years agoMerge branch 'regr' of git://git.musicpd.org/jn/ncmpc
Max Kellermann [Wed, 21 Sep 2011 15:28:04 +0000 (17:28 +0200)]
Merge branch 'regr' of git://git.musicpd.org/jn/ncmpc

13 years agoscreen_queue: fix CMD_LIST_MOVE_*
Jonathan Neuschäfer [Sat, 17 Sep 2011 20:16:50 +0000 (22:16 +0200)]
screen_queue: fix CMD_LIST_MOVE_*

The code now tries to keep as much as possible of the selection being
moved visible.

13 years agolist_window: export scroll-after-cursor code
Jonathan Neuschäfer [Sat, 17 Sep 2011 20:11:04 +0000 (22:11 +0200)]
list_window: export scroll-after-cursor code

This moves the list_window_check_origin code into a new, more generic
function, which is exported.

13 years agooptions: fix the --key-file help text
Jonathan Neuschäfer [Sat, 3 Sep 2011 12:27:24 +0000 (14:27 +0200)]
options: fix the --key-file help text

13 years agoRevert "screen_queue: use list_window_move_cursor"
Jonathan Neuschäfer [Sat, 10 Sep 2011 22:02:27 +0000 (00:02 +0200)]
Revert "screen_queue: use list_window_move_cursor"

I hadn't quite understood what list_window_move_cursor does, and didn't
test the change.

This reverts commit aba25b543d7a34ce46964a7f22e495cdc3b57852.

13 years agoconfigure.ac: update comment "Check for glib-2.4"
Jonathan Neuschäfer [Fri, 16 Sep 2011 18:10:56 +0000 (20:10 +0200)]
configure.ac: update comment "Check for glib-2.4"

13 years agomain: avoid gcc warning for LOCALE && !NLS
Jonathan Neuschäfer [Thu, 15 Sep 2011 17:14:53 +0000 (19:14 +0200)]
main: avoid gcc warning for LOCALE && !NLS

Mark charset as G_GNUC_UNUSED if ncmpc hasn't been configured with NLS.

13 years agodoc/ncmpc.lirc: fix a typo ("ncmcp")
Jonathan Neuschäfer [Sun, 11 Sep 2011 08:43:43 +0000 (10:43 +0200)]
doc/ncmpc.lirc: fix a typo ("ncmcp")

13 years agooptions: remove misleading MAX_LONGOPT_LENGTH
Jonathan Neuschäfer [Sat, 3 Sep 2011 22:43:06 +0000 (00:43 +0200)]
options: remove misleading MAX_LONGOPT_LENGTH

13 years agolist_window: "if ( x)" -> "if (x)"
Jonathan Neuschäfer [Sat, 3 Sep 2011 22:26:04 +0000 (00:26 +0200)]
list_window: "if ( x)" -> "if (x)"

13 years agomanpage: update the search-mode documentation
Jonathan Neuschäfer [Thu, 25 Aug 2011 22:55:52 +0000 (00:55 +0200)]
manpage: update the search-mode documentation

13 years agoMerge remote branches 'jn/doc', 'jn/stuff' and 'jn/stuff1'
Max Kellermann [Wed, 31 Aug 2011 13:59:47 +0000 (15:59 +0200)]
Merge remote branches 'jn/doc', 'jn/stuff' and 'jn/stuff1'

13 years agoscreen_queue: use list_window_move_cursor
Jonathan Neuschäfer [Wed, 31 Aug 2011 12:27:52 +0000 (14:27 +0200)]
screen_queue: use list_window_move_cursor

It ensures the cursor stays visible.

13 years agolist_window: document list_window_center
Jonathan Neuschäfer [Wed, 31 Aug 2011 11:20:31 +0000 (13:20 +0200)]
list_window: document list_window_center

13 years agofix a typo ("connectiond")
Jonathan Neuschäfer [Wed, 31 Aug 2011 10:41:19 +0000 (12:41 +0200)]
fix a typo ("connectiond")

13 years agoplugin: fix plugin_callback_t documentation
Jonathan Neuschäfer [Sun, 21 Aug 2011 22:19:14 +0000 (00:19 +0200)]
plugin: fix plugin_callback_t documentation

13 years agoscreen_lyrics: clarify some code
Jonathan Neuschäfer [Sun, 21 Aug 2011 21:40:53 +0000 (23:40 +0200)]
screen_lyrics: clarify some code

13 years agolist_window.h: "non-zero" -> "true", we use bool
Jonathan Neuschäfer [Mon, 29 Aug 2011 19:47:23 +0000 (21:47 +0200)]
list_window.h: "non-zero" -> "true", we use bool

13 years agocommand: use RET instead of 13 for '\r'
Jonathan Neuschäfer [Sat, 27 Aug 2011 12:37:16 +0000 (14:37 +0200)]
command: use RET instead of 13 for '\r'

13 years agocommand: use KEY_CTL
Jonathan Neuschäfer [Sat, 27 Aug 2011 01:46:34 +0000 (03:46 +0200)]
command: use KEY_CTL

And add the convenience macro C().

13 years agocommand: add macro KEY_CTL()
Jonathan Neuschäfer [Sat, 27 Aug 2011 01:16:49 +0000 (03:16 +0200)]
command: add macro KEY_CTL()

I copied it from tig[1], which is licensed under the GPLv2+, so we
may use the code.

[1] http://jonas.nitro.dk/tig/

13 years agocommand: white space cosmetics
Jonathan Neuschäfer [Sat, 27 Aug 2011 01:09:19 +0000 (03:09 +0200)]
command: white space cosmetics

Restore the old idention style of the key code macros, it was
destoyed by commit f81333d (code style, indent with tabs XI).
(That's a long time ago, I know.)

13 years agoscreen_artist: document add_query (some more)
Jonathan Neuschäfer [Sat, 27 Aug 2011 00:28:28 +0000 (02:28 +0200)]
screen_artist: document add_query (some more)

13 years agoscreen_artist: don't use artist directly in add_query
Jonathan Neuschäfer [Sat, 27 Aug 2011 00:19:02 +0000 (02:19 +0200)]
screen_artist: don't use artist directly in add_query

13 years agoscreen_artist: add_query: add a "const"
Jonathan Neuschäfer [Fri, 26 Aug 2011 23:46:17 +0000 (01:46 +0200)]
screen_artist: add_query: add a "const"

13 years agoscreen_search: make SEARCH_ARTIST_TITLE part of an enum
Jonathan Neuschäfer [Fri, 26 Aug 2011 01:10:30 +0000 (03:10 +0200)]
screen_search: make SEARCH_ARTIST_TITLE part of an enum

13 years agoconf.c: unbreak two short lines, remove parentheses
Jonathan Neuschäfer [Thu, 25 Aug 2011 22:34:06 +0000 (00:34 +0200)]
conf.c: unbreak two short lines, remove parentheses

13 years agoincrease connection timeout to 5 seconds
Max Kellermann [Tue, 23 Aug 2011 16:08:51 +0000 (18:08 +0200)]
increase connection timeout to 5 seconds

1.5 seconds was not long enough for some MPD operations.  The
disadvantage is that the user may have to wait up to 5 seconds without
screen updates, because ncmpc doesn't do full asynchronous I/O yet.

13 years agompdclient: pass integer timeout to mpdclient_connect()
Max Kellermann [Tue, 23 Aug 2011 16:07:33 +0000 (18:07 +0200)]
mpdclient: pass integer timeout to mpdclient_connect()

Use milliseconds instead of float seconds.  Reduces overhead.

13 years agoscreen_lyrics: prevent a double free/use after free
Jonathan Neuschäfer [Mon, 22 Aug 2011 08:11:06 +0000 (10:11 +0200)]
screen_lyrics: prevent a double free/use after free

And a memory leak.

13 years agoimplement the "lyrics-timeout" config option
Jonathan Neuschäfer [Sat, 20 Aug 2011 20:40:50 +0000 (22:40 +0200)]
implement the "lyrics-timeout" config option

13 years agoscreen_lyrics: optionally show the plugin used
Jonathan Neuschäfer [Wed, 27 Jul 2011 18:58:18 +0000 (20:58 +0200)]
screen_lyrics: optionally show the plugin used

This feature is disabled by default, because I guess that most users
won't want to use it.

13 years agoplugin: pass the plugin name to the callback
Jonathan Neuschäfer [Wed, 27 Jul 2011 15:26:40 +0000 (17:26 +0200)]
plugin: pass the plugin name to the callback

13 years agolyricwiki: allow ampersands in artist/song names
Jonathan Neuschäfer [Mon, 8 Aug 2011 22:47:36 +0000 (00:47 +0200)]
lyricwiki: allow ampersands in artist/song names

13 years agooptions.c: use a for loop in options_parse
Jonathan Neuschäfer [Tue, 26 Jul 2011 12:49:19 +0000 (14:49 +0200)]
options.c: use a for loop in options_parse

It just looks cleaner.

13 years agoremove the rest of the splash screen
Jonathan Neuschäfer [Tue, 26 Jul 2011 11:04:12 +0000 (13:04 +0200)]
remove the rest of the splash screen

See http://musicpd.org/mantis/view.php?id=2981

13 years agoncmpc.1: document the browser color options
Jonathan Neuschäfer [Tue, 26 Jul 2011 10:17:31 +0000 (12:17 +0200)]
ncmpc.1: document the browser color options

See http://musicpd.org/mantis/view.php?id=2924

13 years agoModify version string to post-release version 0.20~git
Avuton Olrich [Sun, 24 Jul 2011 01:15:52 +0000 (18:15 -0700)]
Modify version string to post-release version 0.20~git

13 years agoncmpc version 0.19 release-0.19 v0.19
Avuton Olrich [Sun, 24 Jul 2011 01:15:52 +0000 (18:15 -0700)]
ncmpc version 0.19

13 years agopo: fix format string in Polish translation
Max Kellermann [Sat, 23 Jul 2011 19:09:10 +0000 (21:09 +0200)]
po: fix format string in Polish translation

13 years agoAUTHORS: add Jonathan Neuschäfer
Max Kellermann [Fri, 22 Jul 2011 10:46:14 +0000 (12:46 +0200)]
AUTHORS: add Jonathan Neuschäfer

13 years agopo: add Polish translation
Krzysztof Krakowiak [Wed, 20 Jul 2011 18:49:15 +0000 (20:49 +0200)]
po: add Polish translation

13 years agompdclient: fix crash after "clear" command
Max Kellermann [Wed, 20 Jul 2011 18:47:23 +0000 (20:47 +0200)]
mpdclient: fix crash after "clear" command

mpdclient_cmd_clear() calls playlist_clear(), which leaves a freed
pointer in c->song.  c->song is now cleared, too.

13 years agoworkaround for libncurses macro warnings
Max Kellermann [Mon, 18 Jul 2011 20:40:22 +0000 (22:40 +0200)]
workaround for libncurses macro warnings

13 years agoscreen_artist: fix variable name typo in assertion
Max Kellermann [Mon, 18 Jul 2011 20:43:18 +0000 (22:43 +0200)]
screen_artist: fix variable name typo in assertion

13 years agoadd missing g_free in error path
Jonathan Neuschäfer [Mon, 18 Jul 2011 10:23:50 +0000 (12:23 +0200)]
add missing g_free in error path

cppcheck detected this little bug.

13 years agopo: update German translation
Christoph Mende [Thu, 23 Jun 2011 08:59:03 +0000 (10:59 +0200)]
po: update German translation

13 years agopo: update Esperanto translation
Aleksej [Thu, 23 Jun 2011 08:58:58 +0000 (10:58 +0200)]
po: update Esperanto translation

13 years agopo: update Chinese translation
Yang Hui [Thu, 23 Jun 2011 08:58:52 +0000 (10:58 +0200)]
po: update Chinese translation

13 years agopo: update Galician translation
Miguel Anxo Bouzada [Thu, 23 Jun 2011 08:58:39 +0000 (10:58 +0200)]
po: update Galician translation

13 years agopo: update Finnish translation
Sami Sankala [Thu, 23 Jun 2011 08:58:31 +0000 (10:58 +0200)]
po: update Finnish translation

13 years agopo: update Czech translation
Zbyněk Schwarz [Thu, 23 Jun 2011 08:58:24 +0000 (10:58 +0200)]
po: update Czech translation

13 years agopo: regenerate ncmpc.pot
Max Kellermann [Thu, 23 Jun 2011 08:54:39 +0000 (10:54 +0200)]
po: regenerate ncmpc.pot

13 years agomain: *settings_name: translate "unknown"
Jonathan Neuschäfer [Wed, 15 Jun 2011 20:01:40 +0000 (22:01 +0200)]
main: *settings_name: translate "unknown"

13 years agomain: don't show (null) as the server name
Jonathan Neuschäfer [Wed, 15 Jun 2011 20:00:24 +0000 (22:00 +0200)]
main: don't show (null) as the server name

With libmpdclient older than version 2.4.0, connection_settings_name()
will return g_strdup(options.host), but options.host can be NULL.

Return g_strdup("localhost") in that case, assuming localhost is
mpd_connection_new's "default host".

13 years agouse glib regex for list_window_jump.
matt [Sat, 2 Apr 2011 17:29:26 +0000 (18:29 +0100)]
use glib regex for list_window_jump.

Compile a single regex search string in list_window_jump instead of
using g_regex_match which compiles a new one each time.

13 years agomain.c: fix compiler warning
matt [Sat, 2 Apr 2011 14:56:36 +0000 (15:56 +0100)]
main.c: fix compiler warning

src/main.c: In function ‘idle_callback’:
src/main.c:385:25: error: variable ‘connection’ set but not used [-Werror=unused-but-set-variable]

13 years agoscreen_find.c: fix backspace bug
matt [Sat, 2 Apr 2011 17:11:25 +0000 (18:11 +0100)]
screen_find.c: fix backspace bug

Use ncurses macros instead of magic numbers.

13 years agompdclient.h: fix the spelling of "occurred"
Jonathan Neuschäfer [Thu, 31 Mar 2011 19:38:57 +0000 (21:38 +0200)]
mpdclient.h: fix the spelling of "occurred"

13 years agofix malloc/free deadlock in signal handler by implementing a signaling pipe for sigco...
Emil Karlson [Fri, 7 Jan 2011 16:43:38 +0000 (17:43 +0100)]
fix malloc/free deadlock in signal handler by implementing a signaling pipe for sigcont and sigwinch signal handlers

13 years agopo: regenerate ncmpc.pot
Max Kellermann [Wed, 5 Jan 2011 20:32:43 +0000 (21:32 +0100)]
po: regenerate ncmpc.pot

Just line number changes.

13 years agopo: 2 minor fixups for Russian
Max Kellermann [Wed, 5 Jan 2011 20:31:31 +0000 (21:31 +0100)]
po: 2 minor fixups for Russian

13 years agopo: update Brazilian Portuguese translation
Jamerson Albuquerque Tiossi [Wed, 5 Jan 2011 20:13:02 +0000 (21:13 +0100)]
po: update Brazilian Portuguese translation

13 years agopo: update Italian translation
Simone Sandri [Wed, 5 Jan 2011 20:12:52 +0000 (21:12 +0100)]
po: update Italian translation

13 years agopo: update Galician translation
Miguel Anxo Bouzada [Wed, 5 Jan 2011 20:12:41 +0000 (21:12 +0100)]
po: update Galician translation

13 years agopo: update French translation
Thibault Févry [Wed, 5 Jan 2011 20:12:32 +0000 (21:12 +0100)]
po: update French translation

13 years agopo: update Spanish translation
Paco Molinero [Wed, 5 Jan 2011 20:12:26 +0000 (21:12 +0100)]
po: update Spanish translation

13 years agopo: update Esperanto translation
Aleksej [Wed, 5 Jan 2011 20:12:17 +0000 (21:12 +0100)]
po: update Esperanto translation

13 years agopo: update German translation
Mathias Gert Hennersdorf [Wed, 5 Jan 2011 20:12:02 +0000 (21:12 +0100)]
po: update German translation

13 years agopo: update Czech translation
Pavel Konkol [Wed, 5 Jan 2011 20:11:37 +0000 (21:11 +0100)]
po: update Czech translation

13 years agopo: update Russian translation
Max Arnold [Wed, 5 Jan 2011 19:49:46 +0000 (20:49 +0100)]
po: update Russian translation

13 years agomain: show real server address in status message
Max Kellermann [Thu, 23 Dec 2010 19:28:42 +0000 (20:28 +0100)]
main: show real server address in status message

Use the new mpd_settings object to determine the real server host
(libmpdclient 2.4).

13 years agoconfigure.ac: require libmpdclient 2.2
Max Kellermann [Thu, 23 Dec 2010 19:30:36 +0000 (20:30 +0100)]
configure.ac: require libmpdclient 2.2

We need a sane LIBMPDCLIENT_CHECK_VERSION macro.

14 years agoModify version string to post-release version 0.19~git
Avuton Olrich [Thu, 23 Sep 2010 01:48:39 +0000 (18:48 -0700)]
Modify version string to post-release version 0.19~git

14 years agoncmpc version 0.18 release-0.18 v0.18
Avuton Olrich [Thu, 23 Sep 2010 01:48:39 +0000 (18:48 -0700)]
ncmpc version 0.18

14 years agopo: regenerate ncmpc.pot
Max Kellermann [Wed, 22 Sep 2010 16:19:44 +0000 (18:19 +0200)]
po: regenerate ncmpc.pot

14 years agoan i18n fix
Jonathan Neuschäfer [Sat, 21 Aug 2010 18:29:23 +0000 (20:29 +0200)]
an i18n fix

14 years agoscreen_artist: respect artist when adding albums
Jonathan Neuschäfer [Sat, 21 Aug 2010 18:26:20 +0000 (20:26 +0200)]
screen_artist: respect artist when adding albums

14 years agopo: update Brazilian Portuguese translation
Guilherme Lindner [Tue, 7 Sep 2010 18:41:00 +0000 (20:41 +0200)]
po: update Brazilian Portuguese translation

14 years agopo: update Hungarian translation
Kiszel Kristóf [Tue, 7 Sep 2010 18:36:38 +0000 (20:36 +0200)]
po: update Hungarian translation

14 years agopo: update Hebrew translation
Itai Kloog [Tue, 7 Sep 2010 18:35:40 +0000 (20:35 +0200)]
po: update Hebrew translation

14 years agodoc: Updated manpage. sh/next
Sebastian Harl [Fri, 30 Jul 2010 12:25:06 +0000 (14:25 +0200)]
doc: Updated manpage.

Added -m/-M options; fixed -S/--no-splash option.

As reported by Martin Hradil in Debian bug #589660.

14 years agoscreen_song: show song range
Max Kellermann [Sun, 25 Jul 2010 12:48:31 +0000 (14:48 +0200)]
screen_song: show song range

14 years agoscreen_artist: tracks w/o album tag != all tracks
Jonathan Neuschäfer [Wed, 14 Jul 2010 14:33:26 +0000 (16:33 +0200)]
screen_artist: tracks w/o album tag != all tracks

The `album' variable used to store a pointer to an empty string, which was
somewhere in memory, for the virtual album `All tracks', but this didn't allow
seeing all tracks without an album tag as one album.
Now, the address of the char array `ALL_TRACKS' is assigned to `album', when
`All Tracks' are viewed.

14 years agooptions.c: Read mpd host from environment if not specified.
Daniel Friesel [Fri, 30 Apr 2010 17:05:11 +0000 (19:05 +0200)]
options.c: Read mpd host from environment if not specified.

This fixes the "Connecting to localhost" message if "MPD_HOST=mpd ncmpc" is used.

14 years agolyrics/leoslyrics: don't print backtrace on HTTP failure
Anthoine Bourgeois [Wed, 21 Jul 2010 06:02:09 +0000 (08:02 +0200)]
lyrics/leoslyrics: don't print backtrace on HTTP failure

14 years agopo: update German translation
Mathias Gert Hennersdorf [Wed, 21 Jul 2010 05:56:11 +0000 (07:56 +0200)]
po: update German translation

14 years agopo: update Norwegian Bokmal translation
Mathias Bøhn Grytemark [Wed, 21 Jul 2010 05:44:24 +0000 (07:44 +0200)]
po: update Norwegian Bokmal translation

14 years agoscreen_help: remove CMD_SCREEN_SONG if song screen is disabled
Ihar Hrachyshka [Wed, 21 Jul 2010 05:43:01 +0000 (07:43 +0200)]
screen_help: remove CMD_SCREEN_SONG if song screen is disabled

This fixes a NULL pointer dereference, caused by
get_key_names(CMD_SCREEN_SONG)==NULL.

14 years agoMakefile.am: add GLIB_LIBS to _LDADD
Kacper Kowalik [Wed, 14 Jul 2010 06:10:04 +0000 (08:10 +0200)]
Makefile.am: add GLIB_LIBS to _LDADD

Adding GLIB_LIBS to _LDFLAGS instead of _LDADD lead to build error
when using -Wl,--as-needed.

14 years agopo: update Spanish translation
Luis Miguel Domínguez Peinado [Thu, 1 Jul 2010 07:27:43 +0000 (09:27 +0200)]
po: update Spanish translation

14 years agopo: added Italian translation
Luis Miguel Domínguez Peinado [Thu, 1 Jul 2010 07:20:35 +0000 (09:20 +0200)]
po: added Italian translation

14 years agopo: update Galician translation
Miguel Anxo Bouzada [Thu, 1 Jul 2010 07:25:59 +0000 (09:25 +0200)]
po: update Galician translation

14 years agoModify version string to post-release version 0.18~git
Avuton Olrich [Wed, 23 Jun 2010 01:13:01 +0000 (18:13 -0700)]
Modify version string to post-release version 0.18~git

14 years agoncmpc version 0.17 release-0.17 v0.17
Avuton Olrich [Wed, 23 Jun 2010 01:13:01 +0000 (18:13 -0700)]
ncmpc version 0.17

14 years agopo: updated Swedish translation
Rickard Närström [Sat, 19 Jun 2010 15:36:26 +0000 (17:36 +0200)]
po: updated Swedish translation