Renamed playlist "playlist-current" to "item-current".
[vlc.git] / modules / gui / maemo / maemo.c
index 0ee0c3e..96e6080 100644 (file)
@@ -36,6 +36,7 @@
 #include <hildon/hildon-banner.h>
 #include <gtk/gtk.h>
 #include <stdio.h>
+#include <inttypes.h>
 
 #include "maemo.h"
 #include "maemo_callbacks.h"
@@ -69,7 +70,7 @@ vlc_module_begin();
     add_shortcut( "maemo" );
 
     add_submodule();
-        set_capability( "vout_window", 50 );
+        set_capability( "xwindow", 50 );
         set_callbacks( OpenWindow, CloseWindow );
 vlc_module_end();
 
@@ -227,7 +228,7 @@ static void Run( intf_thread_t *p_intf )
     g_timeout_add( 150 /* miliseconds */, should_die, p_intf );
     var_AddCallback( p_intf->p_sys->p_playlist, "item-change",
                      item_changed_cb, p_intf );
-    var_AddCallback( p_intf->p_sys->p_playlist, "playlist-current",
+    var_AddCallback( p_intf->p_sys->p_playlist, "item-current",
                      playlist_current_cb, p_intf );
     var_AddCallback( p_intf->p_sys->p_playlist, "activity",
                      activity_cb, p_intf );
@@ -243,7 +244,7 @@ static void Run( intf_thread_t *p_intf )
     delete_input( p_intf );
     var_DelCallback( p_intf->p_sys->p_playlist, "item-change",
                      item_changed_cb, p_intf );
-    var_DelCallback( p_intf->p_sys->p_playlist, "playlist-current",
+    var_DelCallback( p_intf->p_sys->p_playlist, "item-current",
                      playlist_current_cb, p_intf );
     var_DelCallback( p_intf->p_sys->p_playlist, "activity",
                      activity_cb, p_intf );
@@ -253,8 +254,7 @@ static void Run( intf_thread_t *p_intf )
 
     if( p_vout )
     {
-        if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
-            vout_Control( p_vout, VOUT_REPARENT, 0 );
+        vout_Control( p_vout, VOUT_REPARENT, 0 );
         vlc_object_release( p_vout );
     }
 
@@ -287,10 +287,9 @@ static int OpenWindow (vlc_object_t *obj)
         msg_Err( obj, "Maemo interface not found" );
         return VLC_EGENERIC; /* Maemo not in use */
     }
-    assert (intf->i_object_type == VLC_OBJECT_INTF);
 
-    wnd->handle = request_video( intf, wnd->vout );
-    msg_Dbg( intf, "Using handle %p", wnd->handle );
+    wnd->handle.xid = request_video( intf, wnd->vout );
+    msg_Dbg( intf, "Using handle %"PRIu32, wnd->handle.xid );
 
     wnd->control = ControlWindow;
     wnd->p_private = intf;