summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e8c02d)
raw | patch | inline | side by side (parent: 7e8c02d)
author | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 05:58:55 +0000 (07:58 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 05:58:55 +0000 (07:58 +0200) |
It was removed from libmpdclient.
src/mpdclient.c | patch | blob | history | |
src/screen.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 77638d65c7b5691d4190200989dafc8d5bdcf5eb..aecf4f9b4b4b2dc1ba71a18d9e9795422c49d60e 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
c = g_new0(struct mpdclient, 1);
playlist_init(&c->playlist);
- c->volume = MPD_STATUS_NO_VOLUME;
+ c->volume = -1;
return c;
}
{
bool retval;
- c->volume = MPD_STATUS_NO_VOLUME;
+ c->volume = -1;
if (MPD_ERROR(c))
return false;
return -1;
if (c->status == NULL ||
- mpd_status_get_volume(c->status) == MPD_STATUS_NO_VOLUME)
+ mpd_status_get_volume(c->status) == -1)
return 0;
- if (c->volume == MPD_STATUS_NO_VOLUME)
+ if (c->volume < 0)
c->volume = mpd_status_get_volume(c->status);
if (c->volume >= 100)
if (MPD_ERROR(c))
return -1;
- if (c->status == NULL ||
- mpd_status_get_volume(c->status) == MPD_STATUS_NO_VOLUME)
+ if (c->status == NULL || mpd_status_get_volume(c->status) < 0)
return 0;
- if (c->volume == MPD_STATUS_NO_VOLUME)
+ if (c->volume < 0)
c->volume = mpd_status_get_volume(c->status);
if (c->volume <= 0)
diff --git a/src/screen.c b/src/screen.c
index eaff0d95117d06e45adf959726346f0b9e2d071d..15a98d08e25b647f659fcb56bbd8567f94851c46 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
{
return status != NULL
? mpd_status_get_volume(status)
- : MPD_STATUS_NO_VOLUME;
+ : -1;
}
static void
}
volume = get_volume(c->status);
- if (volume == MPD_STATUS_NO_VOLUME)
+ if (volume < 0)
g_snprintf(buf, 32, _("Volume n/a"));
else
g_snprintf(buf, 32, _("Volume %d%%"), volume);