]> git.sesse.net Git - vlc/blobdiff - modules/gui/pda/pda.c
configure: Set the proper werror variable when creating vlc-config.in
[vlc] / modules / gui / pda / pda.c
index e5eecb07a25762c68aa9b9eaa6a76f41d10e6aeb..2b74125970b4cfd0019d2b28bc1e1fe33a3f4d61 100644 (file)
@@ -51,7 +51,6 @@ static int  Open         ( vlc_object_t * );
 static void Close        ( vlc_object_t * );
 static void Run          ( intf_thread_t * );
 
-void GtkAutoPlayFile     ( vlc_object_t * );
 static int Manage        ( intf_thread_t *p_intf );
 void GtkDisplayDate  ( GtkAdjustment *p_adj, gpointer userdata );
 gint GtkModeManage   ( intf_thread_t * p_intf );
@@ -66,15 +65,14 @@ gint GtkModeManage   ( intf_thread_t * p_intf );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_description( N_("PDA Linux Gtk2+ interface") );
-    set_category( CAT_INTERFACE );
-    set_subcategory( SUBCAT_INTERFACE_MAIN );
-//    add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, true );
-    set_capability( "interface", 0 );
-    set_callbacks( Open, Close );
-    add_shortcut( "pda" );
-vlc_module_end();
+vlc_module_begin ()
+    set_description( N_("PDA Linux Gtk2+ interface") )
+    set_category( CAT_INTERFACE )
+    set_subcategory( SUBCAT_INTERFACE_MAIN )
+    set_capability( "interface", 0 )
+    set_callbacks( Open, Close )
+    add_shortcut( "pda" )
+vlc_module_end ()
 
 /*****************************************************************************
  * Open: initialize and create window
@@ -349,43 +347,6 @@ static void Run( intf_thread_t *p_intf )
     vlc_restorecancel(canc);
 }
 
-/*****************************************************************************
- * GtkAutoplayFile: Autoplay file depending on configuration settings
- *****************************************************************************/
-void GtkAutoPlayFile( vlc_object_t *p_this )
-{
-    GtkWidget *cbautoplay;
-    intf_thread_t *p_intf;
-    int i_index;
-    vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
-                                        FIND_ANYWHERE );
-
-    for( i_index = 0; i_index < p_list->i_count; i_index++ )
-    {
-        p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
-
-        if( strcmp( MODULE_STRING, module_get_object(p_intf->p_module) ) )
-        {
-            continue;
-        }
-        cbautoplay = GTK_WIDGET( gtk_object_get_data(
-                            GTK_OBJECT( p_intf->p_sys->p_window ),
-                            "cbautoplay" ) );
-
-        if( !config_GetInt( p_this, "pda-autoplayfile" ) )
-        {
-            p_intf->p_sys->b_autoplayfile = false;
-        }
-        else
-        {
-            p_intf->p_sys->b_autoplayfile = true;
-        }
-        gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( cbautoplay ),
-                                      p_intf->p_sys->b_autoplayfile );
-    }
-    vlc_list_release( p_list );
-}
-
 /* following functions are local */
 
 /*****************************************************************************
@@ -397,7 +358,6 @@ void GtkAutoPlayFile( vlc_object_t *p_this )
 static int Manage( intf_thread_t *p_intf )
 {
     GtkListStore *p_liststore;
-    vlc_mutex_lock( &p_intf->change_lock );
 
     /* Update the input */
     if( p_intf->p_sys->p_input == NULL )
@@ -416,7 +376,6 @@ static int Manage( intf_thread_t *p_intf )
         input_thread_t *p_input = p_intf->p_sys->p_input;
         int64_t i_time = 0, i_length = 0;
 
-        vlc_object_lock( p_input );
         if( vlc_object_alive (p_input) )
         {
             playlist_t *p_playlist;
@@ -467,9 +426,7 @@ static int Manage( intf_thread_t *p_intf )
                         double f_pos = (double)newvalue / 100.0;
 
                         /* release the lock to be able to seek */
-                        vlc_object_unlock( p_input );
                         var_SetFloat( p_input, "position", f_pos );
-                        vlc_object_lock( p_input );
 
                         /* Update the old value */
                         p_intf->p_sys->f_adj_oldvalue = newvalue;
@@ -501,9 +458,7 @@ static int Manage( intf_thread_t *p_intf )
                         double f_pos = (double)newvalue / 100.0;
 
                         /* release the lock to be able to seek */
-                        vlc_object_unlock( p_input );
                         var_SetFloat( p_input, "position", f_pos );
-                        vlc_object_lock( p_input );
 
                         /* Update the old value */
                         p_intf->p_sys->i_adj_oldvalue = newvalue;
@@ -511,7 +466,6 @@ static int Manage( intf_thread_t *p_intf )
                 }
             }
         }
-        vlc_object_unlock( p_input );
     }
     else if( p_intf->p_sys->b_playing && vlc_object_alive( p_intf ) )
     {
@@ -522,8 +476,6 @@ static int Manage( intf_thread_t *p_intf )
 #ifndef NEED_GTK2_MAIN
     if( !vlc_object_alive( p_intf ) )
     {
-        vlc_mutex_unlock( &p_intf->change_lock );
-
         /* Prepare to die, young Skywalker */
         gtk_main_quit();
 
@@ -531,8 +483,6 @@ static int Manage( intf_thread_t *p_intf )
     }
 #endif
 
-    vlc_mutex_unlock( &p_intf->change_lock );
-
     return TRUE;
 }
 
@@ -596,7 +546,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
         }
 
         /* control buttons for free pace streams */
-        b_control = p_intf->p_sys->p_input->b_can_pace_control;
+        b_control = var_GetBool( p_intf->p_sys->p_input, "can-rate" );
 
         msg_Dbg( p_intf, "stream has changed, refreshing interface" );
     }