From: Max Kellermann Date: Fri, 8 Nov 2013 16:57:00 +0000 (+0100) Subject: main: remove useless "Connected to ..." message X-Git-Tag: v0.22~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b3f890e48e42fb39d46f9f085aa33b937c172ed0;p=ncmpc.git main: remove useless "Connected to ..." message 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. --- diff --git a/NEWS b/NEWS index 4b17bd8..31c3600 100644 --- 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 diff --git a/src/main.c b/src/main.c index 33678ee..d35fda4 100644 --- a/src/main.c +++ b/src/main.c @@ -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 */