diff --git a/src/screen.c b/src/screen.c
index c34d3962e35b4afb20f48f62e9fa66b34c7d3d2e..b272935fe2c04bda83531609fbc87016c60d14f6 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
#include "screen_keydef.h"
#include "screen_lyrics.h"
#include "screen_outputs.h"
+#include "screen_chat.h"
#include <mpd/client.h>
screen_next_mode(struct mpdclient *c, int offset)
{
int max = g_strv_length(options.screen_list);
- int current, next;
- const struct screen_functions *sf;
/* find current screen */
- current = find_configured_screen(screen_get_name(mode_fn));
- next = current + offset;
+ int current = find_configured_screen(screen_get_name(mode_fn));
+ int next = current + offset;
if (next<0)
next = max-1;
else if (next>=max)
next = 0;
- sf = screen_lookup_name(options.screen_list[next]);
+ const struct screen_functions *sf =
+ screen_lookup_name(options.screen_list[next]);
if (sf != NULL)
screen_switch(sf, c);
}
static void
update_progress_window(struct mpdclient *c, bool repaint)
{
- unsigned elapsed, duration;
-
+ unsigned elapsed;
if (c->status == NULL)
elapsed = 0;
else if (seek_id >= 0 && seek_id == mpd_status_get_song_id(c->status))
else
elapsed = mpd_status_get_elapsed_time(c->status);
- duration = mpdclient_is_playing(c)
+ unsigned duration = mpdclient_is_playing(c)
? mpd_status_get_total_time(c->status)
: 0;
case CMD_SCREEN_OUTPUTS:
screen_switch(&screen_outputs, c);
break;
+#endif
+#ifdef ENABLE_CHAT_SCREEN
+ case CMD_SCREEN_CHAT:
+ screen_switch(&screen_chat, c);
+ break;
#endif
case CMD_SCREEN_SWAP:
screen_swap(c, NULL);