XMMS2 fix and refactoring patch sf.net id #2579357 (thanks Tamim).
authorTamim Khan <fusetak@users.sourceforge.net>
Wed, 18 Feb 2009 05:29:42 +0000 (22:29 -0700)
committerBrenden Matthews <brenden@rty.ca>
Wed, 18 Feb 2009 05:29:42 +0000 (22:29 -0700)
ChangeLog
src/conky.h
src/xmms2.c

index 0ec1823..22f3edd 100644 (file)
--- 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
index 02ed5b5..5f651ae 100644 (file)
@@ -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
index 14fa380..35adf05 100644 (file)
@@ -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, &current_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);