diff --git a/src/main.c b/src/main.c
index 4c0f881e9d8311b564fa1b2e3782a5f6bb085b6e..044221024ff11bf1f78947a4ebe7e402edb8670b 100644 (file)
--- a/src/main.c
+++ b/src/main.c
static void
update_xterm_title(void)
{
- static char title[BUFSIZE];
struct mpd_status *status = NULL;
const struct mpd_song *song = NULL;
-
if (mpd) {
status = mpd->status;
song = mpd->song;
else
g_strlcpy(tmp, PACKAGE " version " VERSION, BUFSIZE);
+ static char title[BUFSIZE];
if (strncmp(title, tmp, BUFSIZE)) {
g_strlcpy(title, tmp, BUFSIZE);
set_xterm_title("%s", title);
assert(mpdclient_is_connected(c));
if (error != MPD_ERROR_SUCCESS) {
- char *allocated;
-
if (error == MPD_ERROR_SERVER &&
server_error == MPD_SERVER_ERROR_UNKNOWN_CMD) {
/* the "idle" command is not supported - fall
return;
}
+ char *allocated;
if (error == MPD_ERROR_SERVER)
message = allocated = utf8_to_locale(message);
else
timer_check_key_bindings(gcc_unused gpointer data)
{
char buf[256];
-#ifdef ENABLE_KEYDEF_SCREEN
- char comment[64];
-#endif
- gboolean key_error;
- key_error = check_key_bindings(NULL, buf, sizeof(buf));
- if (!key_error) {
+ if (check_key_bindings(NULL, buf, sizeof(buf))) {
/* no error: disable this timer for the rest of this
process */
check_key_bindings_source_id = 0;
/* to translators: a key was bound twice in the key editor,
and this is a hint for the user what to press to correct
that */
+ char comment[64];
g_snprintf(comment, sizeof(comment), _("press %s for the key editor"),
get_key_names(CMD_SCREEN_KEYDEF, false));
g_strlcat(buf, comment, sizeof(buf));