diff --git a/ChangeLog b/ChangeLog index 0ec1823e..22f3eddd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ is not full charged patch sf.net id #2556056 (thanks Martin) * Extended support for local Maildir patch sf.net id #2561323 (thanks Nicolas) + * XMMS2 fix and refactoring patch sf.net id #2579357 (thanks Tamim) 2009-02-15 * Added out_to_x diff --git a/src/conky.h b/src/conky.h index 02ed5b55..5f651ae3 100644 --- a/src/conky.h +++ b/src/conky.h @@ -235,8 +235,6 @@ struct information { #ifdef XMMS2 struct xmms2_s xmms2; int xmms2_conn_state; - xmms_socket_t xmms2_fd; - fd_set xmms2_fdset; xmmsc_connection_t *xmms2_conn; #endif #ifdef AUDACIOUS diff --git a/src/xmms2.c b/src/xmms2.c index 14fa3800..35adf05b 100644 --- a/src/xmms2.c +++ b/src/xmms2.c @@ -315,8 +315,11 @@ void update_xmms2() xmmsc_broadcast_playback_status, handle_playback_state_change, current_info); XMMS_CALLBACK_SET(current_info->xmms2_conn, - xmmsc_broadcast_playlist_loaded, handle_playlist_loaded, - current_info); + xmmsc_broadcast_playlist_loaded, handle_playlist_loaded, + current_info); + XMMS_CALLBACK_SET(current_info->xmms2_conn, + xmmsc_broadcast_medialib_entry_changed, handle_curent_id, + current_info); /* get playback status, current id and active playlist */ XMMS_CALLBACK_SET(current_info->xmms2_conn, @@ -335,14 +338,7 @@ void update_xmms2() /* handle callbacks */ if (current_info->xmms2_conn_state == CONN_OK) { - struct timeval tmout; - - tmout.tv_sec = 0; - tmout.tv_usec = 100; - - select(current_info->xmms2_fd + 1, ¤t_info->xmms2_fdset, NULL, - NULL, &tmout); - + xmmsc_io_in_handle(current_info->xmms2_conn); if (xmmsc_io_want_out(current_info->xmms2_conn)) { xmmsc_io_out_handle(current_info->xmms2_conn);