po: updated Russian translation
Merge branch 'master' of git://git.musicpd.org/avuton/ncmpc
Update copyright notices
screen_song: make the "labels" array static
Don't reinitialize the whole list each time the screen is opened.
Don't reinitialize the whole list each time the screen is opened.
screen_queue: always update the list size
This fixes an assertion failure.
This fixes an assertion failure.
list_window: check for unchanged value in set_length()
Minor optimization.
Minor optimization.
doc/ncmpc.1: fixed some typos
include "config.h" in all files using HAVE_* defines
Modify version string to post-release version 0.17~git
ncmpc version 0.16
updated the AUTHORS file
po: regenerated ncmpc.pot
Only line number changes.
Only line number changes.
po: added Esperanto translation
Anonymous Launchpad contribution.
Anonymous Launchpad contribution.
po: updated German translation
Anonymous Launchpad contribution.
Anonymous Launchpad contribution.
screen_artist: return strings without square brackets
This fixes the "jump" regression.
This fixes the "jump" regression.
screen_artist: use a list_window paint callback
The goal is to remove the square brackets from the old list_window
callback.
The goal is to remove the square brackets from the old list_window
callback.
screen_artist: don't convert _() to locale
gettext returns all strings in the locale charset.
gettext returns all strings in the locale charset.
screen_browser: export screen_browser_paint_directory()
Makefile.am: fixed include path for test/run_hscroll
Use $(srcdir) to support out-of-tree builds.
Use $(srcdir) to support out-of-tree builds.
compatibility fixes for GLib 2.12
At the same time, raise the minimum required GLib version to 2.12,
because I don't have older versions to test with.
At the same time, raise the minimum required GLib version to 2.12,
because I don't have older versions to test with.
screen_browser: explicitly initialize local variable
Make gcc happy.
Make gcc happy.
screen_queue: simplified screen_readln() call in MINI
Fix compiling with --disable-locale
locale_width() was previously broken when trying to compile ncmpc
without locale support. This was due to stale code in an #if block.
Signed-off-by: Thomas Adam <thomas.adam22@gmail.com>
locale_width() was previously broken when trying to compile ncmpc
without locale support. This was due to stale code in an #if block.
Signed-off-by: Thomas Adam <thomas.adam22@gmail.com>
colors: Change config to use attribute list
Colors can now be specified with a comma separated list of attributes,
for example: `blue,bold,underline'.
Putting multiple colors in the list is probably a bad idea..
Existing `bright' colors should be converted to bold colors.
e.g. brightblue => blue,bold
Colors can now be specified with a comma separated list of attributes,
for example: `blue,bold,underline'.
Putting multiple colors in the list is probably a bad idea..
Existing `bright' colors should be converted to bold colors.
e.g. brightblue => blue,bold
colors: Clean up color handling code using curses.h
Using attr_t lets us remove some unnecessary code, such as
COLOR_BRIGHT_MASK which is now just A_BOLD. We can also add in other
style properties, such as underline, easier as well.
Also moved the background color to the color table, there's no reason to
special case it.
Using attr_t lets us remove some unnecessary code, such as
COLOR_BRIGHT_MASK which is now just A_BOLD. We can also add in other
style properties, such as underline, easier as well.
Also moved the background color to the color table, there's no reason to
special case it.
colors: Allow using 256 colors
Return the corresponding value when integers are passed to str2color. This
allows high colors to be used with 256 color terminals. Bright colors can be
used by adding 256 to integer.
COLOR_BRIGHT_MASK changed to avoid conflicts with >127 colors.
Return the corresponding value when integers are passed to str2color. This
allows high colors to be used with 256 color terminals. Bright colors can be
used by adding 256 to integer.
COLOR_BRIGHT_MASK changed to avoid conflicts with >127 colors.
leoslyrics.sh plugin: Add bash leoslyrics plugin
Simple version of the Leo's Lyrics plugin that uses bash and wget.
This also caches the lyrics in ~/.lyrics so that they are later retrieved by
the hd.sh plugin.
Simple version of the Leo's Lyrics plugin that uses bash and wget.
This also caches the lyrics in ~/.lyrics so that they are later retrieved by
the hd.sh plugin.
lyrics plugins: Change numbering scheme
Rename lyrics plugins to x0-plugin instead of 0x-plugin to allow additional
plugins to be added between provided plugins.
Rename lyrics plugins to x0-plugin instead of 0x-plugin to allow additional
plugins to be added between provided plugins.
colors: work around "value computed is not used" warning
Cast wattrset() to void.
Cast wattrset() to void.
added option "second-column"
This allows the second column displaying the song length to be
disabled using the config file. By default it is set to on, so it
shouldn't affect anyone unless they specify it.
This allows the second column displaying the song length to be
disabled using the config file. By default it is set to on, so it
shouldn't affect anyone unless they specify it.
charset: added support for zero-width characters
Consider zero-length characters in utf8_width().
Consider zero-length characters in utf8_width().
charset: moved code to unicode_char_width()
mpdclient: allow song id 0
Off-by-one bug. Change ">" to ">=".
Off-by-one bug. Change ">" to ">=".
status_bar: display elapsed time event when total time is unknown
This is useful for streams: how long have we been playing this stream?
This is useful for streams: how long have we been playing this stream?
status_bar: fix display_remaining_time while seeking
If the display_remaining_time option is enabled, apply this setting
even during seeking.
If the display_remaining_time option is enabled, apply this setting
even during seeking.
status_bar: moved variable "bitrate" inside closure
status_bar: moved code to format_bitrate()
screen_outputs: set list_window length to 0 if not connected
The "length" wasn't set properly because we commented out the
according line from clear_outputs_list().
The "length" wasn't set properly because we commented out the
according line from clear_outputs_list().
update screens after being disconnected from server
Signed-off-by: Romain Bignon <romain@peerfuse.org>
Signed-off-by: Romain Bignon <romain@peerfuse.org>
use MPD_IDLE_QUEUE instead of deprecated MPD_IDLE_PLAYLIST flag
Signed-off-by: Romain Bignon <romain@peerfuse.org>
Signed-off-by: Romain Bignon <romain@peerfuse.org>
screen_song: store list items in the locale charset
Pre-convert the strings, instead of converting on demand.
Pre-convert the strings, instead of converting on demand.
charset: added function locale_width()
This function is a rather expensive wrapper: it converts the string to
UTF-8 and calls utf8_width().
This function is a rather expensive wrapper: it converts the string to
UTF-8 and calls utf8_width().
screen_song: properly implement line breaks
The old code didn't consider wide characters. This patch uses
utf8_cut_width() to break lines.
The old code didn't consider wide characters. This patch uses
utf8_cut_width() to break lines.
screen_song: fill spaces with memset()
Faster than a manual "for" loop.
Faster than a manual "for" loop.
screen_song: don't allow screen_song_append(NULL)
All callers make sure that value!=NULL.
All callers make sure that value!=NULL.
player_command: implement setup_seek() without a song object
Get the current song id from mpd_status_get_song_id().
Get the current song id from mpd_status_get_song_id().
player_command: merged code into setup_seek()
player_command: break from switch if not playing
Eliminate one indent level.
Eliminate one indent level.
screen_queue: update current song in method open()
When the queue screen is not open, and the song changes, it was not
updated, not even if you switch back and press Ctrl-L.
This patch moves some common code to screen_queue_song_change(), which
is also called by the open() method.
When the queue screen is not open, and the song changes, it was not
updated, not even if you switch back and press Ctrl-L.
This patch moves some common code to screen_queue_song_change(), which
is also called by the open() method.
screen_queue: use mpd_status.song_pos for centering the list
Don't look up the playlist. Just use the position provided by MPD.
Side effect: we can pass the mpd_status object to
center_playing_item(), not the whole mpdclient object.
Don't look up the playlist. Just use the position provided by MPD.
Side effect: we can pass the mpd_status object to
center_playing_item(), not the whole mpdclient object.
screen_queue: eliminated length check in center()
list_window_center() does all the checks fine. Don't duplicate that.
list_window_center() does all the checks fine. Don't duplicate that.
screen_queue: eliminated unused variable "song"
Not used in center_playing_item().
Not used in center_playing_item().
mpdclient: added inline function mpdclient_is_playing()
lyricwiki: convert numeric HTML escape sequences to proper characters
I've stumbled across several cases of obfuscated lyrics that use the numeric
HTML escape sequences.
I've stumbled across several cases of obfuscated lyrics that use the numeric
HTML escape sequences.
po: regenerated ncmpc.pot and *.po
A lot of code has been moved around.
A lot of code has been moved around.
po: updated POTFILES.in
There are several new source files, and screen_play.c has been renamed
to screen_queue.c.
There are several new source files, and screen_play.c has been renamed
to screen_queue.c.
screen_search: revert label to "Filename"
po: updated Spanish translation
screen_outputs: preserve cursor position after update
Don't clear the list_window in clear_outputs_list().
Don't clear the list_window in clear_outputs_list().
command, conf: simplify variable initialization
main: whitespace cosmetics
wreadln: whitespace cosmetics
command: whitespace cosmetics
screen_help: whitespace cosmetics
Replaced space characters with one tab to match the rest of the file.
Replaced space characters with one tab to match the rest of the file.
list_window: removed unnecessary reverse wattroff
In all callback functions row_color is used to initialize the reverse
attribute for each new line. No need to switch it off explicitly in
between.
In all callback functions row_color is used to initialize the reverse
attribute for each new line. No need to switch it off explicitly in
between.
screen_browser: removed unnecessary reverse wattroff.
All cases internally use row_paint_text that in turn uses row_color and
sets the A_REVERSE attribute for the new row. We do not need to switch it
off manually.
All cases internally use row_paint_text that in turn uses row_color and
sets the A_REVERSE attribute for the new row. We do not need to switch it
off manually.
screen_browse: removed unnecessary color selection
All cases use row_paint_text internally which sets the color. There is no
need to have the colors_use calls before, as they will be overwritten.
All cases use row_paint_text internally which sets the color. There is no
need to have the colors_use calls before, as they will be overwritten.
screen_browser: removed duplicate line clearing
whline(w, ' ', width); was used to clean the rest of the line. The new
function row_paint_text takes care of that already, so we don't have to do
it twice. We had to switch the default case to row_paint_text as well to
cover all possibilities.
This fixes a bug where the last digit of the playtime of the last visible
row in the browse screen was overwritten with a space character.
whline(w, ' ', width); was used to clean the rest of the line. The new
function row_paint_text takes care of that already, so we don't have to do
it twice. We had to switch the default case to row_paint_text as well to
cover all possibilities.
This fixes a bug where the last digit of the playtime of the last visible
row in the browse screen was overwritten with a space character.
Merge branch 'master' of git://git.musicpd.org/jefromi/ncmpc
defaults: correct status/list formats
The missing brackets caused literal "%title%|%shortfile%" to be
displayed, instead of the intended falling back to filename absent a
title.
The missing brackets caused literal "%title%|%shortfile%" to be
displayed, instead of the intended falling back to filename absent a
title.
screen_song: correct "is mpd playing?" logic
We check if mpd is playing (or paused) before displaying current song
info - the logic was inverted! (!playing && !paused)
We check if mpd is playing (or paused) before displaying current song
info - the logic was inverted! (!playing && !paused)
screen_browse: make screen_browser_sync_highlights an empty inline function
This improves readability, as no #ifdefs are required in the *.c files around
the screen_browser_sync_highlights calls anymore.
This improves readability, as no #ifdefs are required in the *.c files around
the screen_browser_sync_highlights calls anymore.
Makefile.am: require automake 1.10
Match the version mpd uses.
Match the version mpd uses.
Makefile.am: enable the "subdir-objects" option
Don't clutter the top directory with *.o files similar to mpd.
Don't clutter the top directory with *.o files similar to mpd.
screen_file: sync highlights in screen_file_open
Fix bug #2605, where CMD_SCREEN_FILE would show no highlights until some
user action or event changed that.
Fix bug #2605, where CMD_SCREEN_FILE would show no highlights until some
user action or event changed that.
mpdclient: return after playlist_update() error
In each of the functions, the client may get disconnected, and we have
to check c->status!=NULL again.
In each of the functions, the client may get disconnected, and we have
to check c->status!=NULL again.
hscroll: reimplemented the hscroll library
The hscroll object knows the location on the screen and the text.
Upon initialization, it installs a GLib timer which updates the screen
every second.
The hscroll object knows the location on the screen and the text.
Upon initialization, it installs a GLib timer which updates the screen
every second.
status_bar: un-inline constructor and destructor
hscroll: simplify the code with utf8_cut_width()
Concatenate the input string twice, and select a substring from that
large string.
Concatenate the input string twice, and select a substring from that
large string.
charset: added function utf8_cut_width()
This function helps printing UTF-8 strings on limited screen space.
This function helps printing UTF-8 strings on limited screen space.
hscroll: work with UTF-8 strings
Convert the input strings to UTF-8 before applying UTF-8 functions on
them. Convert back to the locale before returning.
Convert the input strings to UTF-8 before applying UTF-8 functions on
them. Convert back to the locale before returning.
test: added "run_hscroll" program
A program for debugging the hscroll.c library.
A program for debugging the hscroll.c library.
screen_browser: initialize local variable
configure.ac: added option --enable-test
This will enable the test suite.
This will enable the test suite.
configure.ac: use standard autoconf variable names
Use the variable name implicitly created by AC_ARG_ENABLE.
Use the variable name implicitly created by AC_ARG_ENABLE.
po: updated Korean translation
charset: added "replace" functions
These functions are a shortcut for a common use case: convert an
allocated string in-place.
These functions are a shortcut for a common use case: convert an
allocated string in-place.
screen_browser: free temporary string
In browser_lw_callback(), free the converted directory base name.
In browser_lw_callback(), free the converted directory base name.
hscroll: use g_strconcat() instead of g_strlcpy() + g_strlcat()
hscroll: pass const strings to strscroll()
hscroll: don't include ctype.h
mpdclient: don't assign c->status twice in mpdclient_cmd_clear()
Forgot to delete this line when I switched to mpdclient_recv_status().
Forgot to delete this line when I switched to mpdclient_recv_status().
mpdclient: removed mpdclient_cmd_swap()
Not used anymore.
Not used anymore.
screen_queue: move ranges with one single "move" command
Instead of swapping every single song in the selected range, send one
single "move" command which moves the neighbor song to the other end
of the range.
Instead of swapping every single song in the selected range, send one
single "move" command which moves the neighbor song to the other end
of the range.
mpdclient: added function mpdclient_cmd_move()
playlist: added function playlist_move()
playlist: don't update the song positions in playlist_swap()
In ncmpc, nobody reads the song's "position" attribute (except for the
"plchanges" handler). We don't need it, and we don't need to update
it after a swap.
In ncmpc, nobody reads the song's "position" attribute (except for the
"plchanges" handler). We don't need it, and we don't need to update
it after a swap.
mpdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap()
That function does not move, it swaps two songs.
That function does not move, it swaps two songs.
mpdclient: moved code to mpdclient_recv_status()
Merge some duplicate code.
Merge some duplicate code.
mpdclient: optimize crop with delete_range
MPD 0.16 supports "delete" with a range.
MPD 0.16 supports "delete" with a range.