Code

main: remove useless "Connected to ..." message
authorMax Kellermann <max@duempel.org>
Fri, 8 Nov 2013 16:57:00 +0000 (17:57 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 8 Nov 2013 17:05:41 +0000 (18:05 +0100)
This message has no use, because the user already knows where he asked
ncmpc to connect to.  And it was annoying, because it delays the
progress display in the status bar.

NEWS
src/main.c

diff --git a/NEWS b/NEWS
index 4b17bd8c41bd8c8c379ddad2f5d71e2e07efa3f2..31c360045aeb4efc9184bdc8692a52b03f8f1916 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
 ncmpc 0.22 - not yet released
 * rename "playlist" to "queue"
+* remove useless "Connected to ..." message
 * require MPD 0.16
 
 
index 33678eecb9c05c76367b76c23bc0459cbb7a8270..d35fda4c0d89228dafa0a160ff5f14e130557dce 100644 (file)
@@ -280,23 +280,6 @@ default_settings_name(void)
 #endif
 }
 
-static char *
-connection_settings_name(const struct mpd_connection *connection)
-{
-#if LIBMPDCLIENT_CHECK_VERSION(2,4,0)
-       const struct mpd_settings *settings =
-               mpd_connection_get_settings(connection);
-       if (settings == NULL)
-               return g_strdup(_("unknown"));
-
-       return settings_name(settings);
-#else
-       (void)connection;
-
-       return default_settings_name();
-#endif
-}
-
 /**
  * This timer is installed when the connection to the MPD server is
  * broken.  It tries to recover by reconnecting periodically.
@@ -352,9 +335,7 @@ timer_reconnect(G_GNUC_UNUSED gpointer data)
        mpd->source = mpd_glib_new(connection,
                                   idle_callback, mpd);
 
-       name = connection_settings_name(connection);
-       screen_status_printf(_("Connected to %s"), name);
-       g_free(name);
+       screen_status_clear_message();
        doupdate();
 
        /* update immediately */