Code

ncmpc.git
15 years agocharset: added function locale_width()
Max Kellermann [Mon, 2 Nov 2009 21:54:41 +0000 (22:54 +0100)]
charset: added function locale_width()

This function is a rather expensive wrapper: it converts the string to
UTF-8 and calls utf8_width().

15 years agoscreen_song: properly implement line breaks
Max Kellermann [Mon, 2 Nov 2009 21:54:38 +0000 (22:54 +0100)]
screen_song: properly implement line breaks

The old code didn't consider wide characters.  This patch uses
utf8_cut_width() to break lines.

15 years agoscreen_song: fill spaces with memset()
Max Kellermann [Mon, 2 Nov 2009 21:51:05 +0000 (22:51 +0100)]
screen_song: fill spaces with memset()

Faster than a manual "for" loop.

15 years agoscreen_song: don't allow screen_song_append(NULL)
Max Kellermann [Mon, 2 Nov 2009 21:50:20 +0000 (22:50 +0100)]
screen_song: don't allow screen_song_append(NULL)

All callers make sure that value!=NULL.

15 years agoplayer_command: implement setup_seek() without a song object
Max Kellermann [Mon, 2 Nov 2009 19:57:38 +0000 (20:57 +0100)]
player_command: implement setup_seek() without a song object

Get the current song id from mpd_status_get_song_id().

15 years agoplayer_command: merged code into setup_seek()
Max Kellermann [Mon, 2 Nov 2009 19:46:22 +0000 (20:46 +0100)]
player_command: merged code into setup_seek()

15 years agoplayer_command: break from switch if not playing
Max Kellermann [Mon, 2 Nov 2009 17:53:07 +0000 (18:53 +0100)]
player_command: break from switch if not playing

Eliminate one indent level.

15 years agoscreen_queue: update current song in method open()
Max Kellermann [Mon, 2 Nov 2009 17:31:17 +0000 (18:31 +0100)]
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.

15 years agoscreen_queue: use mpd_status.song_pos for centering the list
Max Kellermann [Mon, 2 Nov 2009 17:29:06 +0000 (18:29 +0100)]
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.

15 years agoscreen_queue: eliminated length check in center()
Max Kellermann [Mon, 2 Nov 2009 17:23:53 +0000 (18:23 +0100)]
screen_queue: eliminated length check in center()

list_window_center() does all the checks fine.  Don't duplicate that.

15 years agoscreen_queue: eliminated unused variable "song"
Max Kellermann [Mon, 2 Nov 2009 17:15:25 +0000 (18:15 +0100)]
screen_queue: eliminated unused variable "song"

Not used in center_playing_item().

15 years agompdclient: added inline function mpdclient_is_playing()
Max Kellermann [Mon, 2 Nov 2009 17:14:38 +0000 (18:14 +0100)]
mpdclient: added inline function mpdclient_is_playing()

15 years agolyricwiki: convert numeric HTML escape sequences to proper characters
Thomas Jansen [Sun, 1 Nov 2009 23:49:11 +0000 (00:49 +0100)]
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.

15 years agopo: regenerated ncmpc.pot and *.po
Max Kellermann [Sun, 1 Nov 2009 15:20:02 +0000 (16:20 +0100)]
po: regenerated ncmpc.pot and *.po

A lot of code has been moved around.

15 years agopo: updated POTFILES.in
Max Kellermann [Sun, 1 Nov 2009 15:19:38 +0000 (16:19 +0100)]
po: updated POTFILES.in

There are several new source files, and screen_play.c has been renamed
to screen_queue.c.

15 years agoscreen_search: revert label to "Filename"
Max Kellermann [Sun, 1 Nov 2009 15:19:38 +0000 (16:19 +0100)]
screen_search: revert label to "Filename"

15 years agopo: updated Spanish translation
Paco Molinero [Sun, 1 Nov 2009 15:06:56 +0000 (16:06 +0100)]
po: updated Spanish translation

15 years agoscreen_outputs: preserve cursor position after update
Max Kellermann [Sat, 31 Oct 2009 18:28:16 +0000 (19:28 +0100)]
screen_outputs: preserve cursor position after update

Don't clear the list_window in clear_outputs_list().

15 years agocommand, conf: simplify variable initialization
Thomas Jansen [Thu, 29 Oct 2009 20:21:33 +0000 (21:21 +0100)]
command, conf: simplify variable initialization

15 years agomain: whitespace cosmetics
Thomas Jansen [Thu, 29 Oct 2009 20:10:09 +0000 (21:10 +0100)]
main: whitespace cosmetics

15 years agowreadln: whitespace cosmetics
Thomas Jansen [Thu, 29 Oct 2009 20:08:14 +0000 (21:08 +0100)]
wreadln: whitespace cosmetics

15 years agocommand: whitespace cosmetics
Thomas Jansen [Thu, 29 Oct 2009 20:05:55 +0000 (21:05 +0100)]
command: whitespace cosmetics

15 years agoscreen_help: whitespace cosmetics
Thomas Jansen [Thu, 29 Oct 2009 19:58:07 +0000 (20:58 +0100)]
screen_help: whitespace cosmetics

Replaced space characters with one tab to match the rest of the file.

15 years agolist_window: removed unnecessary reverse wattroff
Thomas Jansen [Thu, 29 Oct 2009 19:52:29 +0000 (20:52 +0100)]
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.

15 years agoscreen_browser: removed unnecessary reverse wattroff.
Thomas Jansen [Thu, 29 Oct 2009 09:12:15 +0000 (10:12 +0100)]
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.

15 years agoscreen_browse: removed unnecessary color selection
Thomas Jansen [Thu, 29 Oct 2009 09:07:05 +0000 (10:07 +0100)]
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.

15 years agoscreen_browser: removed duplicate line clearing
Thomas Jansen [Thu, 29 Oct 2009 09:03:34 +0000 (10:03 +0100)]
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.

15 years agoMerge branch 'master' of git://git.musicpd.org/jefromi/ncmpc
Max Kellermann [Thu, 29 Oct 2009 06:25:52 +0000 (07:25 +0100)]
Merge branch 'master' of git://git.musicpd.org/jefromi/ncmpc

15 years agodefaults: correct status/list formats
Jeffrey Middleton [Tue, 19 May 2009 19:58:52 +0000 (14:58 -0500)]
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.

15 years agoscreen_song: correct "is mpd playing?" logic
Jeffrey Middleton [Wed, 28 Oct 2009 20:34:45 +0000 (15:34 -0500)]
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)

15 years agoscreen_browse: make screen_browser_sync_highlights an empty inline function
Thomas Jansen [Wed, 28 Oct 2009 11:17:04 +0000 (12:17 +0100)]
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.

15 years agoMakefile.am: require automake 1.10
Thomas Jansen [Tue, 27 Oct 2009 11:18:20 +0000 (12:18 +0100)]
Makefile.am: require automake 1.10

Match the version mpd uses.

15 years agoMakefile.am: enable the "subdir-objects" option
Thomas Jansen [Tue, 27 Oct 2009 08:19:55 +0000 (09:19 +0100)]
Makefile.am: enable the "subdir-objects" option

Don't clutter the top directory with *.o files similar to mpd.

15 years agoscreen_file: sync highlights in screen_file_open
Thomas Jansen [Tue, 27 Oct 2009 08:15:19 +0000 (09:15 +0100)]
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.

15 years agompdclient: return after playlist_update() error
Max Kellermann [Fri, 23 Oct 2009 09:01:52 +0000 (11:01 +0200)]
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.

15 years agohscroll: reimplemented the hscroll library
Max Kellermann [Tue, 20 Oct 2009 06:00:13 +0000 (08:00 +0200)]
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.

15 years agostatus_bar: un-inline constructor and destructor
Max Kellermann [Tue, 20 Oct 2009 06:00:13 +0000 (08:00 +0200)]
status_bar: un-inline constructor and destructor

15 years agohscroll: simplify the code with utf8_cut_width()
Max Kellermann [Tue, 20 Oct 2009 06:00:12 +0000 (08:00 +0200)]
hscroll: simplify the code with utf8_cut_width()

Concatenate the input string twice, and select a substring from that
large string.

15 years agocharset: added function utf8_cut_width()
Max Kellermann [Tue, 20 Oct 2009 06:00:09 +0000 (08:00 +0200)]
charset: added function utf8_cut_width()

This function helps printing UTF-8 strings on limited screen space.

15 years agohscroll: work with UTF-8 strings
Max Kellermann [Tue, 20 Oct 2009 05:59:14 +0000 (07:59 +0200)]
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.

15 years agotest: added "run_hscroll" program
Max Kellermann [Tue, 20 Oct 2009 05:59:14 +0000 (07:59 +0200)]
test: added "run_hscroll" program

A program for debugging the hscroll.c library.

15 years agoscreen_browser: initialize local variable
Max Kellermann [Tue, 20 Oct 2009 05:59:11 +0000 (07:59 +0200)]
screen_browser: initialize local variable

15 years agoconfigure.ac: added option --enable-test
Max Kellermann [Tue, 20 Oct 2009 05:19:11 +0000 (07:19 +0200)]
configure.ac: added option --enable-test

This will enable the test suite.

15 years agoconfigure.ac: use standard autoconf variable names
Max Kellermann [Tue, 20 Oct 2009 05:19:06 +0000 (07:19 +0200)]
configure.ac: use standard autoconf variable names

Use the variable name implicitly created by AC_ARG_ENABLE.

15 years agopo: updated Korean translation
Jay Whang [Mon, 19 Oct 2009 13:45:04 +0000 (15:45 +0200)]
po: updated Korean translation

15 years agocharset: added "replace" functions
Max Kellermann [Mon, 19 Oct 2009 06:18:43 +0000 (08:18 +0200)]
charset: added "replace" functions

These functions are a shortcut for a common use case: convert an
allocated string in-place.

15 years agoscreen_browser: free temporary string
Max Kellermann [Sun, 18 Oct 2009 18:53:20 +0000 (20:53 +0200)]
screen_browser: free temporary string

In browser_lw_callback(), free the converted directory base name.

15 years agohscroll: use g_strconcat() instead of g_strlcpy() + g_strlcat()
Max Kellermann [Sun, 18 Oct 2009 18:35:59 +0000 (20:35 +0200)]
hscroll: use g_strconcat() instead of g_strlcpy() + g_strlcat()

15 years agohscroll: pass const strings to strscroll()
Max Kellermann [Sun, 18 Oct 2009 18:35:52 +0000 (20:35 +0200)]
hscroll: pass const strings to strscroll()

15 years agohscroll: don't include ctype.h
Max Kellermann [Sun, 18 Oct 2009 18:35:47 +0000 (20:35 +0200)]
hscroll: don't include ctype.h

15 years agompdclient: don't assign c->status twice in mpdclient_cmd_clear()
Max Kellermann [Sun, 18 Oct 2009 00:27:14 +0000 (02:27 +0200)]
mpdclient: don't assign c->status twice in mpdclient_cmd_clear()

Forgot to delete this line when I switched to mpdclient_recv_status().

15 years agompdclient: removed mpdclient_cmd_swap()
Max Kellermann [Sun, 18 Oct 2009 00:21:56 +0000 (02:21 +0200)]
mpdclient: removed mpdclient_cmd_swap()

Not used anymore.

15 years agoscreen_queue: move ranges with one single "move" command
Max Kellermann [Sun, 18 Oct 2009 00:21:13 +0000 (02:21 +0200)]
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.

15 years agompdclient: added function mpdclient_cmd_move()
Max Kellermann [Sun, 18 Oct 2009 00:20:17 +0000 (02:20 +0200)]
mpdclient: added function mpdclient_cmd_move()

15 years agoplaylist: added function playlist_move()
Max Kellermann [Sun, 18 Oct 2009 00:20:11 +0000 (02:20 +0200)]
playlist: added function playlist_move()

15 years agoplaylist: don't update the song positions in playlist_swap()
Max Kellermann [Sun, 18 Oct 2009 00:00:01 +0000 (02:00 +0200)]
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.

15 years agompdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap()
Max Kellermann [Sat, 17 Oct 2009 23:59:28 +0000 (01:59 +0200)]
mpdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap()

That function does not move, it swaps two songs.

15 years agompdclient: moved code to mpdclient_recv_status()
Max Kellermann [Sat, 17 Oct 2009 23:48:05 +0000 (01:48 +0200)]
mpdclient: moved code to mpdclient_recv_status()

Merge some duplicate code.

15 years agompdclient: optimize crop with delete_range
Max Kellermann [Sat, 17 Oct 2009 23:36:05 +0000 (01:36 +0200)]
mpdclient: optimize crop with delete_range

MPD 0.16 supports "delete" with a range.

15 years agompdclient: don't update the status in mpdclient_cmd_crop()
Max Kellermann [Sat, 17 Oct 2009 23:34:21 +0000 (01:34 +0200)]
mpdclient: don't update the status in mpdclient_cmd_crop()

This is kind of redundant, because it doesn't solve the theoretical
race condition, and doesn't improve too much to justify the latency.

15 years agompdclient: update mpdclient.playlist in mpdclient_cmd_clear()
Max Kellermann [Sat, 17 Oct 2009 23:04:11 +0000 (01:04 +0200)]
mpdclient: update mpdclient.playlist in mpdclient_cmd_clear()

Reduce UI latency.

15 years agompdclient: removed mpdclient_cmd_play()
Max Kellermann [Sat, 17 Oct 2009 22:57:11 +0000 (00:57 +0200)]
mpdclient: removed mpdclient_cmd_play()

Call mpdclient_run_play_id() directly.

15 years agoscreen_queue: set cursor before button handlers
Max Kellermann [Sat, 17 Oct 2009 22:55:26 +0000 (00:55 +0200)]
screen_queue: set cursor before button handlers

This allows us to use screen_queue_selected_song().

15 years agoscreen_queue: update list_window length after mouse delete
Max Kellermann [Sat, 17 Oct 2009 22:54:14 +0000 (00:54 +0200)]
screen_queue: update list_window length after mouse delete

Fix an assertion failure.

15 years agocheck the return value of mpdclient_get_connection()
Max Kellermann [Sat, 17 Oct 2009 22:32:37 +0000 (00:32 +0200)]
check the return value of mpdclient_get_connection()

When leaving idle mode, the idle callback (which is invoked indirectly
by mpdclient_get_connection()) may close the connection.  Checking
mpdclient_is_connected() before mpdclient_get_connection() is
pointless for that reason.

15 years agoscreen_file: return void from handle_X() functions
Max Kellermann [Sat, 17 Oct 2009 22:32:32 +0000 (00:32 +0200)]
screen_file: return void from handle_X() functions

Nobody evaluates the return values.

15 years agoscreen_browser: convert path only for the message
Max Kellermann [Sat, 17 Oct 2009 22:30:42 +0000 (00:30 +0200)]
screen_browser: convert path only for the message

We don't need the locale path if we don't print a message.

15 years agoscreen_outputs: reset list_window length in clear_outputs_list()
Max Kellermann [Sat, 17 Oct 2009 22:12:37 +0000 (00:12 +0200)]
screen_outputs: reset list_window length in clear_outputs_list()

Fix an assertion failure on disconnect.

15 years agoscreen_artist: check connection!=NULL in load_song_list()
Max Kellermann [Sat, 17 Oct 2009 22:01:18 +0000 (00:01 +0200)]
screen_artist: check connection!=NULL in load_song_list()

15 years agoscreen_file: always set new list_window length
Max Kellermann [Sat, 17 Oct 2009 21:54:58 +0000 (23:54 +0200)]
screen_file: always set new list_window length

screen_file_reload() did not update the list_window length if it was
not connected.  This led to an assertion failure.

15 years agogidle: mpd_glib_enter() returns success
Max Kellermann [Fri, 16 Oct 2009 13:08:51 +0000 (15:08 +0200)]
gidle: mpd_glib_enter() returns success

mpd_glib_enter() is unreliable, because it does nothing when called
during the callback, which in turn was invoked by mpd_glib_leave().
Sometimes, mpdclient.idle is wrong because of that.  This patch sets
mpdclient.idle to the return value of mpd_glib_enter().

15 years agogidle: added internal "destroyed" flag
Max Kellermann [Fri, 16 Oct 2009 13:06:58 +0000 (15:06 +0200)]
gidle: added internal "destroyed" flag

If mpd_glib_leave() invokes the callback, and the callback destroys
the mpd_glib_source object, mpd_glib_leave() is unable to reset the
"leaving" flag.  This patch adds the flag "destroyed" which lets
mpd_glib_leave() do the g_free() when it's ready.

15 years agoscreen_help: translate section names
Max Kellermann [Thu, 15 Oct 2009 13:38:22 +0000 (15:38 +0200)]
screen_help: translate section names

The _() call was missing.

15 years agopo: updated Russian translation
Max Arnold [Thu, 15 Oct 2009 13:36:26 +0000 (15:36 +0200)]
po: updated Russian translation

Conversion to UTF-8.

15 years agolist_window: removed second column support
Max Kellermann [Sun, 11 Oct 2009 17:46:11 +0000 (19:46 +0200)]
list_window: removed second column support

Not used anymore, because both screen_browser and screen_queue have a
row paint callback now.

15 years agoscreen_queue: use paint_song_row()
Max Kellermann [Sun, 11 Oct 2009 17:41:08 +0000 (19:41 +0200)]
screen_queue: use paint_song_row()

Reuse code from screen_browser.c.  Side effect: this patch disables
horizontal scrolling.  The "hscroll" library will return after an
overhaul.

15 years agoscreen_help: simplify the list_window callback
Max Kellermann [Sun, 11 Oct 2009 17:30:20 +0000 (19:30 +0200)]
screen_help: simplify the list_window callback

Return unmodified strings.  Since that callback isn't used for
painting, we don't need to consider the layout here.

15 years agoscreen_help: added paint callback
Max Kellermann [Sun, 11 Oct 2009 17:29:30 +0000 (19:29 +0200)]
screen_help: added paint callback

15 years agoscreen_help: use help_paint()
Max Kellermann [Sun, 11 Oct 2009 17:20:55 +0000 (19:20 +0200)]
screen_help: use help_paint()

Don't call list_window_paint() manually.

15 years agoscreen_help: removed the help_text_row_t typedef
Max Kellermann [Sun, 11 Oct 2009 17:20:52 +0000 (19:20 +0200)]
screen_help: removed the help_text_row_t typedef

Use the struct name.

15 years agocharset: make utf8_with() "pure"
Max Kellermann [Sun, 11 Oct 2009 17:20:49 +0000 (19:20 +0200)]
charset: make utf8_with() "pure"

This allows gcc to optimize further.

15 years agoscreen_queue: check current song only if PLAYER idle event is set
Max Kellermann [Sun, 11 Oct 2009 17:01:57 +0000 (19:01 +0200)]
screen_queue: check current song only if PLAYER idle event is set

15 years agoscreen_outputs: paint "enabled" checkbox
Max Kellermann [Sun, 11 Oct 2009 16:52:21 +0000 (18:52 +0200)]
screen_outputs: paint "enabled" checkbox

Instead of painting names in highlighted color, show the "enabled"
state with a checkbox.

15 years agoscreen_browser: moved paint_song() to song_paint.c
Max Kellermann [Sun, 11 Oct 2009 16:20:49 +0000 (18:20 +0200)]
screen_browser: moved paint_song() to song_paint.c

15 years agorenamed screen_play.c to screen_queue.c
Max Kellermann [Sun, 11 Oct 2009 16:16:05 +0000 (18:16 +0200)]
renamed screen_play.c to screen_queue.c

15 years agoscreen_browser: display song duration
Max Kellermann [Sun, 11 Oct 2009 13:41:34 +0000 (15:41 +0200)]
screen_browser: display song duration

15 years agoscreen_browser: don't return directory name with square brackets
Max Kellermann [Sun, 11 Oct 2009 12:55:53 +0000 (14:55 +0200)]
screen_browser: don't return directory name with square brackets

Since the browser_lw_callback() isn't used for rendering anymore (only
for searching), we can remove the page breaks.

15 years agoscreen_browser: added custom list painting function
Max Kellermann [Sun, 11 Oct 2009 12:55:23 +0000 (14:55 +0200)]
screen_browser: added custom list painting function

Side effect: playlists and directories are rendered with different
colors (configuration "browser-directory" and "browser-playlist").

15 years agolist_window: added callback function for row painting
Max Kellermann [Sun, 11 Oct 2009 12:53:28 +0000 (14:53 +0200)]
list_window: added callback function for row painting

With the function list_window_paint2(), callers can customize how a
row is painted.  The usual callback function is not used anymore.

15 years agolist_window: moved painting utilities to paint.h
Max Kellermann [Sun, 11 Oct 2009 12:15:38 +0000 (14:15 +0200)]
list_window: moved painting utilities to paint.h

Minor optimization: pass the full row width to whline().  This way,
ncurses performs clipping for us, and we don't have to call
utf8_width().

15 years agoscreen_browser: added wrapper function screen_browser_paint()
Max Kellermann [Sat, 10 Oct 2009 18:25:46 +0000 (20:25 +0200)]
screen_browser: added wrapper function screen_browser_paint()

Don't export browser_lw_callback().

15 years agolist_window: simplified narrow cursor drawing
Max Kellermann [Sat, 10 Oct 2009 18:20:24 +0000 (20:20 +0200)]
list_window: simplified narrow cursor drawing

Clear the space after the text before drawing the second column.  The
continue drawing the second column.

15 years agolist_window: simplify show_cursor formula
Max Kellermann [Sat, 10 Oct 2009 17:37:58 +0000 (19:37 +0200)]
list_window: simplify show_cursor formula

And call list_window_get_range() only if show_cursor is true.

15 years agolist_window: removed selected_start, selected_end
Max Kellermann [Sat, 10 Oct 2009 17:36:13 +0000 (19:36 +0200)]
list_window: removed selected_start, selected_end

Calculate those two variables on demand.  This simplifies a lot of
code, and saves some memory and CPU cycles.

15 years agompdclient: fall back to simple "deleteid" if range is 1
Max Kellermann [Sat, 10 Oct 2009 17:09:26 +0000 (19:09 +0200)]
mpdclient: fall back to simple "deleteid" if range is 1

15 years agooptions: removed deprecated password code
Max Kellermann [Sat, 10 Oct 2009 16:54:24 +0000 (18:54 +0200)]
options: removed deprecated password code

libmpdclient2 parses the password from the host name.

15 years agolist_window: eliminate redundant code in list_window_fetch_cursor()
Max Kellermann [Sat, 10 Oct 2009 16:51:36 +0000 (18:51 +0200)]
list_window: eliminate redundant code in list_window_fetch_cursor()

Use list_window_move_cursor() to eliminate redundant code.

15 years agolist_window: removed redundant range_base checks
Max Kellermann [Sat, 10 Oct 2009 16:46:04 +0000 (18:46 +0200)]
list_window: removed redundant range_base checks

No need to check range_base in list_window_check_selected().

15 years agolist_window: moved checks to list_window_validate_index()
Max Kellermann [Sat, 10 Oct 2009 16:39:37 +0000 (18:39 +0200)]
list_window: moved checks to list_window_validate_index()

15 years agolist_window: removed scrolling from list_window_check_selected()
Max Kellermann [Sat, 10 Oct 2009 16:37:18 +0000 (18:37 +0200)]
list_window: removed scrolling from list_window_check_selected()

This broke CMD_LIST_FIRST.