Code

ncmpc.git
15 years agolyrics: free lyrics_loader struct in lyrics_free()
Max Kellermann [Fri, 12 Dec 2008 17:29:05 +0000 (18:29 +0100)]
lyrics: free lyrics_loader struct in lyrics_free()

15 years agomain: deinitialize lyrics library
Max Kellermann [Fri, 12 Dec 2008 17:29:04 +0000 (18:29 +0100)]
main: deinitialize lyrics library

Free memory held by the plugin list at the end, make valgrind happier.

15 years agolyrics: g_new() cannot fail, don't check
Max Kellermann [Fri, 12 Dec 2008 15:00:45 +0000 (16:00 +0100)]
lyrics: g_new() cannot fail, don't check

g_new() aborts the program when the kernel runs out of memory.

15 years agocommand: disable check_key_bindings() with --enable-mini
Max Kellermann [Wed, 10 Dec 2008 19:16:04 +0000 (20:16 +0100)]
command: disable check_key_bindings() with --enable-mini

Remove another superfluous feature from the ncmpc-mini mode.

15 years agopo: clean up POTFILES.in
Max Kellermann [Wed, 10 Dec 2008 19:06:38 +0000 (20:06 +0100)]
po: clean up POTFILES.in

Removed sources which do not contain translatable strings.

15 years agomatch: case sensitive search with --enable-mini
Max Kellermann [Wed, 10 Dec 2008 18:58:19 +0000 (19:58 +0100)]
match: case sensitive search with --enable-mini

Drop support for the expensive case insensitive search in ncmpc-mini
mode.

15 years agohscroll: don't compile source in ncmpc-mini mode
Max Kellermann [Wed, 10 Dec 2008 18:55:37 +0000 (19:55 +0100)]
hscroll: don't compile source in ncmpc-mini mode

This source is not required with --enable-mini.

15 years agosupport: renamed source to hscroll.c
Max Kellermann [Wed, 10 Dec 2008 18:53:10 +0000 (19:53 +0100)]
support: renamed source to hscroll.c

There is only strscroll() left in support.c.  Give the source a better
name.

15 years agosupport: removed fallback strcasestr() implementation
Max Kellermann [Wed, 10 Dec 2008 18:47:56 +0000 (19:47 +0100)]
support: removed fallback strcasestr() implementation

The code which used to call strcasestr() has been converted to
match_line().

15 years agomatch: use g_utf8_casefold() in match_line()
Max Kellermann [Wed, 10 Dec 2008 18:47:36 +0000 (19:47 +0100)]
match: use g_utf8_casefold() in match_line()

strcasestr() is a non-standard function, and requires setting
_GNU_SOURCE.  To avoid this, do wasteful g_utf8_casefold() conversions
and use strstr().

15 years agolist_window: moved string matching to match.h
Max Kellermann [Wed, 10 Dec 2008 18:47:25 +0000 (19:47 +0100)]
list_window: moved string matching to match.h

Provide the new function match_line() which searches a string for a
needle (ignoring case).  This wraps the non-standard function
strcasestr().

15 years agoscreen: use print_hotkey() for the output screen tab
Max Kellermann [Wed, 10 Dec 2008 18:47:21 +0000 (19:47 +0100)]
screen: use print_hotkey() for the output screen tab

Don't use markup in the translated string; use print_hotkey() as a
simple wrapper.

15 years agosupport: don't declare strcasestr() if provided by the system
Max Kellermann [Mon, 8 Dec 2008 22:30:19 +0000 (23:30 +0100)]
support: don't declare strcasestr() if provided by the system

If the system library provides strcasestr(), don't do an extra
declaration in support.h.

15 years agooptions: Include all build options in version output.
Sebastian Harl [Sun, 7 Dec 2008 19:02:44 +0000 (20:02 +0100)]
options: Include all build options in version output.

15 years agoNEWS: version 0.13, described new outputs screen
Max Kellermann [Sat, 6 Dec 2008 14:02:12 +0000 (15:02 +0100)]
NEWS: version 0.13, described new outputs screen

15 years agoAUTHORS: added "translators" section
Max Kellermann [Sat, 6 Dec 2008 11:51:13 +0000 (12:51 +0100)]
AUTHORS: added "translators" section

15 years agoAUTHORS: added missing authors
Max Kellermann [Sat, 6 Dec 2008 11:50:40 +0000 (12:50 +0100)]
AUTHORS: added missing authors

15 years agoAUTHORS: added "former authors" section
Max Kellermann [Sat, 6 Dec 2008 11:42:37 +0000 (12:42 +0100)]
AUTHORS: added "former authors" section

15 years agoadded missing copyright headers
Max Kellermann [Sat, 6 Dec 2008 11:41:29 +0000 (12:41 +0100)]
added missing copyright headers

15 years agoscreen_outputs: new screen to control MPD's output devices
Mikael Svantesson [Fri, 5 Dec 2008 17:35:56 +0000 (18:35 +0100)]
screen_outputs: new screen to control MPD's output devices

The "outputs" screen allows the user to enable or disable MPD's audio
output devices.

15 years agoconfigure.ac: bumped version number to 0.13~git
Max Kellermann [Fri, 5 Dec 2008 17:34:24 +0000 (18:34 +0100)]
configure.ac: bumped version number to 0.13~git

The development of version 0.13 has started!

15 years agoncmpc version 0.12 release-0.12 v0.12
Max Kellermann [Fri, 5 Dec 2008 17:18:31 +0000 (18:18 +0100)]
ncmpc version 0.12

15 years agoadded build test script "test.sh"
Max Kellermann [Fri, 5 Dec 2008 09:11:35 +0000 (10:11 +0100)]
added build test script "test.sh"

15 years agosreen_play: fixed the g_completion_set_compare() callback type
Max Kellermann [Fri, 5 Dec 2008 08:33:54 +0000 (09:33 +0100)]
sreen_play: fixed the g_completion_set_compare() callback type

Passing strncmp to g_completion_set_compare() is incorrect, because
the type of the third parameter (n) differs.  This patch adds a
wrapper function with the correct type.

15 years agoscreen_song: make the variable "current" static
Max Kellermann [Fri, 5 Dec 2008 08:27:07 +0000 (09:27 +0100)]
screen_song: make the variable "current" static

The global variable "current" should not be exported, and should be
"static".

15 years agoMakefile.am: distribute the lyrics plugins even when they are disabled
Max Kellermann [Fri, 5 Dec 2008 08:17:45 +0000 (09:17 +0100)]
Makefile.am: distribute the lyrics plugins even when they are disabled

The source tarball should always contain all files.  The lyrics
plugins were not distributed when the plugin was disabled in the last
configure run.

15 years agoconfigure.ac: disable color terminal support with --enable-mini
Max Kellermann [Fri, 5 Dec 2008 08:09:34 +0000 (09:09 +0100)]
configure.ac: disable color terminal support with --enable-mini

15 years agoconfigure.ac: disable the artist screen with --enable-mini
Max Kellermann [Fri, 5 Dec 2008 07:59:45 +0000 (08:59 +0100)]
configure.ac: disable the artist screen with --enable-mini

15 years agom4: removed unused scripts
Max Kellermann [Fri, 5 Dec 2008 07:40:53 +0000 (08:40 +0100)]
m4: removed unused scripts

Some of those have become obsolete since we require a C99 build
environment.  Others have been obsoleted by using more of GLib.

15 years agoadded .gitignore
Max Kellermann [Fri, 5 Dec 2008 07:32:18 +0000 (08:32 +0100)]
added .gitignore

15 years agopo: added Hungarian translation
László Áshin [Thu, 4 Dec 2008 21:48:00 +0000 (22:48 +0100)]
po: added Hungarian translation

15 years agoscreen: fixed "screen too small" typo
Max Kellermann [Thu, 4 Dec 2008 21:43:18 +0000 (22:43 +0100)]
screen: fixed "screen too small" typo

The "too" had only one 'o'.  Remove the newline character at the end
to simplify translation.

15 years agolyrics: include the lyrics plugins in the dist tarball
Max Kellermann [Thu, 4 Dec 2008 13:57:52 +0000 (14:57 +0100)]
lyrics: include the lyrics plugins in the dist tarball

Add the lyrics scripts to $(EXTRA_DIST).

15 years agopo: updated Slovak translation
Jozef Riha [Thu, 4 Dec 2008 08:14:04 +0000 (09:14 +0100)]
po: updated Slovak translation

15 years agopo: updated Galician translation
Johám-Luís Miguéns Vila [Wed, 3 Dec 2008 10:48:12 +0000 (11:48 +0100)]
po: updated Galician translation

15 years agopo: updated Spanish translation
Johám-Luís Miguéns Vila [Wed, 3 Dec 2008 10:47:13 +0000 (11:47 +0100)]
po: updated Spanish translation

15 years agopo: regenerated ncmpc.pot
Max Kellermann [Wed, 3 Dec 2008 09:11:09 +0000 (10:11 +0100)]
po: regenerated ncmpc.pot

Only line numbers changed this time.

15 years agopo: updated German translation
Max Kellermann [Tue, 2 Dec 2008 20:11:15 +0000 (21:11 +0100)]
po: updated German translation

Added missing translation and removed "fuzzy" tags.

15 years agom4: imported progtest.m4 from gettext
Max Kellermann [Tue, 2 Dec 2008 19:28:10 +0000 (20:28 +0100)]
m4: imported progtest.m4 from gettext

po.m4 uses the macro AM_PATH_PROG_WITH_TEST which is provided by
progtest.m4.

15 years agopo: fixed C format error in the French translation
Max Kellermann [Tue, 2 Dec 2008 18:58:25 +0000 (19:58 +0100)]
po: fixed C format error in the French translation

15 years agoscreen_play: fix scrolling in auto-center mode
Max Kellermann [Mon, 1 Dec 2008 16:48:13 +0000 (17:48 +0100)]
screen_play: fix scrolling in auto-center mode

Commit cfad0fdf enabled horizontal scrolling, but broke auto-center
mode: regardless of whether the current song has changed, it
re-centered the list.  Moved the options.scroll check to another "if"
branch.

15 years agoscreen_help: added the artist screen hotkey
Max Kellermann [Sun, 30 Nov 2008 19:53:06 +0000 (20:53 +0100)]
screen_help: added the artist screen hotkey

15 years agoscreen_help: added CMD_VIEW
Max Kellermann [Sun, 30 Nov 2008 19:49:35 +0000 (20:49 +0100)]
screen_help: added CMD_VIEW

15 years agoscreen: don't show disabled help screen in screen list
Max Kellermann [Sun, 30 Nov 2008 19:41:01 +0000 (20:41 +0100)]
screen: don't show disabled help screen in screen list

When the help screen was disabled at compile time, it was showed in
the screen list anyway.

15 years agoscreen_search: use filelist_new() instead of g_malloc0()
Max Kellermann [Sun, 30 Nov 2008 16:02:19 +0000 (17:02 +0100)]
screen_search: use filelist_new() instead of g_malloc0()

Using the advanced search led to a segmentation fault, because with
g_malloc0(), the filelist's "entries" array was not allocated.  Use
the "official" filelist constructor instead.

15 years agoncmpc version 0.12~beta2 v0.12_beta2
Max Kellermann [Fri, 28 Nov 2008 14:53:00 +0000 (15:53 +0100)]
ncmpc version 0.12~beta2

15 years agopo: updated French translation
Yann Cézard [Thu, 27 Nov 2008 18:47:31 +0000 (19:47 +0100)]
po: updated French translation

15 years agolist_window: converted "flags" to one "bool" variable
Max Kellermann [Thu, 27 Nov 2008 17:05:28 +0000 (18:05 +0100)]
list_window: converted "flags" to one "bool" variable

Currently, there is only one known list_window flag ("hide_cursor").
Replace the "flags" bit field with a boolean variable.  If we run out
of space some day, we can convert that to bool:1.

15 years agolist_window: use "bool" instead of "int"
Max Kellermann [Thu, 27 Nov 2008 16:56:32 +0000 (17:56 +0100)]
list_window: use "bool" instead of "int"

For flags and return values, use the "bool" data type instead of
"int".

15 years agolist_window: fixed endless loop in non-wrapped search
Max Kellermann [Thu, 27 Nov 2008 15:58:14 +0000 (16:58 +0100)]
list_window: fixed endless loop in non-wrapped search

When the cursor was at the end of a list and the user pressed 'n',
ncmpc would hang in an endless loop forever.  The same bug was fixed
in the backwards search.

15 years agopo: updated Russian translation
Max Arnold [Thu, 27 Nov 2008 15:35:55 +0000 (16:35 +0100)]
po: updated Russian translation

15 years agopo: updated Russian translation
Max Arnold [Wed, 26 Nov 2008 13:52:39 +0000 (14:52 +0100)]
po: updated Russian translation

15 years agopo: added screen_song.c to POTFILES.in
Max Kellermann [Wed, 26 Nov 2008 13:52:33 +0000 (14:52 +0100)]
po: added screen_song.c to POTFILES.in

When I created screen_song.c, I forgot to add it to POTFILES.in, and
thus its string were not part of ncmpc.pot.  Add it and regenerate
ncmpc.pot and all .po files.

15 years agopo: updated Galician translation
Johám-Luís Miguéns Vila [Tue, 25 Nov 2008 21:44:08 +0000 (22:44 +0100)]
po: updated Galician translation

15 years agopo: updated Spanish translation
Johám-Luís Miguéns Vila [Tue, 25 Nov 2008 21:43:57 +0000 (22:43 +0100)]
po: updated Spanish translation

15 years agopo: updated Slovak translation
Jozef Riha [Tue, 25 Nov 2008 21:41:05 +0000 (22:41 +0100)]
po: updated Slovak translation

15 years agoncmpc version 0.12~beta1 v0.12_beta1
Max Kellermann [Tue, 25 Nov 2008 20:35:24 +0000 (21:35 +0100)]
ncmpc version 0.12~beta1

First beta version for the upcoming version 0.12.

15 years agoNEWS update for 0.12~beta1
Max Kellermann [Tue, 25 Nov 2008 20:31:22 +0000 (21:31 +0100)]
NEWS update for 0.12~beta1

15 years agoscreen_artist: fixes for the ncmpc-mini build
Max Kellermann [Tue, 25 Nov 2008 20:14:07 +0000 (21:14 +0100)]
screen_artist: fixes for the ncmpc-mini build

Disable the highlighting code which has slipped out of the NCMPC_MINI
checks.

15 years agoncmpc-mini: disable scrolling
Max Kellermann [Tue, 25 Nov 2008 20:11:23 +0000 (21:11 +0100)]
ncmpc-mini: disable scrolling

The scrolling code broke in the ncmpc-mini build.  Disable it when
--enable-mini was specified.

15 years agopo: updated German translation
Max Kellermann [Tue, 25 Nov 2008 20:04:30 +0000 (21:04 +0100)]
po: updated German translation

15 years agopo: removed translations which are obviously wrong
Max Kellermann [Tue, 25 Nov 2008 20:04:22 +0000 (21:04 +0100)]
po: removed translations which are obviously wrong

Removed fuzzy and non-fuzzy translations which look obviously wrong.
No translation is better than a wrong one.

15 years agopo: merged new strings in all languages
Max Kellermann [Tue, 25 Nov 2008 20:04:13 +0000 (21:04 +0100)]
po: merged new strings in all languages

Removed exclamation marks also from the translated strings.

15 years agopo: enabled Slovakian translation
Max Kellermann [Tue, 25 Nov 2008 20:04:09 +0000 (21:04 +0100)]
po: enabled Slovakian translation

The Slovakian translation was added a while ago, but it was not
enabled in configure.ac.

15 years agopo: regenerated ncmpc.pot
Max Kellermann [Tue, 25 Nov 2008 20:03:46 +0000 (21:03 +0100)]
po: regenerated ncmpc.pot

15 years agopo: improved translatable strings for easier translation
Max Kellermann [Tue, 25 Nov 2008 20:03:28 +0000 (21:03 +0100)]
po: improved translatable strings for easier translation

Remove exclamation marks and other markup from the strings.

15 years agoscreen: simplify screen list strings
Max Kellermann [Tue, 25 Nov 2008 20:03:27 +0000 (21:03 +0100)]
screen: simplify screen list strings

Removed the colon and the spaces from the translatable screen names.
This aims to simplify the translator's job.

15 years agolist_window: reset cursor when list is empty
Max Kellermann [Tue, 25 Nov 2008 17:44:42 +0000 (18:44 +0100)]
list_window: reset cursor when list is empty

Due to a side effect of the old "if" condition, the cursor was never
reset to the origin when the list was cleared.

15 years agoscreen_lyrics: reset cursor when the song changes
Max Kellermann [Tue, 25 Nov 2008 17:37:56 +0000 (18:37 +0100)]
screen_lyrics: reset cursor when the song changes

When the view is changed and a new song is about to be displayed,
reset the list's state and scroll back to the origin.

15 years agoremoved gcc.h
Max Kellermann [Mon, 24 Nov 2008 06:48:46 +0000 (07:48 +0100)]
removed gcc.h

gcc.h has been replaced with GLib's G_GNUC_ macros.

15 years agoscreen_search.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:49:06 +0000 (03:49 +0100)]
screen_search.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_play.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:48:38 +0000 (03:48 +0100)]
screen_play.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_lyrics.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:48:09 +0000 (03:48 +0100)]
screen_lyrics.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_keydef.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:47:46 +0000 (03:47 +0100)]
screen_keydef.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_help.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:47:24 +0000 (03:47 +0100)]
screen_help.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_file.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:47:05 +0000 (03:47 +0100)]
screen_file.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_browser.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:46:40 +0000 (03:46 +0100)]
screen_browser.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_artist.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:45:45 +0000 (03:45 +0100)]
screen_artist.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agomain.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:45:17 +0000 (03:45 +0100)]
main.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agolyrics.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:43:47 +0000 (03:43 +0100)]
lyrics.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agolirc: use GLib's G_GNUC_UNUSED instead of mpd_unused
Max Kellermann [Sun, 23 Nov 2008 17:51:32 +0000 (18:51 +0100)]
lirc: use GLib's G_GNUC_UNUSED instead of mpd_unused

The header gcc.h is going to fade away, in favor of GLib's G_GNUC_
macros.

15 years agoscreen_play: scroll long song names in the playlist
Matt Portas [Fri, 21 Nov 2008 15:39:31 +0000 (16:39 +0100)]
screen_play: scroll long song names in the playlist

If the song name under the cursor is too long for the terminal, scroll
it like in the statusbar.

15 years agopo: updated Spanish translation
Monika Brinkert [Wed, 19 Nov 2008 20:42:22 +0000 (21:42 +0100)]
po: updated Spanish translation

15 years agopo: updated German translation
Monika Brinkert [Wed, 19 Nov 2008 20:41:48 +0000 (21:41 +0100)]
po: updated German translation

15 years agopo: updated PO template
Monika Brinkert [Wed, 19 Nov 2008 09:09:05 +0000 (10:09 +0100)]
po: updated PO template

15 years agoscreen_search: don't include ncurses.h directly
Max Kellermann [Wed, 19 Nov 2008 08:45:51 +0000 (09:45 +0100)]
screen_search: don't include ncurses.h directly

screen.h has a check whether to include ncursesw/ncurses.h or
ncurses.h.  screen_search.c doesn't need to include it a second time,
and was missing the check.

15 years agoscreen_song: support CMD_SCREEN_LYRICS
Max Kellermann [Tue, 18 Nov 2008 23:07:02 +0000 (00:07 +0100)]
screen_song: support CMD_SCREEN_LYRICS

Show the lyrics of the song currently being displayed.

15 years agoscreen_song: free the song pointer
Max Kellermann [Tue, 18 Nov 2008 23:06:46 +0000 (00:06 +0100)]
screen_song: free the song pointer

Fix a memory leak.

15 years agoscreen_lyrics: support CMD_VIEW
Max Kellermann [Tue, 18 Nov 2008 23:06:22 +0000 (00:06 +0100)]
screen_lyrics: support CMD_VIEW

Jump to the song viewer screen.

15 years agoscreen_song: include cleanup
Max Kellermann [Tue, 18 Nov 2008 23:06:17 +0000 (00:06 +0100)]
screen_song: include cleanup

15 years agoscreen_song: check CMD_VIEW only if song screen is enabled
Max Kellermann [Tue, 18 Nov 2008 23:06:12 +0000 (00:06 +0100)]
screen_song: check CMD_VIEW only if song screen is enabled

15 years agoscreen_song: new screen which views song information
Max Kellermann [Tue, 18 Nov 2008 22:58:28 +0000 (23:58 +0100)]
screen_song: new screen which views song information

This new screen views all information available on a song: its
location, file name, and tags.

15 years agolibmpdclient: converted MPD_ERROR_ constants to enum
Max Kellermann [Tue, 18 Nov 2008 21:57:36 +0000 (22:57 +0100)]
libmpdclient: converted MPD_ERROR_ constants to enum

15 years agolibmpdclient: convert MPD_ACK_ constants to enum
Max Kellermann [Tue, 18 Nov 2008 21:57:14 +0000 (22:57 +0100)]
libmpdclient: convert MPD_ACK_ constants to enum

15 years agocommand: change 'locate' default hotkey to 'G'
Max Kellermann [Tue, 18 Nov 2008 21:55:24 +0000 (22:55 +0100)]
command: change 'locate' default hotkey to 'G'

Use the same hotkey as ncmpcpp.

15 years agoscreen_browser: always declare variable "entry"
Max Kellermann [Tue, 18 Nov 2008 21:47:40 +0000 (22:47 +0100)]
screen_browser: always declare variable "entry"

The local variable "entry" was only declared when lyrics were enabled,
but it is now used by CMD_LOCATE, too.

15 years agoscreen: method cmd() returns bool
Max Kellermann [Tue, 18 Nov 2008 21:09:23 +0000 (22:09 +0100)]
screen: method cmd() returns bool

Return true/false instead of 1/0.

15 years agoncu: include config.h, fix mouse and color support
Max Kellermann [Tue, 18 Nov 2008 20:57:17 +0000 (21:57 +0100)]
ncu: include config.h, fix mouse and color support

Due to config.h not being included, mouse and color support was always
disabled.

15 years agocommand: added CMD_LOCATE to locate song in database
Max Kellermann [Tue, 18 Nov 2008 20:51:57 +0000 (21:51 +0100)]
command: added CMD_LOCATE to locate song in database

Pressing 'l' switches to the file browser (screen_file) and locates
the previously selected song in the server's database.

15 years agoscreen_lyrics: duplicate current song
Max Kellermann [Tue, 18 Nov 2008 20:51:45 +0000 (21:51 +0100)]
screen_lyrics: duplicate current song

Don't store a pointer to the song passed to screen_lyrics_switch(),
duplicate it instead.  In the long term, it is too unsafe to work with
a foreign pointer.