summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4a048ab)
raw | patch | inline | side by side (parent: 4a048ab)
author | Max Kellermann <max@duempel.org> | |
Mon, 14 Jul 2014 08:49:50 +0000 (10:49 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 14 Jul 2014 09:34:31 +0000 (11:34 +0200) |
src/main.c | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index 341fb1733e121988f89d8bc1b5a8893c0da21f5b..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
if (check_key_bindings(NULL, buf, sizeof(buf))) {
/* no error: disable this timer for the rest of this
/* 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));