From b3f890e48e42fb39d46f9f085aa33b937c172ed0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 8 Nov 2013 17:57:00 +0100 Subject: [PATCH] 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. --- NEWS | 1 + src/main.c | 21 +-------------------- 2 files changed, 2 insertions(+), 20 deletions(-) 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 */ -- 2.30.2