Code

Merge remote branches 'jn/cosmetics', 'jn/doxygen' and 'jn/renames'
authorMax Kellermann <max@duempel.org>
Fri, 2 Dec 2011 11:10:46 +0000 (12:10 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 2 Dec 2011 11:10:46 +0000 (12:10 +0100)
75 files changed:
Makefile.am
configure.ac
src/charset.c
src/charset.h
src/colors.c
src/colors.h
src/command.c
src/command.h
src/conf.c
src/conf.h
src/defaults.h
src/filelist.c
src/filelist.h
src/hscroll.c
src/hscroll.h
src/i18n.h
src/lirc.c
src/lirc.h
src/list_window.c
src/list_window.h
src/lyrics.c
src/lyrics.h
src/main.c
src/match.c
src/match.h
src/mpdclient.c
src/mpdclient.h
src/ncmpc.h
src/ncmpc_curses.h
src/ncu.c
src/ncu.h
src/options.c
src/options.h
src/paint.h
src/player_command.c
src/player_command.h
src/playlist.c
src/playlist.h
src/plugin.c
src/plugin.h
src/screen.c
src/screen.h
src/screen_artist.c
src/screen_browser.c
src/screen_browser.h
src/screen_client.c
src/screen_file.c
src/screen_find.c
src/screen_help.c
src/screen_keydef.c
src/screen_list.c
src/screen_list.h
src/screen_lyrics.c
src/screen_message.c [deleted file]
src/screen_message.h [deleted file]
src/screen_outputs.c
src/screen_queue.c
src/screen_search.c
src/screen_song.c
src/screen_status.c [new file with mode: 0644]
src/screen_status.h [new file with mode: 0644]
src/screen_text.c
src/screen_text.h
src/screen_utils.c
src/screen_utils.h
src/song_paint.c
src/song_paint.h
src/str_pool.c
src/str_pool.h
src/strfsong.c
src/strfsong.h
src/utils.c
src/utils.h
src/wreadln.c
src/wreadln.h

index 52177c81124fb736a83555ebee23b23ae693f93a..a6ca4f2e140404ff821406e5cf41640d38aea783 100644 (file)
@@ -30,7 +30,7 @@ ncmpc_headers = \
        src/progress_bar.h \
        src/status_bar.h \
        src/screen.h \
-       src/screen_message.h \
+       src/screen_status.h \
        src/screen_interface.h \
        src/screen_list.h \
        src/screen_find.h \
@@ -90,7 +90,7 @@ src_ncmpc_SOURCES = \
        src/progress_bar.c \
        src/status_bar.c \
        src/screen.c \
-       src/screen_message.c \
+       src/screen_status.c \
        src/screen_list.c \
        src/screen_find.c \
        src/screen_utils.c \
index 3eb338447990854612bbe9912614bc11cafbec7f..19b8ba10a8ccc7d215030dfab4124f3c60981c4e 100644 (file)
@@ -31,7 +31,7 @@ dnl
 
 AC_ARG_ENABLE(mini,
     AS_HELP_STRING([--enable-mini],
-               [Build ncmpc-mini, i.e. without all optional features (default: disabled)]),,
+               [Build ncmpc-mini, i.e. without all optional features @<:@default=no@:>@]),,
     [enable_mini=no])
 
 AM_CONDITIONAL(NCMPC_MINI, test x$enable_mini = xyes)
@@ -71,7 +71,7 @@ dnl multi-byte character support
 
 AC_ARG_ENABLE([multibyte],
        AS_HELP_STRING([--disable-multibyte],
-               [Disable multibyte character support (default: enabled)]),,
+               [Disable multibyte character support @<:@default=yes@:>@]),,
                [enable_multibyte=$disable_mini])
 
 if test x$enable_multibyte = xyes; then
@@ -95,7 +95,7 @@ dnl i18n
 
 AC_ARG_ENABLE([locale],
        AS_HELP_STRING([--disable-locale],
-               [Disable locale support (default: auto)]),,
+               [Disable locale support @<:@default=auto@:>@]),,
                [enable_locale=$auto_mini])
 
 if test x$enable_locale = xyes; then
@@ -334,7 +334,7 @@ dnl
 
 AC_ARG_ENABLE(werror,
        AS_HELP_STRING([--enable-werror],
-               [Treat warnings as errors (default: disabled)]),,
+               [Treat warnings as errors @<:@default=no@:>@]),,
        enable_werror=no)
 
 if test "x$enable_werror" = xyes; then
@@ -343,7 +343,7 @@ fi
 
 AC_ARG_ENABLE(debug,
        AS_HELP_STRING([--enable-debug],
-               [Enable debugging (default: disabled)]),,
+               [Enable debugging @<:@default=no@:>@]),,
        enable_debug=no)
 
 if test "x$enable_debug" = xno; then
index 34381adfcdc3f195a5d7ac6fa139d2c95b70af89..157e022e48a0c3bd30c34544cdfcce786d547ec7 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "charset.h"
 
index 3dcdea7219dad6694e4532b22cd589cee4859776..1564f3fb750fcae384f56ba154535612afc1f492 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef CHARSET_H
 #define CHARSET_H
index 9f5409b2610f5dca203275efb809997b9c1f36b2..06362623bf9fa43bc391aae339fef4851993e25c 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "colors.h"
 #include "i18n.h"
index cfe345bbce1b1ce765719be533bc9e380ef2342e..f049df8766d1a7c600002f0ebc9e2972dfdf6ec6 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef COLORS_H
 #define COLORS_H
index 68b8d1e09dcea819d9c27a2619672eb501d37a1e..0e7e5a2551b2f348088a6875a60ac77b79fabf17 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "command.h"
 #include "config.h"
@@ -482,23 +482,20 @@ assign_keys(command_t command, int keys[MAX_COMMAND_KEYS])
 int
 check_key_bindings(command_definition_t *cp, char *buf, size_t bufsize)
 {
-       int i = 0;
+       int i;
        int retval = 0;
 
        if (cp == NULL)
                cp = cmds;
 
-       while (cp[i].name) {
+       for (i = 0; cp[i].name; i++)
                cp[i].flags &= ~COMMAND_KEY_CONFLICT;
-               i++;
-       }
 
-       i = 0;
-       while (cp[i].name) {
+       for (i = 0; cp[i].name; i++) {
                int j;
                command_t cmd;
 
-               for(j=0; j<MAX_COMMAND_KEYS; j++)
+               for(j=0; j<MAX_COMMAND_KEYS; j++) {
                        if (cp[i].keys[j] &&
                            (cmd = find_key_command(cp[i].keys[j],cp)) != cp[i].command) {
                                if (buf) {
@@ -519,8 +516,9 @@ check_key_bindings(command_definition_t *cp, char *buf, size_t bufsize)
                                set_key_flags(cp, cmd, COMMAND_KEY_CONFLICT);
                                retval = -1;
                        }
-               i++;
+               }
        }
+
        return retval;
 }
 
index cd0b23339f0a6975ee09950a0e3dff922ae783cb..d1e8122bc25b74ad5b0ae9ac82bf9a9db11d8e0b 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef COMMAND_H
 #define COMMAND_H
index 7fa2863c56776ff1abd17d23485629e121304c15..cce0b9408934025c097e139733f7362181e58389 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "conf.h"
 #include "config.h"
index 2a8cca2e5bc8f2b924b06f946c4272024d0af2c3..a031ff6efe1008051e78b0c4e7ea85e3c09cd55d 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "options.h"
 
index adc4554967a38d1a773e14accb847b5b2d819ebf..9bb934dacb9c44698ce076f2aa4c6d960c67e073 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef DEFAULTS_H
 #define DEFAULTS_H
index 91e569192b9bbda416356b32ed1b74ffe161d1a7..5138fdbcee86f25d65eb8e0941eb43a6ef2dc172 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "filelist.h"
 
index 63c2758ff0dea7753193aeb533fa7c3ee86fa7ab..ad4cbf37fa1dab0778700c0a14f24c6655463137 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef FILELIST_H
 #define FILELIST_H
index dafae93dee2dc3a0d9190267c34aa62e0e63d54d..a5ee63322ae43e3f215d1fc9e8fc927427dac98b 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "hscroll.h"
 #include "charset.h"
index 0b44dadc2001fdc0f460bb40d031c7d5cc581310..abbaded31ae2a6f7797e29f26d2c581c4d6c1f07 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef HSCROLL_H
 #define HSCROLL_H
index 569f8ea614f4755419f5dd365ee1643cf4144d98..cdd207ae3b452db5d10b51ff8fa0878ec96a471e 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef I18N_H
 #define I18N_H
index ff75b90321ea75678827df0922ac049a4b1272e0..4e67508087ed92066b59d0d31f9a34dbf057b0e8 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include <lirc/lirc_client.h>
 #include "lirc.h"
index 9032c29e9ba7cf56c4198d08c83ca8742319c174..c498aaed0019666641e5be144b24fdb1fba84e4c 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef LIRC_H
 #define LIRC_H
index 66c6d21361817ce61202d125be1564c085be707f..ad2ae77cc1f588b7e691d17b2079756f148dda62 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "list_window.h"
 #include "config.h"
@@ -25,7 +25,7 @@
 #include "command.h"
 #include "colors.h"
 #include "paint.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "i18n.h"
 
 #include <assert.h>
index bac5d5e77d6aadbeddb3315e8107b260942d7750..10e79edd5e022ba5f39ec5db4f9be9177cacc091 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef LIST_WINDOW_H
 #define LIST_WINDOW_H
index ae17a8fb9d18c0f1bd2a8dee7e463cea62d1c3ad..a6bbef2659263ee6258815c2e6cabc6ca9425f07 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "lyrics.h"
 #include "config.h"
index cc214828053fff948ddaca647bae083eeba6c182..59abb64666fef984132ac6bcfa233f71df6f066e 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef LYRICS_H
 #define LYRICS_H
index 389b8c68e570f2c8eb52a22e0419a81cfa62f35d..7e3e3df114055dabaa6087c172e6dbf462bc1010 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "config.h"
 #include "ncmpc.h"
@@ -27,7 +27,7 @@
 #include "ncu.h"
 #include "screen.h"
 #include "screen_utils.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "strfsong.h"
 #include "i18n.h"
 #include "player_command.h"
@@ -271,7 +271,12 @@ default_settings_name(void)
 
        return name;
 #else
-       return g_strdup(options.host);
+       /*
+        * localhost is actually not correct, we only know that
+        * mpd_connection_new() has connected to the "default host".
+        */
+       const char *name = options.host ?: "localhost";
+       return g_strdup(name);
 #endif
 }
 
@@ -288,12 +293,7 @@ connection_settings_name(const struct mpd_connection *connection)
 #else
        (void)connection;
 
-       /*
-        * localhost is actually not correct, we only know that
-        * mpd_connection_new() has connected to the "default host".
-        */
-       const char *name = options.host ?: "localhost";
-       return g_strdup(name);
+       return default_settings_name();
 #endif
 }
 
index 7a05db329e174846d0dc192f0ab30439b250b72b..b5d4c30f2422618a0a6f3ee125d2420f8ff4c5f5 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "match.h"
 #include "charset.h"
index 8ad0fd94d433c2f97047c919d3217c965568a1d9..5948ead19c2c519aa26b36dc3275029a71e7962a 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef MATCH_H
 #define MATCH_H
index 34d26df69e30a81965f3df091af98aad267a48cc..ec058061546c23cf1033076d220b267745ff2949 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "mpdclient.h"
 #include "filelist.h"
@@ -83,13 +83,6 @@ mpdclient_handle_error(struct mpdclient *c)
        return false;
 }
 
-static bool
-mpdclient_finish_command(struct mpdclient *c)
-{
-       return mpd_response_finish(c->connection)
-               ? true : mpdclient_handle_error(c);
-}
-
 struct mpdclient *
 mpdclient_new(void)
 {
index 7cdf7f5da121021f1726fe5a703e3489a944bbcf..d46b8a1c71460a45162a94cfdbd9599940b73858 100644 (file)
@@ -2,6 +2,7 @@
 #define MPDCLIENT_H
 
 #include "playlist.h"
+#include "mpdclient.h"
 
 #include <mpd/client.h>
 
@@ -66,6 +67,13 @@ enum {
 bool
 mpdclient_handle_error(struct mpdclient *c);
 
+static inline bool
+mpdclient_finish_command(struct mpdclient *c)
+{
+       return mpd_response_finish(c->connection)
+               ? true : mpdclient_handle_error(c);
+}
+
 struct mpdclient *
 mpdclient_new(void);
 
index 5f57611f76cb888fac5bb2a5ad877314d11da5bc..0b6441850a4972f14cf9921b726ab7868947af1b 100644 (file)
@@ -1,27 +1,28 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef NCMPC_H
 #define NCMPC_H
 
 #include "command.h"
 
+/** put the terminal in a sane mode and stop/suspend ncmpc */
 void
 sigstop(void);
 
index 99cd7cf8e8dd7bd676932552cbc76d29425a1039..5aa5d0d4dddd67d4e2ba983071aa830b50b3bab9 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #if defined(HAVE_NCURSESW_CURSES_H)
 #  include <ncursesw/curses.h>
index 40e22eae0d1363ffb1b73304d3bc71b1dca9bb6b..ea6997e87f2c89c19b3e123006cc08d96ed140da 100644 (file)
--- a/src/ncu.c
+++ b/src/ncu.c
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "ncu.h"
 #include "config.h"
index 804afba5e832fd7b8e53dcaa9995f72a5412e794..97084c771d3c02fa69d4e382c5b090575fb487c5 100644 (file)
--- a/src/ncu.h
+++ b/src/ncu.h
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 /*
  * Basic libnucrses initialization.
index e84b5013b1859d80b3d20eeec03a75f96e4baaf0..f7044ccbe24ddd9645b77a2e8f66f61c75291b03 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "options.h"
 #include "config.h"
@@ -264,14 +264,12 @@ handle_option(int c, const char *arg)
                g_free(options.key_file);
                options.key_file = g_strdup(arg);
                break;
-#ifndef NDEBUG
-#ifndef NCMPC_MINI
+#if !defined(NDEBUG) && !defined(NCMPC_MINI)
        case 'K': /* --dump-keys */
                read_configuration();
                write_key_bindings(stdout, KEYDEF_WRITE_ALL | KEYDEF_COMMENT_ALL);
                exit(EXIT_SUCCESS);
                break;
-#endif
 #endif
        default:
                fprintf(stderr,"Unknown Option %c = %s\n", c, arg);
index b9bb0eed3d0a768348371ea493fdb3998241b675..a8ad1ffdd76712036f19af881c404f7f5934c005 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef OPTIONS_H
 #define OPTIONS_H
index 4aeec9e188c749b619c32d6baf4f3de202969452..b3eb3ea9339d115c4df553c0c581d71b6d3dc767 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef NCMPC_PAINT_H
 #define NCMPC_PAINT_H
index 2455c83e58cdb74b5645730c0a91590c5c0e073b..f38147a7c7c7985c3c5c5aee6cbe37209219fbfd 100644 (file)
@@ -1,17 +1,17 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -22,7 +22,7 @@
 #include "options.h"
 #include "i18n.h"
 #include "screen_client.h"
-#include "screen_message.h"
+#include "screen_status.h"
 
 int seek_id = -1;
 int seek_target_time;
index 3107a2d2897d644c024936cc48fa91bce4bb9dba..924e936804871579d6de586b960dee744b03b981 100644 (file)
@@ -1,17 +1,17 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
index c95f447080d7dab9bafa61afd556f22afc7f74de..8ec007be47d27b2ff61e0dc735aae805eba1e767 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "playlist.h"
 
index 5b7aeee33842bff67ce37ffa64fbadb30ada2444..00434961e0a44963cb6957d9d59e17e0170edd76 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef MPDCLIENT_PLAYLIST_H
 #define MPDCLIENT_PLAYLIST_H
index f578575781fef6dde6b98999d24c5593ccaa50cc..fcfaea9752e124bb48008daf70d2ee57a2d50504 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "plugin.h"
 
index 5e216bc5513d69a2c7d2a3dbee320f0b79f3a148..580ca2898c4b1bb27d8717462a0a72cc897a503b 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef PLUGIN_H
 #define PLUGIN_H
index fdc168adb5efc3869e65425e6579a3d6d8cd4c8a..c34d3962e35b4afb20f48f62e9fa66b34c7d3d2e 100644 (file)
@@ -1,27 +1,27 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen.h"
 #include "screen_interface.h"
 #include "screen_list.h"
 #include "screen_utils.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "config.h"
 #include "i18n.h"
 #include "charset.h"
index d0ae704a0ec845a57307a597055eb72adbb723a6..f6cfa9cf710fbcbd61546dc514c0a1b3ac7818f0 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef SCREEN_H
 #define SCREEN_H
index 3ae214545ff3b1766f3859529be494c5ae60f6bc..d488a7b9cb5a0090c280fefbfb34a749c3f9b304 100644 (file)
@@ -1,25 +1,25 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_artist.h"
 #include "screen_interface.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen_find.h"
 #include "screen_browser.h"
 #include "screen.h"
@@ -162,8 +162,7 @@ load_artist_list(struct mpdclient *c)
                mpd_search_commit(connection);
                recv_tag_values(connection, MPD_TAG_ARTIST, artist_list);
 
-               if (!mpd_response_finish(connection))
-                       mpdclient_handle_error(c);
+               mpdclient_finish_command(c);
        }
 
        /* sort list */
@@ -193,8 +192,7 @@ load_album_list(struct mpdclient *c)
 
                recv_tag_values(connection, MPD_TAG_ALBUM, album_list);
 
-               if (!mpd_response_finish(connection))
-                       mpdclient_handle_error(c);
+               mpdclient_finish_command(c);
        }
 
        /* sort list */
@@ -228,8 +226,7 @@ load_song_list(struct mpdclient *c)
 
                filelist_recv(browser.filelist, connection);
 
-               if (!mpd_response_finish(connection))
-                       mpdclient_handle_error(c);
+               mpdclient_finish_command(c);
        }
 
        /* fix highlights */
@@ -481,10 +478,8 @@ add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter,
 
        addlist = filelist_new_recv(connection);
 
-       if (mpd_response_finish(connection))
+       if (mpdclient_finish_command(c))
                mpdclient_filelist_add_all(c, addlist);
-       else
-               mpdclient_handle_error(c);
 
        filelist_free(addlist);
 }
index 04673f4e85a7e5632525a3cf19820fcab1d80ad6..31c5b6525f68fca91068920679c42e56bb0aeebf 100644 (file)
@@ -1,28 +1,28 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "config.h"
 #include "screen_browser.h"
 #include "screen_file.h"
 #include "screen_song.h"
 #include "screen_lyrics.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen_find.h"
 #include "screen.h"
 #include "i18n.h"
index f6cfd5a57d21c0c604d888bbd299bc9cc65048fe..b30a1da53beb7632def15dc293e1407acab75e6a 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef SCREEN_BROWSER_H
 #define SCREEN_BROWSER_H
index f864f1998498e810ea182feddbf3183344220f14..b8e936fdbc0fe6147edd4bbd961f2c590551368d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "screen_client.h"
 #include "screen_utils.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "mpdclient.h"
 #include "i18n.h"
 #include "charset.h"
index 73f56005f51f244ca26d4972c9441846931ddb36..4eb8943d1810effaa6cb1ef1c33610acb631e2ce 100644 (file)
@@ -1,26 +1,26 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_file.h"
 #include "screen_browser.h"
 #include "screen_interface.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen_queue.h"
 #include "screen.h"
 #include "config.h"
@@ -63,10 +63,8 @@ screen_file_load_list(struct mpdclient *c, struct filelist *filelist)
        mpd_send_list_meta(connection, current_path);
        filelist_recv(filelist, connection);
 
-       if (mpd_response_finish(connection))
+       if (mpdclient_finish_command(c))
                filelist_sort_dir_play(filelist, compare_filelist_entry_path);
-       else
-               mpdclient_handle_error(c);
 }
 
 static void
index 4113c39a522a1aef207c03540a60dac708ec25a1..3fdf9f30dd923914723c2e85658161e95a8a322f 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "screen_find.h"
 #include "screen_utils.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen.h"
 #include "i18n.h"
 #include "options.h"
index faa9603e7aea0aaf1db978cd930852bc3f546f61..038ab3becbf52b49c1bec0532e25a7eb10055d66 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_help.h"
 #include "screen_interface.h"
index 8ecc003ac94cc0493a0c6daaef125dafc9cb5769..6e19d8d2bb924cb62a38e89bd4f157cffb4415fd 100644 (file)
@@ -1,25 +1,25 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_keydef.h"
 #include "screen_interface.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen_find.h"
 #include "i18n.h"
 #include "conf.h"
index a6bbf8df0587412f135d75c7d3ea8ce2534ad5bb..e0ddecf53390c13c73cbd2aaa4935306f48dd312 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_list.h"
 #include "screen_interface.h"
index aa10e32782bc38124e603d237ed5cf4350ccd1a8..0de7a6785a00a4ba2a701c520ab7211a8b65aac5 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef SCREEN_LIST_H
 #define SCREEN_LIST_H
index e655fc5f37c1fcb53e2ce79d62b9c4be3aa0bb67..6de59d5ef073869bb109728e91d36cdd524f6987 100644 (file)
@@ -1,25 +1,25 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_lyrics.h"
 #include "screen_interface.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen_file.h"
 #include "screen_song.h"
 #include "i18n.h"
diff --git a/src/screen_message.c b/src/screen_message.c
deleted file mode 100644 (file)
index 6bb907d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
- * Project homepage: http://musicpd.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include "screen_message.h"
-#include "screen.h"
-
-#include <stdarg.h>
-
-void
-screen_status_message(const char *msg)
-{
-       status_bar_message(&screen.status_bar, msg);
-}
-
-void
-screen_status_printf(const char *format, ...)
-{
-       char *msg;
-       va_list ap;
-
-       va_start(ap,format);
-       msg = g_strdup_vprintf(format,ap);
-       va_end(ap);
-       screen_status_message(msg);
-       g_free(msg);
-}
diff --git a/src/screen_message.h b/src/screen_message.h
deleted file mode 100644 (file)
index fa789a6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
- * Project homepage: http://musicpd.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef NCMPC_SCREEN_MESSAGE_H
-#define NCMPC_SCREEN_MESSAGE_H
-
-void
-screen_status_message(const char *msg);
-
-void
-screen_status_printf(const char *format, ...);
-
-#endif
index af0b2d35b96bbba812c4ce4da3037cc36e068ede..888aa34f1f9edcbb970564e173f746443e5809db 100644 (file)
@@ -1,25 +1,25 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_outputs.h"
 #include "screen_interface.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "paint.h"
 #include "i18n.h"
 #include "list_window.h"
@@ -130,8 +130,7 @@ fill_outputs_list(struct mpdclient *c)
                g_ptr_array_add(mpd_outputs, output);
        }
 
-       if (!mpd_response_finish(connection))
-               mpdclient_handle_error(c);
+       mpdclient_finish_command(c);
 
        list_window_set_length(lw, mpd_outputs->len);
 }
index 31c4dcc8a93ad0801cf84e01c8dc9afd7022702e..b21dc3aa0536d21b5365919f14e8f04880d34460 100644 (file)
@@ -20,7 +20,7 @@
 #include "screen_queue.h"
 #include "screen_interface.h"
 #include "screen_file.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen_find.h"
 #include "config.h"
 #include "i18n.h"
index 86c2bb171a74df7d335908e4325878146e77b60c..5e9226e6cff234246638f1121bf1c15447ae2860 100644 (file)
@@ -1,25 +1,25 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_search.h"
 #include "screen_interface.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen.h"
 #include "i18n.h"
 #include "options.h"
index e738fc2914f9eb4f57faec1220ea54e38ff9d82b..22f52f4b4441233f33da4929006e2d762074a16d 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_song.h"
 #include "screen_interface.h"
@@ -36,6 +36,7 @@
 
 enum {
        LABEL_LENGTH = MPD_TAG_COUNT,
+       LABEL_PATH,
        LABEL_BITRATE,
 };
 
@@ -51,6 +52,7 @@ static const char *const tag_labels[] = {
        [MPD_TAG_DATE] = N_("Date"),
        [MPD_TAG_GENRE] = N_("Genre"),
        [MPD_TAG_COMMENT] = N_("Comment"),
+       [LABEL_PATH] = N_("Path"),
        [LABEL_BITRATE] = N_("Bitrate"),
 };
 
@@ -308,10 +310,11 @@ screen_song_add_song(const struct mpd_song *song, const struct mpdclient *c)
        screen_song_append_tag(song, MPD_TAG_GENRE);
        screen_song_append_tag(song, MPD_TAG_COMMENT);
 
-       screen_song_append(_("Path"), mpd_song_get_uri(song),
+       screen_song_append(_(tag_labels[LABEL_PATH]), mpd_song_get_uri(song),
                           max_tag_label_width);
        if (mpdclient_is_playing(c) && c->song != NULL &&
-           strcmp(mpd_song_get_uri(c->song), mpd_song_get_uri(song)) == 0) {
+           strcmp(mpd_song_get_uri(c->song), mpd_song_get_uri(song)) == 0 &&
+           mpd_status_get_kbit_rate(c->status)) {
                char buf[16];
                g_snprintf(buf, sizeof(buf), _("%d kbps"),
                           mpd_status_get_kbit_rate(c->status));
diff --git a/src/screen_status.c b/src/screen_status.c
new file mode 100644 (file)
index 0000000..36f8753
--- /dev/null
@@ -0,0 +1,42 @@
+/* ncmpc (Ncurses MPD Client)
+ * (c) 2004-2010 The Music Player Daemon Project
+ * Project homepage: http://musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "screen_status.h"
+#include "screen.h"
+
+#include <stdarg.h>
+
+void
+screen_status_message(const char *msg)
+{
+       status_bar_message(&screen.status_bar, msg);
+}
+
+void
+screen_status_printf(const char *format, ...)
+{
+       char *msg;
+       va_list ap;
+
+       va_start(ap,format);
+       msg = g_strdup_vprintf(format,ap);
+       va_end(ap);
+       screen_status_message(msg);
+       g_free(msg);
+}
diff --git a/src/screen_status.h b/src/screen_status.h
new file mode 100644 (file)
index 0000000..d951290
--- /dev/null
@@ -0,0 +1,29 @@
+/* ncmpc (Ncurses MPD Client)
+ * (c) 2004-2010 The Music Player Daemon Project
+ * Project homepage: http://musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef NCMPC_SCREEN_STATUS_H
+#define NCMPC_SCREEN_STATUS_H
+
+void
+screen_status_message(const char *msg);
+
+void
+screen_status_printf(const char *format, ...);
+
+#endif
index 617d38e2b592d0cf27653f09f651d667fd4f8564..21e73aac8ad47869bcbca505b7ea924ce3eac90f 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_text.h"
 #include "screen_find.h"
index 2f6f7950b9ee41778f03cc513cb3585714893184..0e681dab5bd7fc6040bcbf8c1e38c2978eb82e20 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef SCREEN_TEXT_H
 #define SCREEN_TEXT_H
index ab1b39b0163c6c25a32de3bf9cff58b0f7d19935..1203a938c8c4ca657c1f31b2a78bb7b316e470ce 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "screen_utils.h"
 #include "screen.h"
index e67648ea1b569a6b30990d4d95d038246362ad87..1691e2b7edf83df8411b5fcf41df7198cf91f077 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef SCREEN_UTILS_H
 #define SCREEN_UTILS_H
index c8123fdce6a06bf097a30d1edc4260e03c359f85..b0c452b8472d5b58c5c66f3206b1d9fb4aa18410 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "song_paint.h"
 #include "paint.h"
index 7a676608aa24b0c9e7cf4382f5092685aded6380..808109517530240f32a8d5c512dd3429a5e95a19 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef NCMPC_SONG_PAINT_H
 #define NCMPC_SONG_PAINT_H
index 57c4c4f9f724b2b0521b99c55c093526326958d3..b565d97830be024439d7654951f8a6e5153f0a8d 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "str_pool.h"
 
index 20f04a90cfdd930c27e3a24349abb38b4d39a6c1..9770f1b40d40b1e098756e55678046a31a234511 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef STR_POOL_H
 #define STR_POOL_H
index ac0e0490986ccf1740ab6a248cc0abbb9724c67f..3d5abd5797dfd78e50e9515f72763efabf5ee7cc 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "strfsong.h"
 #include "charset.h"
index 4aff6c5d0ddf407091ca9c0a140943c66ff1899b..d8c48f8b9ca7933e2d082bb461e3942f979869b9 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef STRFSONG_H
 #define STRFSONG_H
index b748580a05cb0b81f396c8dc413215699f02bcf3..6fdcbc764fcff2faee70cec4dec620a590c105ca 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "utils.h"
 #include "options.h"
index c3a6f1eed7d3de2e439fb4ae247338b9065abda8..82890a5fbc61427cd30e158fc5eeb6a6267f0b08 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef UTILS_H
 #define UTILS_H
index be4f2667cc391732731e2ef06cf94536ddb98c4f..45c2603bd3a87ea833ed5e89e78420ceb44a4086 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
-
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "wreadln.h"
 #include "charset.h"
index 0a4572d4e0377978f538d7d046705036e005e89d..7f2a6df48d434dbc5b09f3c150f831a4cd0dce54 100644 (file)
@@ -1,21 +1,21 @@
 /* ncmpc (Ncurses MPD Client)
  * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #ifndef WREADLN_H
 #define WREADLN_H