Code

ncmpc.git
22 months agorelease v0.29 master v0.29
Max Kellermann [Sun, 5 Nov 2017 16:32:50 +0000 (17:32 +0100)]
release v0.29

22 months agomeson.build: fallback libncurses detection without pkg-config
Max Kellermann [Sun, 5 Nov 2017 16:31:31 +0000 (17:31 +0100)]
meson.build: fallback libncurses detection without pkg-config

Previously, failure to find libncurses was silently ignored, leading
to compiler or linker errors.

Closes #6

22 months agoadd Meson option "lyrics_plugin_dir"
Max Kellermann [Sun, 5 Nov 2017 16:24:09 +0000 (17:24 +0100)]
add Meson option "lyrics_plugin_dir"

The option "--with-lyrics-plugin-dir" was lost in the Meson
transition.

Closes #7

22 months agoaconnect: remove bogus assertions
Max Kellermann [Sun, 5 Nov 2017 16:18:28 +0000 (17:18 +0100)]
aconnect: remove bogus assertions

async_rconnect_start() attempts to resolve the host name before it
allocates a struct async_rconnect, and therefore the error callback
may be invoked before "*rcp" gets assigned.

The solution is trivial: remove those assertions, because they are
wrong.

Closes #10

23 months agompdclient: check source again after mpd_glib_leave()
Max Kellermann [Tue, 17 Oct 2017 13:56:06 +0000 (15:56 +0200)]
mpdclient: check source again after mpd_glib_leave()

Just in case mpd_glib_leave() has found an error and had to close the
connection, check it again to avoid an assertion failure (or crash) in
mpdclient_schedule_enter_idle().

Closes #9

23 months agoincrement version number to 0.29
Max Kellermann [Tue, 17 Oct 2017 13:53:12 +0000 (15:53 +0200)]
increment version number to 0.29

23 months agorelease v0.28 v0.28
Max Kellermann [Thu, 21 Sep 2017 08:29:09 +0000 (10:29 +0200)]
release v0.28

23 months agoresolver: set the correct address size for local/abstract sockets
Max Kellermann [Thu, 21 Sep 2017 08:26:28 +0000 (10:26 +0200)]
resolver: set the correct address size for local/abstract sockets

Limit the socklen_t to the real path length, and omit the trailing
null terminator in abstract sockets.

23 months agosignals: eliminate stdbool.h
Max Kellermann [Thu, 21 Sep 2017 07:38:01 +0000 (09:38 +0200)]
signals: eliminate stdbool.h

23 months agosignals: add missing include
Max Kellermann [Thu, 21 Sep 2017 07:43:59 +0000 (09:43 +0200)]
signals: add missing include

23 months agomeson.build: define _GNU_SOURCE for getaddrinfo() and sigaction() with glibc
Max Kellermann [Thu, 21 Sep 2017 07:43:07 +0000 (09:43 +0200)]
meson.build: define _GNU_SOURCE for getaddrinfo() and sigaction() with glibc

This appears to be necessary with older glibc versions (2.19 requires
it, 2.24 does not).

23 months agodoc/ncmpc.1: update connection setup, add local socket
Max Kellermann [Thu, 21 Sep 2017 07:23:38 +0000 (09:23 +0200)]
doc/ncmpc.1: update connection setup, add local socket

23 months agodoc/ncmpc.1: replace obsolete Mantis link
Max Kellermann [Thu, 21 Sep 2017 07:17:18 +0000 (09:17 +0200)]
doc/ncmpc.1: replace obsolete Mantis link

23 months agompdclient: implement password for asynchronous connect
Max Kellermann [Thu, 21 Sep 2017 06:51:19 +0000 (08:51 +0200)]
mpdclient: implement password for asynchronous connect

Closes #5

2 years agomeson.build: Set ENABLE_COLORS
Colin Benner [Thu, 7 Sep 2017 09:12:29 +0000 (11:12 +0200)]
meson.build: Set ENABLE_COLORS

2 years agoUpdate Russian translation
Max Arnold [Tue, 5 Sep 2017 13:49:50 +0000 (20:49 +0700)]
Update Russian translation

2 years agoscreen_interface: add method mouse(), replacing CMD_MOUSE_EVENT
Max Kellermann [Wed, 2 Aug 2017 07:51:31 +0000 (09:51 +0200)]
screen_interface: add method mouse(), replacing CMD_MOUSE_EVENT

2 years agoscreen_queue: re-add NULL check
Max Kellermann [Wed, 2 Aug 2017 07:40:14 +0000 (09:40 +0200)]
screen_queue: re-add NULL check

It accidently got lost in 885d6cf20ac418dacdf999f7cbdfc684fdc3e735

2 years agoscreen_queue: use mpdclient_settings_name() for the title
Max Kellermann [Wed, 2 Aug 2017 07:26:04 +0000 (09:26 +0200)]
screen_queue: use mpdclient_settings_name() for the title

Simplifies commit 23041f39c7c7e1d119ffe2f6239cc3a2f1248e1a

2 years agoscreen_queue: no typedef for completion_callback_data_t
Max Kellermann [Wed, 2 Aug 2017 07:30:05 +0000 (09:30 +0200)]
screen_queue: no typedef for completion_callback_data_t

2 years agoscreen_queue: move the completion_callback_data_t type down
Max Kellermann [Wed, 2 Aug 2017 07:29:31 +0000 (09:29 +0200)]
screen_queue: move the completion_callback_data_t type down

2 years agooptions: don't override the libmpdclient default timeout
Max Kellermann [Wed, 2 Aug 2017 07:18:13 +0000 (09:18 +0200)]
options: don't override the libmpdclient default timeout

libmpdclient's default is 30s, which is just as good as our 5s
timeout.  Why change that with extra code?

2 years agoscreen_queue: hide the MPD password in the screen title
Max Kellermann [Wed, 2 Aug 2017 06:33:00 +0000 (08:33 +0200)]
screen_queue: hide the MPD password in the screen title

Closes #2

2 years agoinitial travis file
Max Kellermann [Mon, 31 Jul 2017 21:26:23 +0000 (23:26 +0200)]
initial travis file

2 years agomeson_options.txt: add missing default values
Max Kellermann [Mon, 31 Jul 2017 21:28:18 +0000 (23:28 +0200)]
meson_options.txt: add missing default values

2 years agomeson.build: fix build with meson > 0.38.1
ilovezfs [Sat, 22 Jul 2017 10:50:24 +0000 (03:50 -0700)]
meson.build: fix build with meson > 0.38.1

Fixes the error "Tried to form an absolute path to a source dir. You
should not do that but use relative paths instead."

2 years agobuild with Meson instead of autotools
Max Kellermann [Wed, 19 Jul 2017 23:37:50 +0000 (01:37 +0200)]
build with Meson instead of autotools

2 years agoREADME.rst: reformat the "Links" section
Max Kellermann [Mon, 24 Apr 2017 07:24:14 +0000 (09:24 +0200)]
README.rst: reformat the "Links" section

2 years agoREADME.rst: bug tracking now on GitHub
Max Kellermann [Mon, 24 Apr 2017 07:02:43 +0000 (09:02 +0200)]
README.rst: bug tracking now on GitHub

2 years agoREADME.rst: use double backticks
Max Kellermann [Mon, 24 Apr 2017 07:01:35 +0000 (09:01 +0200)]
README.rst: use double backticks

2 years agoREADME.rst: remove unnecessary text
Max Kellermann [Mon, 24 Apr 2017 07:01:18 +0000 (09:01 +0200)]
README.rst: remove unnecessary text

2 years agoREADME: convert to reStructuredText
Max Kellermann [Fri, 21 Apr 2017 13:17:19 +0000 (15:17 +0200)]
README: convert to reStructuredText

2 years agoconf: merge two translatable strings
Max Kellermann [Tue, 28 Mar 2017 21:28:02 +0000 (23:28 +0200)]
conf: merge two translatable strings

2 years agoconf: extract name and value from the input line in-place
Max Kellermann [Tue, 28 Mar 2017 20:52:22 +0000 (22:52 +0200)]
conf: extract name and value from the input line in-place

No copies to a stack buffer.

2 years agoconf: cheap replacement for g_strchug()
Max Kellermann [Tue, 28 Mar 2017 21:17:19 +0000 (23:17 +0200)]
conf: cheap replacement for g_strchug()

2 years agoscreen_song: fix memory leak
Max Kellermann [Tue, 28 Mar 2017 20:29:50 +0000 (22:29 +0200)]
screen_song: fix memory leak

2 years agoplugin: fix crash
Felix [Tue, 28 Mar 2017 18:34:46 +0000 (20:34 +0200)]
plugin: fix crash

2 years agoincrement version number to 0.28
Max Kellermann [Tue, 28 Mar 2017 18:32:27 +0000 (20:32 +0200)]
increment version number to 0.28

2 years agorelease v0.27 v0.27
Max Kellermann [Sat, 25 Mar 2017 20:35:42 +0000 (21:35 +0100)]
release v0.27

2 years agoaconnect: remove redundant #include, fixes windows build
Max Kellermann [Sat, 25 Mar 2017 20:35:09 +0000 (21:35 +0100)]
aconnect: remove redundant #include, fixes windows build

2 years agonet/async_connect: add missing include for socklen_t
Max Kellermann [Sat, 25 Mar 2017 20:34:03 +0000 (21:34 +0100)]
net/async_connect: add missing include for socklen_t

2 years agowreadln: fix #ifdef for WIN32
Max Kellermann [Sat, 25 Mar 2017 20:32:43 +0000 (21:32 +0100)]
wreadln: fix #ifdef for WIN32

2 years agompdclient: try IP connect if default local socket path fails
Max Kellermann [Sat, 25 Mar 2017 19:09:57 +0000 (20:09 +0100)]
mpdclient: try IP connect if default local socket path fails

This is what libmpdclient does internally, and when ncmpc copied some
code from libmpdclient, it did not replicate this implementation
detail.

 https://bugs.musicpd.org/view.php?id=4672

2 years agompdclient: move aconnect_start() call to a separate function
Max Kellermann [Sat, 25 Mar 2017 19:53:35 +0000 (20:53 +0100)]
mpdclient: move aconnect_start() call to a separate function

2 years agomain: move default_settings_name() to mpdclient.c
Max Kellermann [Sat, 25 Mar 2017 19:37:13 +0000 (20:37 +0100)]
main: move default_settings_name() to mpdclient.c

2 years agoaconnect: assign variable first, then start connect
Max Kellermann [Sat, 25 Mar 2017 19:20:30 +0000 (20:20 +0100)]
aconnect: assign variable first, then start connect

Fixes bogus assertion failure.

2 years agoutils: move format_duration_*() to time_format.c
Max Kellermann [Tue, 21 Mar 2017 21:41:58 +0000 (22:41 +0100)]
utils: move format_duration_*() to time_format.c

2 years agodb_completion: use g_strconcat()
Max Kellermann [Tue, 21 Mar 2017 21:36:27 +0000 (22:36 +0100)]
db_completion: use g_strconcat()

2 years agoutils: move gcmp_list_from_path() to db_completion.c
Max Kellermann [Tue, 21 Mar 2017 21:29:59 +0000 (22:29 +0100)]
utils: move gcmp_list_from_path() to db_completion.c

2 years agowreadln: call g_list_length() only once
Max Kellermann [Tue, 21 Mar 2017 21:28:14 +0000 (22:28 +0100)]
wreadln: call g_list_length() only once

2 years agocolors, utils: use g_list_free_full(g_free)
Max Kellermann [Tue, 21 Mar 2017 21:05:10 +0000 (22:05 +0100)]
colors, utils: use g_list_free_full(g_free)

2 years agocolors: return bool instead of int
Max Kellermann [Tue, 21 Mar 2017 20:42:27 +0000 (21:42 +0100)]
colors: return bool instead of int

2 years agocolors: colors_update_pair(), colors_start() and colors_use() return void
Max Kellermann [Tue, 21 Mar 2017 20:42:52 +0000 (21:42 +0100)]
colors: colors_update_pair(), colors_start() and colors_use() return void

2 years agolist_window: convert comments to doxygen
Max Kellermann [Tue, 21 Mar 2017 20:13:47 +0000 (21:13 +0100)]
list_window: convert comments to doxygen

2 years agosave_playlist: move NULL check up
Max Kellermann [Mon, 20 Mar 2017 21:00:20 +0000 (22:00 +0100)]
save_playlist: move NULL check up

2 years agoscreen_queue: move playlist_save() to save_playlist.c
Max Kellermann [Mon, 20 Mar 2017 20:45:50 +0000 (21:45 +0100)]
screen_queue: move playlist_save() to save_playlist.c

2 years agopo: update ncmpc.pot
Max Kellermann [Mon, 20 Mar 2017 20:12:11 +0000 (21:12 +0100)]
po: update ncmpc.pot

2 years agoscreen_utils: automatically append "[y/n]"
Max Kellermann [Mon, 20 Mar 2017 20:09:39 +0000 (21:09 +0100)]
screen_utils: automatically append "[y/n]"

2 years agopo: update ncmpc.pot
Max Kellermann [Mon, 20 Mar 2017 20:04:59 +0000 (21:04 +0100)]
po: update ncmpc.pot

2 years agopo/POTFILES.in: add new source files
Max Kellermann [Mon, 20 Mar 2017 20:03:31 +0000 (21:03 +0100)]
po/POTFILES.in: add new source files

2 years agopo/POTFILES.in: sort
Max Kellermann [Mon, 20 Mar 2017 20:02:38 +0000 (21:02 +0100)]
po/POTFILES.in: sort

2 years agocolors: simplify i18n strings
Max Kellermann [Mon, 20 Mar 2017 20:00:58 +0000 (21:00 +0100)]
colors: simplify i18n strings

2 years agoscreen: move code to screen_init.c
Max Kellermann [Mon, 20 Mar 2017 19:51:40 +0000 (20:51 +0100)]
screen: move code to screen_init.c

2 years agoscreen: move screen_paint() to screen_paint.c
Max Kellermann [Mon, 20 Mar 2017 19:37:33 +0000 (20:37 +0100)]
screen: move screen_paint() to screen_paint.c

2 years agoscreen: move mode_fn into struct screen
Max Kellermann [Mon, 20 Mar 2017 19:46:42 +0000 (20:46 +0100)]
screen: move mode_fn into struct screen

2 years agoscreen: make cols and rows local
Max Kellermann [Mon, 20 Mar 2017 19:41:37 +0000 (20:41 +0100)]
screen: make cols and rows local

2 years agoscreen: rename screen_refresh() to screen_paint()
Max Kellermann [Mon, 20 Mar 2017 19:35:59 +0000 (20:35 +0100)]
screen: rename screen_refresh() to screen_paint()

2 years agoscreen: move code to paint_top_window()
Max Kellermann [Mon, 20 Mar 2017 19:34:27 +0000 (20:34 +0100)]
screen: move code to paint_top_window()

2 years agoplugin: use g_idle_add() instead of g_timeout_add(0)
Max Kellermann [Mon, 20 Mar 2017 19:27:22 +0000 (20:27 +0100)]
plugin: use g_idle_add() instead of g_timeout_add(0)

2 years agouse g_timeout_add_seconds() where appropriate
Max Kellermann [Mon, 20 Mar 2017 19:26:42 +0000 (20:26 +0100)]
use g_timeout_add_seconds() where appropriate

2 years agokeyboard: no begin/end_input_event() on unknown key codes
Max Kellermann [Mon, 20 Mar 2017 19:02:01 +0000 (20:02 +0100)]
keyboard: no begin/end_input_event() on unknown key codes

2 years agokeyboard: move code to ignore_key()
Max Kellermann [Mon, 20 Mar 2017 19:00:09 +0000 (20:00 +0100)]
keyboard: move code to ignore_key()

2 years agoscreen_interface: make cols/rows unsigned
Max Kellermann [Mon, 20 Mar 2017 16:35:59 +0000 (17:35 +0100)]
screen_interface: make cols/rows unsigned

2 years agoscreen_utils: move KEY_MOUSE check to ignore_key(), avoid recursion
Max Kellermann [Mon, 20 Mar 2017 16:17:36 +0000 (17:17 +0100)]
screen_utils: move KEY_MOUSE check to ignore_key(), avoid recursion

2 years agoscreen_utils: move check to ignore_key()
Max Kellermann [Mon, 20 Mar 2017 16:16:35 +0000 (17:16 +0100)]
screen_utils: move check to ignore_key()

2 years agoxterm_title: use getenv() instead of g_getenv()
Max Kellermann [Mon, 20 Mar 2017 16:07:43 +0000 (17:07 +0100)]
xterm_title: use getenv() instead of g_getenv()

2 years agoxterm_title: simplify if/else chains
Max Kellermann [Mon, 20 Mar 2017 16:06:47 +0000 (17:06 +0100)]
xterm_title: simplify if/else chains

2 years agomain: improve strfsong() error check
Max Kellermann [Mon, 20 Mar 2017 16:06:02 +0000 (17:06 +0100)]
main: improve strfsong() error check

2 years agomain: check for strfsong() failure, add fallback
Max Kellermann [Mon, 20 Mar 2017 16:04:21 +0000 (17:04 +0100)]
main: check for strfsong() failure, add fallback

2 years agoxterm_title: pass string, no format
Max Kellermann [Mon, 20 Mar 2017 16:02:00 +0000 (17:02 +0100)]
xterm_title: pass string, no format

2 years agoscreen_utils: move set_xterm_title() to xterm_title.c
Max Kellermann [Mon, 20 Mar 2017 15:59:50 +0000 (16:59 +0100)]
screen_utils: move set_xterm_title() to xterm_title.c

2 years agostatus_bar: remove the status bar clock (option "display-time")
Max Kellermann [Mon, 20 Mar 2017 15:47:59 +0000 (16:47 +0100)]
status_bar: remove the status bar clock (option "display-time")

This is a pretty useless feature which is only available when not
playing something - a state in which ncmpc isn't useful either.  What
the clock does is require a timer which wakes up ncmpc every second,
when it should better be completely idle (and swapped out).

2 years agomain: no delay for initial collect
Max Kellermann [Mon, 20 Mar 2017 15:41:58 +0000 (16:41 +0100)]
main: no delay for initial collect

2 years agoscreen: remove redundant #ifndef
Max Kellermann [Mon, 20 Mar 2017 15:39:53 +0000 (16:39 +0100)]
screen: remove redundant #ifndef

2 years agoscreen: remove unnecessary paint calls from screen_resize()
Max Kellermann [Mon, 20 Mar 2017 15:37:45 +0000 (16:37 +0100)]
screen: remove unnecessary paint calls from screen_resize()

This will be done again by the following screen_paint() call.

2 years agoscreen: remove unnecessary paint calls from screen_init()
Max Kellermann [Mon, 20 Mar 2017 15:35:07 +0000 (16:35 +0100)]
screen: remove unnecessary paint calls from screen_init()

This will be painted right before entering the main loop.

2 years agoincrement version number to 0.27
Max Kellermann [Mon, 20 Mar 2017 15:24:36 +0000 (16:24 +0100)]
increment version number to 0.27

2 years agorelease v0.26 v0.26
Max Kellermann [Mon, 20 Mar 2017 12:45:01 +0000 (13:45 +0100)]
release v0.26

2 years agopo: update ncmpc.pot
Max Kellermann [Mon, 20 Mar 2017 12:44:46 +0000 (13:44 +0100)]
po: update ncmpc.pot

2 years agoscreen_song: don't translate printf formats
Max Kellermann [Mon, 20 Mar 2017 12:43:09 +0000 (13:43 +0100)]
screen_song: don't translate printf formats

2 years agoMakefile.am: use CURSES_LIBS instead of CURSES_LIB
Max Kellermann [Mon, 20 Mar 2017 12:41:07 +0000 (13:41 +0100)]
Makefile.am: use CURSES_LIBS instead of CURSES_LIB

2 years agoscreen_*: eliminate redundant wrefresh() calls
Max Kellermann [Mon, 20 Mar 2017 12:08:01 +0000 (13:08 +0100)]
screen_*: eliminate redundant wrefresh() calls

This is already called by screen_refresh().

2 years agoscreen: merge duplicate code from screen_paint() and screen_update()
Max Kellermann [Mon, 20 Mar 2017 11:53:39 +0000 (12:53 +0100)]
screen: merge duplicate code from screen_paint() and screen_update()

2 years agoscreen_browser: include cleanup
Max Kellermann [Mon, 20 Mar 2017 11:40:46 +0000 (12:40 +0100)]
screen_browser: include cleanup

2 years agoscreen: remove unnecessary doupdate() call from screen_init()
Max Kellermann [Mon, 20 Mar 2017 11:34:00 +0000 (12:34 +0100)]
screen: remove unnecessary doupdate() call from screen_init()

main() will call screen_paint() before entering the main loop, so this
saves a few bytes of stdout transfer.

2 years agoscreen_utils: remove redundant doupdate() call
Max Kellermann [Mon, 20 Mar 2017 11:30:54 +0000 (12:30 +0100)]
screen_utils: remove redundant doupdate() call

wrefresh() implies doupdate().

2 years agokeyboard: call wgetch() on main window
Max Kellermann [Mon, 20 Mar 2017 10:28:21 +0000 (11:28 +0100)]
keyboard: call wgetch() on main window

This erases all the windows, and requires them to repaint.  Strangely,
ncurses does this only in color mode.  Anyway, this greatly reduces
the amount of data transferred to stdout, and fixes the flickering
problems.

2 years agokeyboard: implement keyboard_unread() without ungetch()
Max Kellermann [Mon, 20 Mar 2017 11:19:29 +0000 (12:19 +0100)]
keyboard: implement keyboard_unread() without ungetch()

2 years agokeyboard: move code to translate_key()
Max Kellermann [Mon, 20 Mar 2017 11:18:48 +0000 (12:18 +0100)]
keyboard: move code to translate_key()

2 years agokeyboard: add keyboard_unread()
Max Kellermann [Mon, 20 Mar 2017 11:14:54 +0000 (12:14 +0100)]
keyboard: add keyboard_unread()