screen: moved status message functions to screen_message.c
screen: removed unused macro MAX_SONGNAME_LENGTH
screen: eliminated state macros
Better do it manually.
Better do it manually.
screen: removed obsolete screen_error() prototype
screen: removed obsolete screen_get_id() prototype
screen: moved screen_interface externs to each screen header
Make a header for each screen implementation.
Make a header for each screen implementation.
screen: removed unused function volume_length()
screen_lyrics: don't use strfsong() to obtain tags
Use mpd_song_get_tag(). This guarantees that the tags are encoded in
UTF-8.
Use mpd_song_get_tag(). This guarantees that the tags are encoded in
UTF-8.
status_bar: use a GLib timer to remove the message
mpdclient: rewrite the "fancy swap" code
This is a trick to keep playlist swaps cheap: ncmpc tries to predict
the new playlist.
This is a trick to keep playlist swaps cheap: ncmpc tries to predict
the new playlist.
screen_play: use mpd_cmd_delete_range()
mpdclient: added mpdclient_cmd_delete_range()
MPD 0.16 supports "delete" with a range argument.
MPD 0.16 supports "delete" with a range argument.
mpdclient: rewrite the "fancy delete" code
This is a trick to keep playlist deletes cheap: ncmpc tries to predict
the new playlist.
This is a trick to keep playlist deletes cheap: ncmpc tries to predict
the new playlist.
mpdclient: rewrite the "fancy add" code
This is a trick to keep playlist adds cheap: ncmpc tries to predict
the new playlist.
This is a trick to keep playlist adds cheap: ncmpc tries to predict
the new playlist.
removed obsolete Makefile.am
playlist: renamed "id" to "version"
mpdclient: check to assertion in mpdclient_cmd_add()
It's illegal to pass song=NULL.
It's illegal to pass song=NULL.
screen_browser: add "const" to several variables
screen_browser: pass playlist object to sync_highlights()
And add the screen_browser_ prefix to the function name.
And add the screen_browser_ prefix to the function name.
updated .gitignore
screen_outputs: toggle_output() returns bool
screen_outputs: implemented the SCREEN_UPDATE command
This reloads the output list from MPD.
This reloads the output list from MPD.
screen_outputs: added update() method
Automatically queue the "output" idle event when the user
enables/disables an output.
Automatically queue the "output" idle event when the user
enables/disables an output.
moved struct screen_functions to screen_interface.h
mpdclient: added function mpdclient_get_current_song()
screen_play: query status.id instead of song.id
screen_search: renamed internal functions
Use the "screen_search_" prefix.
Use the "screen_search_" prefix.
screen_artist: renamed internal functions
Use the "screen_artist_" prefix.
Use the "screen_artist_" prefix.
screen_file: renamed internal functions
Use the "screen_file_" prefix.
Use the "screen_file_" prefix.
moved screen_file_goto_song() prototype to screen_file.h
mpdclient: removed all callbacks
All users have switched to mpdclient.events.
All users have switched to mpdclient.events.
screen: use idle events in screen_update()
screen_browser: removed browser_playlist_changed()
This function is unused, since we have switched to idle events.
This function is unused, since we have switched to idle events.
screen_search: use idle events instead of playlist/browse callback
screen_artist: use idle events instead of playlist/browse callback
screen_file: use idle events instead of playlist/browse callback
screen_play: use idle events instead of playlist_callback
mpdclient: added property "events", emulate idle
mpdclient_update() sets the "events" property after it has detected
changes. This helps us eliminate the callback functions, and is a
good preparation for the real "idle" commandd.
mpdclient_update() sets the "events" property after it has detected
changes. This helps us eliminate the callback functions, and is a
good preparation for the real "idle" commandd.
mpdclient: replaced error_callback with imported function
Instead of having a GList of callback functions, call
mpdclient_ui_error(), which is exported by screen_client.c.
Instead of having a GList of callback functions, call
mpdclient_ui_error(), which is exported by screen_client.c.
mpdclient: mpdclient_filelist_get() returns NULL on error
Don't artificially return an empty list when an error occurs.
Also don't insert the dummy ".." entry in mpdclient_filelist_get(),
screen_file.c should do this.
Don't artificially return an empty list when an error occurs.
Also don't insert the dummy ".." entry in mpdclient_filelist_get(),
screen_file.c should do this.
screen_play: remember the id of the selected song
When the playlist changes, restore the song selection.
When the playlist changes, restore the song selection.
screen_play: added helper function playlist_selected_song()
screen_play: fixed list_window.range_selection usage
It's a bool.
It's a bool.
mpdclient.h: include mpd/client.h instead of mpd/tag.h
mpd/tag.h is not part of the libmpdclient2 API.
mpd/tag.h is not part of the libmpdclient2 API.
mpdclient: renamed "updatingdb" to "update_id"
Adopt libmpdclient's name.
Adopt libmpdclient's name.
player_command: use libmpdclient2 directly
Don't use mpdclient_cmd_X().
Don't use mpdclient_cmd_X().
screen: moved code to status_bar.c
screen_utils: don't pass WINDOW to screen_readln()
Callers shouldn't care which window will be used; we're going to use
the global variable screen.status_window.
Callers shouldn't care which window will be used; we're going to use
the global variable screen.status_window.
screen_utils: removed unused function screen_getstr()
screen_browser: repair the "mini" version
Added missing "}".
Added missing "}".
mpdclient: initialize "retval" in mpdclient_update()
screen: moved code to title_bar.c
screen: moved more (de)initialization code to progress_bar.c
mpdclient, screen: don't use MPD_STATUS_NO_VOLUME
It was removed from libmpdclient.
It was removed from libmpdclient.
progress_bar: do first paint manually
screen: moved refresh() to ncu_init()
The ncurses initialization code should do the refresh() to clear the
terminal, while screen_init() should reveal the empty controls
(progress bar currently).
The ncurses initialization code should do the refresh() to clear the
terminal, while screen_init() should reveal the empty controls
(progress bar currently).
screen: moved code to progress_bar.c
This class repaints only if the bar width has really changed. It uses
integer division instead of floating point.
This class repaints only if the bar width has really changed. It uses
integer division instead of floating point.
screen: moved struct window to window.h
mpdclient: handle password errors properly in mpdclient_connect()
Abort the connection when the configured password fails.
Abort the connection when the configured password fails.
screen_play: repaint on playlist change
When the playlist version changes, repaint the playlist screen. This
fixes a regression from the patch "repaint hscrolling only if selected
item is wide".
When the playlist version changes, repaint the playlist screen. This
fixes a regression from the patch "repaint hscrolling only if selected
item is wide".
screen_play: simplified function playlist_save()
mpdclient: mpdclient_update() returns bool
As a side effect, this patch adds the missing
mpdclient_finish_command() call to
mpdclient_playlist_update_changes().
As a side effect, this patch adds the missing
mpdclient_finish_command() call to
mpdclient_playlist_update_changes().
mpdclient: mpdclient_connect() returns bool
.. and disable recovery with mpdclient_handle_error().
.. and disable recovery with mpdclient_handle_error().
mpdclient: mpdclient_disconnect() returns void
There is no useful return value.
There is no useful return value.
screen_browser: optimize "add+play song" with addid/playid
Use the "addid"/"playid" commands in enqueue_and_play(). This
requires MPD 0.12.
Use the "addid"/"playid" commands in enqueue_and_play(). This
requires MPD 0.12.
require MPD 0.12
We will take advantage of the "addid" command, which was introduced in
MPD 0.12. Hey, who's still running 0.11 these days?
We will take advantage of the "addid" command, which was introduced in
MPD 0.12. Hey, who's still running 0.11 these days?
playlist: make functions const
And return const mpd_song objects.
And return const mpd_song objects.
playlist: pass struct mpdclient_playlist to functions
Passing a mpdclient object doesn't make sense in this library.
Passing a mpdclient object doesn't make sense in this library.
playlist: don't check mpd_song_get_uri()!=NULL
libmpdclient2 guarantees that each mpd_song object has an URI.
libmpdclient2 guarantees that each mpd_song object has an URI.
mpdclient: reactivate incremental playlist changes
A while ago, I broke "plchanges" calls because I forgot to add a "!"
before playlist_is_empty().
A while ago, I broke "plchanges" calls because I forgot to add a "!"
before playlist_is_empty().
screen_client: allow multiple queued database updates
MPD supports having multiple update paths in the queue. Let's just
invoke the "update" command and see what MPD responds.
MPD supports having multiple update paths in the queue. Let's just
invoke the "update" command and see what MPD responds.
screen_outputs: finish response in fill_outputs_list()
mpdclient: don't export mpdclient_finish_command()
Use plain libmpdclient2 functions plus mpdclient_handle_error()
instead.
Use plain libmpdclient2 functions plus mpdclient_handle_error()
instead.
mpdclient: export mpdclient_handle_error()
This function will allow callers to use libmpdclient2 directly.
This function will allow callers to use libmpdclient2 directly.
screen_file: moved update code to screen_client.c
Moved code from screen_file.c and player_command.c.
Moved code from screen_file.c and player_command.c.
screen_client: screen_auth() returns bool
true for success, false for error.
true for success, false for error.
screen_client: don't update twice in screen_auth()
One mpdclient_update() call is in _screen_auth(), and the second is in
screen_auth(). screen_auth() does not check whether _screen_auth()
was successful prior to that.
One mpdclient_update() call is in _screen_auth(), and the second is in
screen_auth(). screen_auth() does not check whether _screen_auth()
was successful prior to that.
screen_client: removed curs_set() call from screen_auth()
screen_read_password() is responsible for hiding the cursor when
finished.
screen_read_password() is responsible for hiding the cursor when
finished.
screen_utils: moved screen_auth() to screen_client.c
screen_client.c is a new library for MPD specific screen functions.
screen_client.c is a new library for MPD specific screen functions.
mpdclient: removed the "need_update" flag
It's set, but never read.
It's set, but never read.
mpdclient: removed the deprecated !ENABLE_PLCHANGES code
The ENABLE_PLCHANGES option has been enabled for ages.
The ENABLE_PLCHANGES option has been enabled for ages.
mpdclient: removed the deprecated !ENABLE_SONG_ID code
The ENABLE_SONG_ID option has been enabled for ages.
The ENABLE_SONG_ID option has been enabled for ages.
mpdclient: merged error_cb() into mpdclient_handle_error()
Let mpd_connection_clear_error() decide if the error was fatal.
Let mpd_connection_clear_error() decide if the error was fatal.
mpdclient: abort ncmpc if out of memory
When mpd_connection_new() returns NULL, there's not much we can do.
When mpd_connection_new() returns NULL, there's not much we can do.
main: don't skip "{}" in server error message
libmpdclient2 discards the command name from the error message, we
don't need to do it again.
libmpdclient2 discards the command name from the error message, we
don't need to do it again.
mpdclient: added mpdclient_is_connected()
This allows us to remove the global "connected" variable from main.c.
This allows us to remove the global "connected" variable from main.c.
main: changed "connected" check to assertion
timer_reconnect() must not be called when ncmpc is already connected.
timer_reconnect() must not be called when ncmpc is already connected.
screen_search: clear return value on error
search_advanced_query() has a redundant "fl!=NULL" check, and it does
not clear the "fl" variable after freeing the object.
search_advanced_query() has a redundant "fl!=NULL" check, and it does
not clear the "fl" variable after freeing the object.
screen_play: repaint hscrolling only if selected item is wide
When the "scroll" option is active, ncmpc repainted the whole screen
with each tick, even if the selected item is not wider than the
screen. This wasted a lot of CPU cycles.
When the "scroll" option is active, ncmpc repainted the whole screen
with each tick, even if the selected item is not wider than the
screen. This wasted a lot of CPU cycles.
moved the idle timer to player_command.c
Create it only on demand, while seeking.
Create it only on demand, while seeking.
player_command: handle_player_command() returns bool
screen: moved screen_client_cmd() to player_command.c
mpdclient: removed the mpdclient_t typedef
Use forward-declared struct instead. This also removes the typedefs
mpdclient_filelist_t, mpdclient_filelist_entry_t,
mpdclient_playlist_t.
Use forward-declared struct instead. This also removes the typedefs
mpdclient_filelist_t, mpdclient_filelist_entry_t,
mpdclient_playlist_t.
po: updated Chinese translation
po: updated German translation
po: updated French translation
use libmpdclient2
screen_search: pass const string to search_get_tag_id()
Modify version string to post-release version 0.16~git
ncmpc version 0.15