ncmpc-debian.git
22 months agoQueue: add FindIdByUri()
Max Kellermann [Tue, 4 Sep 2018 08:20:04 +0000 (10:20 +0200)]
Queue: add FindIdByUri()

22 months agoQueue: rename and document the Find*() methods
Max Kellermann [Tue, 4 Sep 2018 08:01:30 +0000 (10:01 +0200)]
Queue: rename and document the Find*() methods

Clarify their meaning.  This is obviously necessary because it has led
to bug #27.  To make it even worse, an attempt to fix that bug in
commit 08f864133ccf92c5839257531dab73827dd3d148 has produced another
bug.

22 months agoRevert "Enqueue from search list goes to wrong song"
Max Kellermann [Tue, 4 Sep 2018 07:59:22 +0000 (09:59 +0200)]
Revert "Enqueue from search list goes to wrong song"

This reverts commit 08f864133ccf92c5839257531dab73827dd3d148.  The
commit causes an endless loop when deselecting a song in the database
browser.

22 months agomeson_options.txt: make "-Ddocumentation" a combo
Max Kellermann [Mon, 3 Sep 2018 21:00:08 +0000 (23:00 +0200)]
meson_options.txt: make "-Ddocumentation" a combo

22 months agodoc/meson.build: the "documentation" option affects Sphinx as well
Max Kellermann [Mon, 3 Sep 2018 21:00:28 +0000 (23:00 +0200)]
doc/meson.build: the "documentation" option affects Sphinx as well

22 months agoconf: support $XDG_CONFIG_HOME
Max Kellermann [Mon, 3 Sep 2018 20:48:41 +0000 (22:48 +0200)]
conf: support $XDG_CONFIG_HOME

Closes #24

22 months agodoc: remove stray ":command"
Max Kellermann [Mon, 3 Sep 2018 20:57:30 +0000 (22:57 +0200)]
doc: remove stray ":command"

22 months agoconf: use CamelCase and return std::string
Max Kellermann [Mon, 3 Sep 2018 20:29:51 +0000 (22:29 +0200)]
conf: use CamelCase and return std::string

22 months agoconf: pass const string to read_rc_file()
Max Kellermann [Mon, 3 Sep 2018 20:36:36 +0000 (22:36 +0200)]
conf: pass const string to read_rc_file()

22 months agoconf: make build_user_key_binding_filename() static
Max Kellermann [Mon, 3 Sep 2018 20:30:29 +0000 (22:30 +0200)]
conf: make build_user_key_binding_filename() static

22 months agoio/Path: add generic template declaration
Max Kellermann [Mon, 3 Sep 2018 20:38:51 +0000 (22:38 +0200)]
io/Path: add generic template declaration

Fixes compiler errors with some combinations of arguments.

22 months agoconf: add MakeUserConfigDirectory(), replacing check_user_conf_dir()
Max Kellermann [Mon, 3 Sep 2018 08:25:13 +0000 (10:25 +0200)]
conf: add MakeUserConfigDirectory(), replacing check_user_conf_dir()

Prepare for XDG support.

22 months agoio/Path: new library replacing g_build_filename()
Max Kellermann [Mon, 3 Sep 2018 19:23:50 +0000 (21:23 +0200)]
io/Path: new library replacing g_build_filename()

22 months agoutil/StringStrip: add "nonnull" attributes
Max Kellermann [Mon, 3 Sep 2018 19:16:21 +0000 (21:16 +0200)]
util/StringStrip: add "nonnull" attributes

22 months agoMain: keep current song in xterm title when MPD is paused
Max Kellermann [Mon, 3 Sep 2018 19:07:12 +0000 (21:07 +0200)]
Main: keep current song in xterm title when MPD is paused

22 months agoconf: add macros for configuration file names
Max Kellermann [Mon, 3 Sep 2018 08:48:38 +0000 (10:48 +0200)]
conf: add macros for configuration file names

22 months agocheck _WIN32 instead of WIN32
Max Kellermann [Mon, 3 Sep 2018 08:49:37 +0000 (10:49 +0200)]
check _WIN32 instead of WIN32

_WIN32 is the one defined by the compiler which always works, even
without including Windows headers first.

22 months agoutil/ScopeExit: new utility library
Max Kellermann [Mon, 3 Sep 2018 08:33:25 +0000 (10:33 +0200)]
util/ScopeExit: new utility library

22 months agoscreen_keydef: isolate "Error" as translatable string
Max Kellermann [Mon, 3 Sep 2018 07:56:26 +0000 (09:56 +0200)]
screen_keydef: isolate "Error" as translatable string

Eliminates two translatable strings.

22 months agoMerge branch 'master' of git://github.com/paradox-ptr/ncmpc
Max Kellermann [Mon, 3 Sep 2018 07:31:56 +0000 (09:31 +0200)]
Merge branch 'master' of git://github.com/paradox-ptr/ncmpc

22 months agomeson.build: disable `-Wformat-truncation`
Max Kellermann [Mon, 3 Sep 2018 07:09:40 +0000 (09:09 +0200)]
meson.build: disable `-Wformat-truncation`

22 months agobuild/configure.py: add clang builds
Max Kellermann [Mon, 3 Sep 2018 07:00:11 +0000 (09:00 +0200)]
build/configure.py: add clang builds

22 months agoLyricsPage: replace `switch` with ternary operator
Max Kellermann [Mon, 3 Sep 2018 07:07:07 +0000 (09:07 +0200)]
LyricsPage: replace `switch` with ternary operator

22 months agooptions: add `noreturn` attribute to option_error()
Max Kellermann [Mon, 3 Sep 2018 07:06:14 +0000 (09:06 +0200)]
options: add `noreturn` attribute to option_error()

22 months agoscreen_keydef: remove unused attribute
Max Kellermann [Mon, 3 Sep 2018 07:05:22 +0000 (09:05 +0200)]
screen_keydef: remove unused attribute

22 months agoscreen_utils: remove std::move() to allow copy elision
Max Kellermann [Mon, 3 Sep 2018 07:03:58 +0000 (09:03 +0200)]
screen_utils: remove std::move() to allow copy elision

Thanks to clang's `-Wpessimizing-move`.

22 months agoListWindow: declare as class
Max Kellermann [Mon, 3 Sep 2018 07:02:32 +0000 (09:02 +0200)]
ListWindow: declare as class

22 months agomeson.build: don't use compiler.has_argument() for linker flags
Max Kellermann [Mon, 3 Sep 2018 06:46:21 +0000 (08:46 +0200)]
meson.build: don't use compiler.has_argument() for linker flags

This doesn't work; Meson's "compiler" object doesn't verify linker
flags and the test always passes.

Instead, the caller needs to pass linker flags to the LDFLAGS
environment variable.  For example, this commit move these flags to
build/configure.py.

22 months agoEnqueue from search list goes to wrong song
paradox_ptr [Fri, 3 Aug 2018 13:54:02 +0000 (23:54 +1000)]
Enqueue from search list goes to wrong song

Closes #27

22 months agoProgressBar: fix 'progressbar-background' doc entry
Todd Zullinger [Sat, 18 Aug 2018 22:04:55 +0000 (18:04 -0400)]
ProgressBar: fix 'progressbar-background' doc entry

The 'progressbar-background' option was added in 74c9243 ("ProgressBar:
dark gray background line", 2018-02-25).  The documentation incorrectly
refers to 'progressbar'.

23 months agoSilence unitialized variable gcc warning
paradox_ptr [Wed, 1 Aug 2018 14:36:09 +0000 (00:36 +1000)]
Silence unitialized variable gcc warning

23 months agoSilence unitialized variable gcc warning
paradox_ptr [Tue, 31 Jul 2018 10:55:13 +0000 (20:55 +1000)]
Silence unitialized variable gcc warning

2 years agoMerge branch 'master' of git://github.com/Morgus/ncmpc
Max Kellermann [Tue, 10 Apr 2018 07:26:18 +0000 (09:26 +0200)]
Merge branch 'master' of git://github.com/Morgus/ncmpc

2 years agoincrement version number to 0.31
Max Kellermann [Tue, 10 Apr 2018 07:25:05 +0000 (09:25 +0200)]
increment version number to 0.31

2 years agoFix blank progressbar when colors are not in use
Aleksi Blinnikka [Mon, 9 Apr 2018 23:33:30 +0000 (02:33 +0300)]
Fix blank progressbar when colors are not in use

When moving wbkgd() call in 9c22a95 it was not conditional like it was
for others (commits 7946611 and 6b337bc), which caused progress bar to
not show.

2 years agorelease v0.30
Max Kellermann [Wed, 4 Apr 2018 08:23:50 +0000 (10:23 +0200)]
release v0.30

2 years agoNEWS: mention that ncmpc is now C++
Max Kellermann [Wed, 4 Apr 2018 08:23:44 +0000 (10:23 +0200)]
NEWS: mention that ncmpc is now C++

2 years agoNEWS: mention the chat screen crash bug fix
Max Kellermann [Wed, 4 Apr 2018 08:20:05 +0000 (10:20 +0200)]
NEWS: mention the chat screen crash bug fix

Without knowing the bug, I fixed CVE-2018-9240 in commit
1cd20d1326c716b36286369c690fba5ee546946c while refactoring code.

2 years agoQueue: clear the vector in clear()
Max Kellermann [Mon, 19 Mar 2018 10:38:17 +0000 (11:38 +0100)]
Queue: clear the vector in clear()

Fixes regression from commit bdaf506c12dfcfa39499ba4aba26d8db77aa4e7b

2 years agosong_paint: include cleanup
Max Kellermann [Mon, 19 Mar 2018 09:10:03 +0000 (10:10 +0100)]
song_paint: include cleanup

2 years agoutil/{CharUtil,StringStrip}: more GLib replacements
Max Kellermann [Mon, 19 Mar 2018 09:07:26 +0000 (10:07 +0100)]
util/{CharUtil,StringStrip}: more GLib replacements

2 years agoSongPage: use strftime() instead of g_date_strftime()
Max Kellermann [Mon, 19 Mar 2018 09:02:26 +0000 (10:02 +0100)]
SongPage: use strftime() instead of g_date_strftime()

2 years agoutil/Macros: replacement for G_N_ELEMENTS()
Max Kellermann [Mon, 19 Mar 2018 08:58:41 +0000 (09:58 +0100)]
util/Macros: replacement for G_N_ELEMENTS()

2 years agoscreen_utils: use plain C types, not GLib
Max Kellermann [Mon, 19 Mar 2018 08:53:29 +0000 (09:53 +0100)]
screen_utils: use plain C types, not GLib

2 years agoChatPage, ...: use snprintf() instead of g_strdup_printf()
Max Kellermann [Mon, 19 Mar 2018 08:38:13 +0000 (09:38 +0100)]
ChatPage, ...: use snprintf() instead of g_strdup_printf()

2 years agoChatPage: use strcmp() instead of g_strcmp0()
Max Kellermann [Mon, 19 Mar 2018 08:39:18 +0000 (09:39 +0100)]
ChatPage: use strcmp() instead of g_strcmp0()

2 years agoChatPage: make string constexpr
Max Kellermann [Mon, 19 Mar 2018 08:38:27 +0000 (09:38 +0100)]
ChatPage: make string constexpr

2 years agogidle: remove obsolete API documentation
Max Kellermann [Sun, 18 Mar 2018 11:47:36 +0000 (12:47 +0100)]
gidle: remove obsolete API documentation

2 years agonet/async_rconnect: use std::string
Max Kellermann [Sun, 18 Mar 2018 11:44:37 +0000 (12:44 +0100)]
net/async_rconnect: use std::string

2 years agonet/async_rconnect: add constructor/destructor
Max Kellermann [Sun, 18 Mar 2018 11:39:56 +0000 (12:39 +0100)]
net/async_rconnect: add constructor/destructor

2 years agonet/async_rconnect: use new/delete
Max Kellermann [Sun, 18 Mar 2018 11:38:50 +0000 (12:38 +0100)]
net/async_rconnect: use new/delete

2 years agosave_playlist: implement file name query in the "mini" build
Max Kellermann [Sun, 18 Mar 2018 11:37:33 +0000 (12:37 +0100)]
save_playlist: implement file name query in the "mini" build

Fixes a crash bug due to nullptr dereference.

2 years agosave_playlist: use std::string
Max Kellermann [Sun, 18 Mar 2018 11:34:47 +0000 (12:34 +0100)]
save_playlist: use std::string

2 years agooptions: remove _init(), _deinit()
Max Kellermann [Sun, 18 Mar 2018 11:27:00 +0000 (12:27 +0100)]
options: remove _init(), _deinit()

2 years agooptions: convert screen_list to a std::vector
Max Kellermann [Sun, 18 Mar 2018 11:22:10 +0000 (12:22 +0100)]
options: convert screen_list to a std::vector

2 years agoconf: update one more get_format() call
Max Kellermann [Sun, 18 Mar 2018 11:21:38 +0000 (12:21 +0100)]
conf: update one more get_format() call

2 years agooptions: use std::string
Max Kellermann [Sun, 18 Mar 2018 11:02:52 +0000 (12:02 +0100)]
options: use std::string

2 years agooptions: remove unused setting "username"
Max Kellermann [Sun, 18 Mar 2018 11:16:43 +0000 (12:16 +0100)]
options: remove unused setting "username"

2 years agostrfsong: eliminate redundant utf8_to_locale() call
Max Kellermann [Sun, 18 Mar 2018 10:54:37 +0000 (11:54 +0100)]
strfsong: eliminate redundant utf8_to_locale() call

2 years agoSongPage: fix width/height mix-up
Max Kellermann [Sun, 18 Mar 2018 10:49:54 +0000 (11:49 +0100)]
SongPage: fix width/height mix-up

2 years agoSongPage: use memcpy() instead of g_sprintf()
Max Kellermann [Sun, 18 Mar 2018 10:48:23 +0000 (11:48 +0100)]
SongPage: use memcpy() instead of g_sprintf()

2 years ago*: use plain snprintf() instead of g_snprintf()
Max Kellermann [Sun, 18 Mar 2018 10:28:57 +0000 (11:28 +0100)]
*: use plain snprintf() instead of g_snprintf()

2 years agoTitleBar: no g_strlcat() for the "flags" string
Max Kellermann [Sun, 18 Mar 2018 10:30:02 +0000 (11:30 +0100)]
TitleBar: no g_strlcat() for the "flags" string

Use simple (unchecked) char concatenation to fill the flags buffer.

2 years agoTitleBar: don't use g_snprintf() to copy raw string without formats
Max Kellermann [Sun, 18 Mar 2018 10:27:11 +0000 (11:27 +0100)]
TitleBar: don't use g_snprintf() to copy raw string without formats

2 years agosignals: forward-declare GMainLoop
Max Kellermann [Sun, 18 Mar 2018 10:19:46 +0000 (11:19 +0100)]
signals: forward-declare GMainLoop

2 years agogidle: forward-declare GIOChannel
Max Kellermann [Sun, 18 Mar 2018 10:19:18 +0000 (11:19 +0100)]
gidle: forward-declare GIOChannel

2 years agomatch: forward-declare GRegex
Max Kellermann [Sun, 18 Mar 2018 10:18:13 +0000 (11:18 +0100)]
match: forward-declare GRegex

2 years agoscreen: don't include glib.h from header
Max Kellermann [Sun, 18 Mar 2018 10:10:05 +0000 (11:10 +0100)]
screen: don't include glib.h from header

2 years agoscreen_list: use range-based "for"
Max Kellermann [Sun, 18 Mar 2018 10:12:59 +0000 (11:12 +0100)]
screen_list: use range-based "for"

2 years agoStatusBar: don't include glib.h from header
Max Kellermann [Sun, 18 Mar 2018 10:08:44 +0000 (11:08 +0100)]
StatusBar: don't include glib.h from header

2 years agohscroll: don't include glib.h from header
Max Kellermann [Sun, 18 Mar 2018 10:09:12 +0000 (11:09 +0100)]
hscroll: don't include glib.h from header

2 years agooptions: use std::chrono::seconds instead of GTime
Max Kellermann [Sun, 18 Mar 2018 10:14:50 +0000 (11:14 +0100)]
options: use std::chrono::seconds instead of GTime

2 years agoEvent: add wrapper for g_timeout_add() callback
Max Kellermann [Sun, 18 Mar 2018 09:53:00 +0000 (10:53 +0100)]
Event: add wrapper for g_timeout_add() callback

2 years agoscreen_status: use vsnprintf() instead of g_strdup_vprintf()
Max Kellermann [Sun, 18 Mar 2018 09:36:16 +0000 (10:36 +0100)]
screen_status: use vsnprintf() instead of g_strdup_vprintf()

2 years agoscreen_status: eliminate screen_status_clear_message()
Max Kellermann [Sun, 18 Mar 2018 09:39:33 +0000 (10:39 +0100)]
screen_status: eliminate screen_status_clear_message()

2 years ago*: use screen_status_message() instead of screen_status_printf()
Max Kellermann [Sun, 18 Mar 2018 09:38:07 +0000 (10:38 +0100)]
*: use screen_status_message() instead of screen_status_printf()

2 years agogidle: move methods into the struct
Max Kellermann [Sat, 17 Mar 2018 21:33:06 +0000 (22:33 +0100)]
gidle: move methods into the struct

2 years agogidle: eliminate _new() and _free()
Max Kellermann [Sat, 17 Mar 2018 21:31:23 +0000 (22:31 +0100)]
gidle: eliminate _new() and _free()

2 years agogidle: add destructor
Max Kellermann [Sat, 17 Mar 2018 21:15:03 +0000 (22:15 +0100)]
gidle: add destructor

2 years agogidle: expose the struct
Max Kellermann [Sat, 17 Mar 2018 21:13:52 +0000 (22:13 +0100)]
gidle: expose the struct

2 years agogidle: remove the "leaving" workaround
Max Kellermann [Sat, 17 Mar 2018 21:26:56 +0000 (22:26 +0100)]
gidle: remove the "leaving" workaround

This was added in commit f0369dcca, but in commit 51efef630, the
mpd_glib_enter() call was moved into an "idle" event, which eliminated
the need for the "leaving" workaround (and the "destroyed"
workaround).

2 years agompdclient: add missing include for std::string
Max Kellermann [Sat, 17 Mar 2018 21:16:31 +0000 (22:16 +0100)]
mpdclient: add missing include for std::string

2 years agompdclient: remove obsolete g_strdup() call
Max Kellermann [Sat, 17 Mar 2018 21:11:30 +0000 (22:11 +0100)]
mpdclient: remove obsolete g_strdup() call

2 years agompdclient: GetSettingsName() returns std::string
Max Kellermann [Sat, 17 Mar 2018 21:07:15 +0000 (22:07 +0100)]
mpdclient: GetSettingsName() returns std::string

2 years agoChatPage: simplify Update()
Max Kellermann [Sat, 17 Mar 2018 21:05:08 +0000 (22:05 +0100)]
ChatPage: simplify Update()

2 years agompdclient: move functions into the struct
Max Kellermann [Sat, 17 Mar 2018 20:40:35 +0000 (21:40 +0100)]
mpdclient: move functions into the struct

2 years agoscreen_*: rename the source files
Max Kellermann [Sat, 17 Mar 2018 20:26:42 +0000 (21:26 +0100)]
screen_*: rename the source files

2 years agowreadln: use locale_width()
Max Kellermann [Sat, 17 Mar 2018 10:27:16 +0000 (11:27 +0100)]
wreadln: use locale_width()

2 years agowreadln: use g_strndup() instead of g_strdup()
Max Kellermann [Sat, 17 Mar 2018 10:22:49 +0000 (11:22 +0100)]
wreadln: use g_strndup() instead of g_strdup()

2 years agowreadln: fix memory leak in return
Max Kellermann [Sat, 17 Mar 2018 10:29:17 +0000 (11:29 +0100)]
wreadln: fix memory leak in return

Fallout from commit abf50d76048b1afa950451b76fd3c371354f8c19

2 years agoListText: pass buffer to method
Max Kellermann [Sat, 17 Mar 2018 10:05:53 +0000 (11:05 +0100)]
ListText: pass buffer to method

Allows eliminating lots of (unsafe) static buffers.

2 years agoListWindow: convert list_window_callback_fn_t to an abstract class
Max Kellermann [Sat, 17 Mar 2018 09:30:06 +0000 (10:30 +0100)]
ListWindow: convert list_window_callback_fn_t to an abstract class

2 years agoListWindow: refactor the second Paint() overload to a ListRenderer
Max Kellermann [Sat, 17 Mar 2018 07:50:21 +0000 (08:50 +0100)]
ListWindow: refactor the second Paint() overload to a ListRenderer

2 years agoListWindow: call row_color_end() in both Paint() overloads
Max Kellermann [Sat, 17 Mar 2018 09:21:35 +0000 (10:21 +0100)]
ListWindow: call row_color_end() in both Paint() overloads

2 years agoscreen_find: make the ListRenderer mandatory
Max Kellermann [Sat, 17 Mar 2018 07:47:14 +0000 (08:47 +0100)]
screen_find: make the ListRenderer mandatory

2 years agoListWindow: replace callback function with abstract class
Max Kellermann [Sun, 25 Feb 2018 08:57:44 +0000 (09:57 +0100)]
ListWindow: replace callback function with abstract class

2 years agostrfsong: use plain C types instead of GLib
Max Kellermann [Sat, 17 Mar 2018 07:34:00 +0000 (08:34 +0100)]
strfsong: use plain C types instead of GLib

2 years agoutils: remove unused library
Max Kellermann [Sat, 17 Mar 2018 07:31:22 +0000 (08:31 +0100)]
utils: remove unused library

2 years agoscreen_queue: remove obsolete attribute
Max Kellermann [Sat, 17 Mar 2018 07:31:11 +0000 (08:31 +0100)]
screen_queue: remove obsolete attribute

2 years agoCompletion: use std::set<std::string> instead of GCompletion
Max Kellermann [Fri, 16 Mar 2018 19:27:18 +0000 (20:27 +0100)]
Completion: use std::set<std::string> instead of GCompletion

GCompletion is deprecated.