]> git.sesse.net Git - vlc/blobdiff - modules/gui/pda/pda.c
Remove intf_ShouldDie
[vlc] / modules / gui / pda / pda.c
index 15719707632955b6c90b5457560578033c0bd00c..5776b67fe5f474a029bd13c9ff9c884332230d03 100644 (file)
@@ -156,6 +156,7 @@ static void Run( intf_thread_t *p_intf )
     GtkTreeViewColumn *p_column   = NULL;
     GtkListStore      *p_filelist = NULL;
     GtkListStore      *p_playlist_store = NULL;
+    int canc = vlc_savecancel();
 
 #ifndef NEED_GTK2_MAIN
     gtk_set_locale ();
@@ -316,7 +317,7 @@ static void Run( intf_thread_t *p_intf )
 
 #ifdef NEED_GTK2_MAIN
     msg_Dbg( p_intf, "Manage GTK keyboard events using threads" );
-    while( !intf_ShouldDie( p_intf ) )
+    while( vlc_object_alive( p_intf ) )
     {
         Manage( p_intf );
 
@@ -348,6 +349,7 @@ static void Run( intf_thread_t *p_intf )
 #ifdef NEED_GTK2_MAIN
     gdk_threads_leave();
 #endif
+    vlc_restorecancel(canc);
 }
 
 /*****************************************************************************
@@ -514,14 +516,14 @@ static int Manage( intf_thread_t *p_intf )
         }
         vlc_object_unlock( p_input );
     }
-    else if( p_intf->p_sys->b_playing && !intf_ShouldDie( p_intf ) )
+    else if( p_intf->p_sys->b_playing && vlc_object_alive( p_intf ) )
     {
         GtkModeManage( p_intf );
         p_intf->p_sys->b_playing = 0;
     }
 
 #ifndef NEED_GTK2_MAIN
-    if( intf_ShouldDie( p_intf ) )
+    if( !vlc_object_alive( p_intf ) )
     {
         vlc_mutex_unlock( &p_intf->change_lock );