ncmpc-debian.git
21 months agoMerge branch 'master' of https://hosted.weblate.org/git/ncmpc/translations
Max Kellermann [Mon, 10 Sep 2018 15:06:10 +0000 (17:06 +0200)]
Merge branch 'master' of https://hosted.weblate.org/git/ncmpc/translations

21 months agoTranslated using Weblate (Norwegian Bokmål)
Allan Nordhøy [Mon, 10 Sep 2018 02:08:30 +0000 (02:08 +0000)]
Translated using Weblate (Norwegian Bokmål)

Currently translated at 95.6% (265 of 277 strings)

Translation: Ncmpc/Translations
Translate-URL: https://hosted.weblate.org/projects/ncmpc/translations/nb/

21 months agoREADME.rst: add Weblate link
Max Kellermann [Mon, 10 Sep 2018 15:01:10 +0000 (17:01 +0200)]
README.rst: add Weblate link

21 months agopo: update ncmpc.pot and *.po
Max Kellermann [Mon, 10 Sep 2018 14:34:00 +0000 (16:34 +0200)]
po: update ncmpc.pot and *.po

21 months agopo: update POTFILES
Max Kellermann [Mon, 10 Sep 2018 14:33:15 +0000 (16:33 +0200)]
po: update POTFILES

Generated with:

 git grep --files-with-matches '_("'|sort --ignore-case

21 months agoscreen_utils: don't translate "%s [%s/%s] "
Max Kellermann [Mon, 10 Sep 2018 14:56:58 +0000 (16:56 +0200)]
screen_utils: don't translate "%s [%s/%s] "

21 months agoscreen_artist: move %s out of translated string
Max Kellermann [Mon, 10 Sep 2018 14:52:03 +0000 (16:52 +0200)]
screen_artist: move %s out of translated string

21 months agoscreen_client: remove trailing ellipsis from message
Max Kellermann [Mon, 10 Sep 2018 14:50:07 +0000 (16:50 +0200)]
screen_client: remove trailing ellipsis from message

21 months agoMain: remove "press K for the key editor" message
Max Kellermann [Mon, 10 Sep 2018 14:43:04 +0000 (16:43 +0200)]
Main: remove "press K for the key editor" message

This hot key is already visible at the top.

21 months agoMain: use screen_status_message() instead of screen_status_printf("%s")
Max Kellermann [Mon, 10 Sep 2018 14:41:18 +0000 (16:41 +0200)]
Main: use screen_status_message() instead of screen_status_printf("%s")

21 months agoMain: remove "Press q to abort" from "Connecting..." string
Max Kellermann [Mon, 10 Sep 2018 14:40:29 +0000 (16:40 +0200)]
Main: remove "Press q to abort" from "Connecting..." string

21 months agoLyricsPage: move trailing "(%d)" out of translated string
Max Kellermann [Mon, 10 Sep 2018 14:39:15 +0000 (16:39 +0200)]
LyricsPage: move trailing "(%d)" out of translated string

21 months agoFileListPage: remove trailing ellipsis from message
Max Kellermann [Mon, 10 Sep 2018 14:37:23 +0000 (16:37 +0200)]
FileListPage: remove trailing ellipsis from message

21 months agorequire MPD 0.19
Max Kellermann [Mon, 10 Sep 2018 14:34:36 +0000 (16:34 +0200)]
require MPD 0.19

MPD 0.19 was released in 2014, and it appears reasonable to cut
support for older versions.  This allows removing a few conditionals.

21 months agoTitleBar: re-add option `welcome-screen-list`
Max Kellermann [Mon, 10 Sep 2018 13:18:11 +0000 (15:18 +0200)]
TitleBar: re-add option `welcome-screen-list`

For some users, the tabbed list may not be useful (e.g. blind users),
so I revert part of the previous commit and just make the option
permanent.  The option's name doesn't fit so well anymore now...

21 months agoalways show the screen list at the top
Max Kellermann [Mon, 10 Sep 2018 13:02:21 +0000 (15:02 +0200)]
always show the screen list at the top

Obsoletes configuration option `welcome-screen-list` and closes #34.

21 months agoTabBar: center-align tab label
Max Kellermann [Mon, 10 Sep 2018 13:01:45 +0000 (15:01 +0200)]
TabBar: center-align tab label

21 months agoTabBar: highlight the current page
Max Kellermann [Mon, 10 Sep 2018 12:39:51 +0000 (14:39 +0200)]
TabBar: highlight the current page

21 months agoscreen: add GetCurrentPageMeta()
Max Kellermann [Mon, 10 Sep 2018 12:39:08 +0000 (14:39 +0200)]
screen: add GetCurrentPageMeta()

21 months agoTabBar: use use `screens` array instead of hard-coding pages
Max Kellermann [Mon, 10 Sep 2018 12:35:02 +0000 (14:35 +0200)]
TabBar: use use `screens` array instead of hard-coding pages

21 months agoPageMeta: add `title` attribute
Max Kellermann [Mon, 10 Sep 2018 12:24:03 +0000 (14:24 +0200)]
PageMeta: add `title` attribute

Will be used by PaintTabBar().

21 months agoi18n: add gettext() fake macro
Max Kellermann [Mon, 10 Sep 2018 12:26:00 +0000 (14:26 +0200)]
i18n: add gettext() fake macro

Use `_()` only for literals.

21 months agoSongPage: use locale_width() for translated strings
Max Kellermann [Mon, 10 Sep 2018 12:28:10 +0000 (14:28 +0200)]
SongPage: use locale_width() for translated strings

21 months agoPageMeta: add Command attribute
Max Kellermann [Mon, 10 Sep 2018 12:05:43 +0000 (14:05 +0200)]
PageMeta: add Command attribute

Look up the command in the page table which saves some code in
ScreenManager::OnCommand().

21 months agoscreen_list: reorder list, same as in TabBar.cxx
Max Kellermann [Mon, 10 Sep 2018 12:03:36 +0000 (14:03 +0200)]
screen_list: reorder list, same as in TabBar.cxx

Prepare to use this list as source for PaintTabBar().

21 months agoscreen_interface: rename struct screen_functions to PageMeta
Max Kellermann [Mon, 10 Sep 2018 11:21:52 +0000 (13:21 +0200)]
screen_interface: rename struct screen_functions to PageMeta

21 months agoscreen_list: include cleanup
Max Kellermann [Mon, 10 Sep 2018 11:53:44 +0000 (13:53 +0200)]
screen_list: include cleanup

21 months agoscreen_list: add "pure" attribute
Max Kellermann [Mon, 10 Sep 2018 11:54:04 +0000 (13:54 +0200)]
screen_list: add "pure" attribute

21 months ago{Artist,Album}ListPage: move CompareUTF8() to util/StringUTF8.cxx
Max Kellermann [Mon, 10 Sep 2018 11:49:42 +0000 (13:49 +0200)]
{Artist,Album}ListPage: move CompareUTF8() to util/StringUTF8.cxx

21 months ago{Artist,Album}ListPage: include cleanup
Max Kellermann [Mon, 10 Sep 2018 11:24:30 +0000 (13:24 +0200)]
{Artist,Album}ListPage: include cleanup

21 months agoutil/StringUTF8: add "const" attribute
Max Kellermann [Mon, 10 Sep 2018 11:46:57 +0000 (13:46 +0200)]
util/StringUTF8: add "const" attribute

21 months agocharset: move utf8_width() to util/StringUTF8.cxx
Max Kellermann [Mon, 10 Sep 2018 11:39:08 +0000 (13:39 +0200)]
charset: move utf8_width() to util/StringUTF8.cxx

21 months agoscreen_keydef: add KeyBinding pointer to class CommandKeysPage
Max Kellermann [Mon, 10 Sep 2018 09:46:49 +0000 (11:46 +0200)]
screen_keydef: add KeyBinding pointer to class CommandKeysPage

21 months agoscreen_keydef: remove redundant "cmd_index" parameters
Max Kellermann [Mon, 10 Sep 2018 10:00:49 +0000 (12:00 +0200)]
screen_keydef: remove redundant "cmd_index" parameters

21 months agoBindings: add method GetKeyCount()
Max Kellermann [Mon, 10 Sep 2018 09:33:34 +0000 (11:33 +0200)]
Bindings: add method GetKeyCount()

22 months agoCommand: include cleanup
Max Kellermann [Fri, 7 Sep 2018 22:12:47 +0000 (00:12 +0200)]
Command: include cleanup

22 months agoCommand: remove unused macro
Max Kellermann [Fri, 7 Sep 2018 22:11:33 +0000 (00:11 +0200)]
Command: remove unused macro

22 months agoCommand: convert to strictly-typed enum
Max Kellermann [Fri, 7 Sep 2018 21:55:49 +0000 (23:55 +0200)]
Command: convert to strictly-typed enum

22 months agocommand: rename to Command.?xx
Max Kellermann [Fri, 7 Sep 2018 21:54:28 +0000 (23:54 +0200)]
command: rename to Command.?xx

22 months agocommand: remove unnecessary #ifdef
Max Kellermann [Fri, 7 Sep 2018 21:53:02 +0000 (23:53 +0200)]
command: remove unnecessary #ifdef

22 months agocommand: include cleanup
Max Kellermann [Fri, 7 Sep 2018 21:51:42 +0000 (23:51 +0200)]
command: include cleanup

22 months agoGlobalBindings: include cleanup
Max Kellermann [Fri, 7 Sep 2018 21:51:14 +0000 (23:51 +0200)]
GlobalBindings: include cleanup

22 months agoBindings: include cleanup
Max Kellermann [Fri, 7 Sep 2018 21:49:34 +0000 (23:49 +0200)]
Bindings: include cleanup

22 months agoBindings: use IsAlphaNumericASCII() instead of ctype.h
Max Kellermann [Fri, 7 Sep 2018 21:49:08 +0000 (23:49 +0200)]
Bindings: use IsAlphaNumericASCII() instead of ctype.h

22 months agoBindings: move code to KeyBinding::HasKey()
Max Kellermann [Fri, 7 Sep 2018 21:44:00 +0000 (23:44 +0200)]
Bindings: move code to KeyBinding::HasKey()

22 months agoBindings: move code to KeyBinding::SetKey()
Max Kellermann [Fri, 7 Sep 2018 21:42:45 +0000 (23:42 +0200)]
Bindings: move code to KeyBinding::SetKey()

22 months agoBindings: move code to KeyBinding::WriteToFile()
Max Kellermann [Fri, 7 Sep 2018 21:32:09 +0000 (23:32 +0200)]
Bindings: move code to KeyBinding::WriteToFile()

22 months agoBindings: add struct KeyBindings, array of struct KeyBinding
Max Kellermann [Fri, 7 Sep 2018 17:10:27 +0000 (19:10 +0200)]
Bindings: add struct KeyBindings, array of struct KeyBinding

22 months agoBindings: use range-based `for`
Max Kellermann [Fri, 7 Sep 2018 17:19:20 +0000 (19:19 +0200)]
Bindings: use range-based `for`

22 months agoBindings: remove the unused `conflict` attribute
Max Kellermann [Fri, 7 Sep 2018 17:22:34 +0000 (19:22 +0200)]
Bindings: remove the unused `conflict` attribute

Nobody needs a write-only attribute.

22 months agoBindings: use std::array
Max Kellermann [Fri, 7 Sep 2018 17:16:21 +0000 (19:16 +0200)]
Bindings: use std::array

22 months agoBindings: remove the assign_keys() return value
Max Kellermann [Fri, 7 Sep 2018 17:15:18 +0000 (19:15 +0200)]
Bindings: remove the assign_keys() return value

22 months agocommand: remove useless sentinel element
Max Kellermann [Fri, 7 Sep 2018 17:06:32 +0000 (19:06 +0200)]
command: remove useless sentinel element

22 months agocommand: use range-based `for`
Max Kellermann [Fri, 7 Sep 2018 17:06:22 +0000 (19:06 +0200)]
command: use range-based `for`

22 months agoGlobalBindings: remove useless sentinel element
Max Kellermann [Fri, 7 Sep 2018 16:38:09 +0000 (18:38 +0200)]
GlobalBindings: remove useless sentinel element

22 months agocommand: split `cmds`, move key bindings table to Bindings.cxx
Max Kellermann [Fri, 7 Sep 2018 09:09:35 +0000 (11:09 +0200)]
command: split `cmds`, move key bindings table to Bindings.cxx

The `cmds` array can now be `constexpr`.

22 months agocommand: remove parameter from get_cmds_max_name_width()
Max Kellermann [Fri, 7 Sep 2018 17:00:59 +0000 (19:00 +0200)]
command: remove parameter from get_cmds_max_name_width()

The only caller will never pass an instance with different names.

22 months agocommand: remove unused function command_dump_keys()
Max Kellermann [Fri, 7 Sep 2018 16:34:22 +0000 (18:34 +0200)]
command: remove unused function command_dump_keys()

22 months agoKeyName: don't translate Fx
Max Kellermann [Fri, 7 Sep 2018 15:45:05 +0000 (17:45 +0200)]
KeyName: don't translate Fx

AFAIK this is the same name in all languages, and translators probably
don't know what "F%d" means anyway.

22 months agocommand: move key2str() to KeyName.cxx
Max Kellermann [Fri, 7 Sep 2018 15:38:01 +0000 (17:38 +0200)]
command: move key2str() to KeyName.cxx

22 months agoscreen_keydef: make command_n_commands constexpr
Max Kellermann [Fri, 7 Sep 2018 09:32:04 +0000 (11:32 +0200)]
screen_keydef: make command_n_commands constexpr

22 months agocommand: remove command_definition_t::command_t
Max Kellermann [Fri, 7 Sep 2018 09:21:57 +0000 (11:21 +0200)]
command: remove command_definition_t::command_t

This is redundant, we can simply use the index.

22 months agocommand: add static_assert on the `cmds` table size
Max Kellermann [Fri, 7 Sep 2018 09:18:08 +0000 (11:18 +0200)]
command: add static_assert on the `cmds` table size

Verify that all commands are in the table.

22 months agocommand: disable commands that are unavailable
Max Kellermann [Fri, 7 Sep 2018 09:19:18 +0000 (11:19 +0200)]
command: disable commands that are unavailable

The `command_t` values should be indexes in the `cmds` table, so we
can remove its `command_t` attribute.

22 months agocommand: reorder enum command_t according to the `cmds` table
Max Kellermann [Fri, 7 Sep 2018 09:10:26 +0000 (11:10 +0200)]
command: reorder enum command_t according to the `cmds` table

22 months agobuild/configure.py: use "debugoptimized" instead of "release"
Max Kellermann [Thu, 6 Sep 2018 18:20:11 +0000 (20:20 +0200)]
build/configure.py: use "debugoptimized" instead of "release"

Both are optimized, but "release" has no debug symbols and thus cannot
be debugged.

22 months agobuild/configure.py: use lld
Max Kellermann [Thu, 6 Sep 2018 18:19:20 +0000 (20:19 +0200)]
build/configure.py: use lld

22 months agomeson.build: fix enable_documentation check
Max Kellermann [Tue, 4 Sep 2018 11:20:21 +0000 (13:20 +0200)]
meson.build: fix enable_documentation check

22 months agoTabBar: rename print_hotkey()
Max Kellermann [Tue, 4 Sep 2018 10:10:49 +0000 (12:10 +0200)]
TabBar: rename print_hotkey()

22 months agoTitleBar: move code to TabBar.cxx
Max Kellermann [Tue, 4 Sep 2018 09:55:18 +0000 (11:55 +0200)]
TitleBar: move code to TabBar.cxx

22 months agoQueue: FindByReference() cannot fail
Max Kellermann [Tue, 4 Sep 2018 08:30:44 +0000 (10:30 +0200)]
Queue: FindByReference() cannot fail

22 months agoQueue: add ContainsUri()
Max Kellermann [Tue, 4 Sep 2018 08:27:42 +0000 (10:27 +0200)]
Queue: add ContainsUri()

22 months agoQueue: remove FindUri(mpd_song)
Max Kellermann [Tue, 4 Sep 2018 08:24:47 +0000 (10:24 +0200)]
Queue: remove FindUri(mpd_song)

This overload appears to be convenient, but it is somewhat confusing,
because there is also FindByReference().

22 months agoFileListPage: use Queue::FindIdByUri(), fixing id/position mixup
Max Kellermann [Tue, 4 Sep 2018 08:22:56 +0000 (10:22 +0200)]
FileListPage: use Queue::FindIdByUri(), fixing id/position mixup

Now really closes #27.

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`.