Commit 0036da65 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Merge branch 1.0-bugfix

parents c48ac548 2b4e12cd
!Delete_Preferences.app !Delete_Preferences.app
*.mode* *.mode*
*.pbxuser *.pbxuser
build build
\ No newline at end of file Info.plist
...@@ -555,18 +555,11 @@ int HandlerCallback( httpd_handler_sys_t *p_args, ...@@ -555,18 +555,11 @@ int HandlerCallback( httpd_handler_sys_t *p_args,
int i_env = 0; int i_env = 0;
char **ppsz_env = NULL; char **ppsz_env = NULL;
char *psz_tmp; char *psz_tmp;
char sep;
size_t i_buffer; size_t i_buffer;
char *p_buffer; char *p_buffer;
char *psz_cwd, *psz_file = NULL; char *psz_cwd, *psz_file = NULL;
int i_ret; int i_ret;
#ifdef WIN32
sep = '\\';
#else
sep = '/';
#endif
/* Create environment for the CGI */ /* Create environment for the CGI */
TAB_APPEND( i_env, ppsz_env, strdup("GATEWAY_INTERFACE=CGI/1.1") ); TAB_APPEND( i_env, ppsz_env, strdup("GATEWAY_INTERFACE=CGI/1.1") );
TAB_APPEND( i_env, ppsz_env, strdup("SERVER_PROTOCOL=HTTP/1.1") ); TAB_APPEND( i_env, ppsz_env, strdup("SERVER_PROTOCOL=HTTP/1.1") );
...@@ -677,7 +670,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args, ...@@ -677,7 +670,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args,
} }
} }
psz_file = strrchr( p_args->file.file, sep ); psz_file = strrchr( p_args->file.file, DIR_SEP_CHAR );
if( psz_file != NULL ) if( psz_file != NULL )
{ {
psz_file++; psz_file++;
...@@ -694,7 +687,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args, ...@@ -694,7 +687,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args,
NULL ); NULL );
psz_tmp = strdup( p_args->file.file ); psz_tmp = strdup( p_args->file.file );
p = strrchr( psz_tmp, sep ); p = strrchr( psz_tmp, DIR_SEP_CHAR );
if( p != NULL ) if( p != NULL )
{ {
*p = '\0'; *p = '\0';
......
...@@ -120,14 +120,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, ...@@ -120,14 +120,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
int i_dirlen; int i_dirlen;
char sep;
#if defined( WIN32 )
sep = '\\';
#else
sep = '/';
#endif
if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL ) if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL )
{ {
if( errno != ENOENT && errno != ENOTDIR ) if( errno != ENOENT && errno != ENOTDIR )
...@@ -145,7 +137,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, ...@@ -145,7 +137,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
msg_Dbg( p_intf, "dir=%s", psz_dir ); msg_Dbg( p_intf, "dir=%s", psz_dir );
snprintf( dir, sizeof( dir ), "%s%c.access", psz_dir, sep ); snprintf( dir, sizeof( dir ), "%s"DIR_SEP".access", psz_dir );
if( ( file = utf8_fopen( dir, "r" ) ) != NULL ) if( ( file = utf8_fopen( dir, "r" ) ) != NULL )
{ {
char line[1024]; char line[1024];
...@@ -179,7 +171,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, ...@@ -179,7 +171,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
fclose( file ); fclose( file );
} }
snprintf( dir, sizeof( dir ), "%s%c.hosts", psz_dir, sep ); snprintf( dir, sizeof( dir ), "%s"DIR_SEP".hosts", psz_dir );
p_acl = ACL_Create( p_intf, false ); p_acl = ACL_Create( p_intf, false );
if( ACL_LoadFile( p_acl, dir ) ) if( ACL_LoadFile( p_acl, dir ) )
{ {
...@@ -210,7 +202,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, ...@@ -210,7 +202,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
continue; continue;
} }
snprintf( dir, sizeof( dir ), "%s%c%s", psz_dir, sep, psz_filename ); snprintf( dir, sizeof( dir ), "%s"DIR_SEP"%s", psz_dir, psz_filename );
free( psz_filename ); free( psz_filename );
if( ParseDirectory( p_intf, psz_root, dir ) ) if( ParseDirectory( p_intf, psz_root, dir ) )
...@@ -912,13 +904,12 @@ char *RealPath( const char *psz_src ) ...@@ -912,13 +904,12 @@ char *RealPath( const char *psz_src )
char *psz_dir; char *psz_dir;
char *p; char *p;
int i_len = strlen(psz_src); int i_len = strlen(psz_src);
const char sep = DIR_SEP_CHAR;
psz_dir = malloc( i_len + 2 ); psz_dir = malloc( i_len + 2 );
strcpy( psz_dir, psz_src ); strcpy( psz_dir, psz_src );
/* Add a trailing sep to ease the .. step */ /* Add a trailing sep to ease the .. step */
psz_dir[i_len] = sep; psz_dir[i_len] = DIR_SEP_CHAR;
psz_dir[i_len + 1] = '\0'; psz_dir[i_len + 1] = '\0';
#if (DIR_SEP_CHAR != '/') #if (DIR_SEP_CHAR != '/')
...@@ -926,18 +917,18 @@ char *RealPath( const char *psz_src ) ...@@ -926,18 +917,18 @@ char *RealPath( const char *psz_src )
p = psz_dir; p = psz_dir;
while( (p = strchr( p, '/' )) != NULL ) while( (p = strchr( p, '/' )) != NULL )
{ {
*p = sep; *p = DIR_SEP_CHAR;
} }
#endif #endif
/* FIXME: this could be O(N) rather than O(N²)... */ /* FIXME: this could be O(N) rather than O(N²)... */
/* Remove multiple separators and /./ */ /* Remove multiple separators and /./ */
p = psz_dir; p = psz_dir;
while( (p = strchr( p, sep )) != NULL ) while( (p = strchr( p, DIR_SEP_CHAR )) != NULL )
{ {
if( p[1] == sep ) if( p[1] == DIR_SEP_CHAR )
memmove( &p[1], &p[2], strlen(&p[2]) + 1 ); memmove( &p[1], &p[2], strlen(&p[2]) + 1 );
else if( p[1] == '.' && p[2] == sep ) else if( p[1] == '.' && p[2] == DIR_SEP_CHAR )
memmove( &p[1], &p[3], strlen(&p[3]) + 1 ); memmove( &p[1], &p[3], strlen(&p[3]) + 1 );
else else
p++; p++;
...@@ -955,13 +946,13 @@ char *RealPath( const char *psz_src ) ...@@ -955,13 +946,13 @@ char *RealPath( const char *psz_src )
{ {
/* Fix all .. dir */ /* Fix all .. dir */
p = psz_dir + 3; p = psz_dir + 3;
while( (p = strchr( p, sep )) != NULL ) while( (p = strchr( p, DIR_SEP_CHAR )) != NULL )
{ {
if( p[-1] == '.' && p[-2] == '.' && p[-3] == sep ) if( p[-1] == '.' && p[-2] == '.' && p[-3] == DIR_SEP_CHAR )
{ {
char *q; char *q;
p[-3] = '\0'; p[-3] = '\0';
if( (q = strrchr( psz_dir, sep )) != NULL ) if( (q = strrchr( psz_dir, DIR_SEP_CHAR )) != NULL )
{ {
memmove( q + 1, p + 1, strlen(p + 1) + 1 ); memmove( q + 1, p + 1, strlen(p + 1) + 1 );
p = q + 1; p = q + 1;
...@@ -979,8 +970,8 @@ char *RealPath( const char *psz_src ) ...@@ -979,8 +970,8 @@ char *RealPath( const char *psz_src )
/* Remove trailing sep if there are at least 2 sep in the string /* Remove trailing sep if there are at least 2 sep in the string
* (handles the C:\ stuff) */ * (handles the C:\ stuff) */
p = strrchr( psz_dir, sep ); p = strrchr( psz_dir, DIR_SEP_CHAR );
if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, sep ) ) if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, DIR_SEP_CHAR ) )
*p = '\0'; *p = '\0';
return psz_dir; return psz_dir;
......
...@@ -51,7 +51,6 @@ static int Open ( vlc_object_t * ); ...@@ -51,7 +51,6 @@ static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static void Run ( intf_thread_t * ); static void Run ( intf_thread_t * );
void GtkAutoPlayFile ( vlc_object_t * );
static int Manage ( intf_thread_t *p_intf ); static int Manage ( intf_thread_t *p_intf );
void GtkDisplayDate ( GtkAdjustment *p_adj, gpointer userdata ); void GtkDisplayDate ( GtkAdjustment *p_adj, gpointer userdata );
gint GtkModeManage ( intf_thread_t * p_intf ); gint GtkModeManage ( intf_thread_t * p_intf );
...@@ -70,7 +69,6 @@ vlc_module_begin () ...@@ -70,7 +69,6 @@ vlc_module_begin ()
set_description( N_("PDA Linux Gtk2+ interface") ) set_description( N_("PDA Linux Gtk2+ interface") )
set_category( CAT_INTERFACE ) set_category( CAT_INTERFACE )
set_subcategory( SUBCAT_INTERFACE_MAIN ) set_subcategory( SUBCAT_INTERFACE_MAIN )
// add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, true )
set_capability( "interface", 0 ) set_capability( "interface", 0 )
set_callbacks( Open, Close ) set_callbacks( Open, Close )
add_shortcut( "pda" ) add_shortcut( "pda" )
...@@ -349,43 +347,6 @@ static void Run( intf_thread_t *p_intf ) ...@@ -349,43 +347,6 @@ static void Run( intf_thread_t *p_intf )
vlc_restorecancel(canc); 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 */ /* following functions are local */
/***************************************************************************** /*****************************************************************************
...@@ -415,7 +376,6 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -415,7 +376,6 @@ static int Manage( intf_thread_t *p_intf )
input_thread_t *p_input = p_intf->p_sys->p_input; input_thread_t *p_input = p_intf->p_sys->p_input;
int64_t i_time = 0, i_length = 0; int64_t i_time = 0, i_length = 0;
vlc_object_lock( p_input );
if( vlc_object_alive (p_input) ) if( vlc_object_alive (p_input) )
{ {
playlist_t *p_playlist; playlist_t *p_playlist;
...@@ -466,9 +426,7 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -466,9 +426,7 @@ static int Manage( intf_thread_t *p_intf )
double f_pos = (double)newvalue / 100.0; double f_pos = (double)newvalue / 100.0;
/* release the lock to be able to seek */ /* release the lock to be able to seek */
vlc_object_unlock( p_input );
var_SetFloat( p_input, "position", f_pos ); var_SetFloat( p_input, "position", f_pos );
vlc_object_lock( p_input );
/* Update the old value */ /* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue; p_intf->p_sys->f_adj_oldvalue = newvalue;
...@@ -500,9 +458,7 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -500,9 +458,7 @@ static int Manage( intf_thread_t *p_intf )
double f_pos = (double)newvalue / 100.0; double f_pos = (double)newvalue / 100.0;
/* release the lock to be able to seek */ /* release the lock to be able to seek */
vlc_object_unlock( p_input );
var_SetFloat( p_input, "position", f_pos ); var_SetFloat( p_input, "position", f_pos );
vlc_object_lock( p_input );
/* Update the old value */ /* Update the old value */
p_intf->p_sys->i_adj_oldvalue = newvalue; p_intf->p_sys->i_adj_oldvalue = newvalue;
...@@ -510,7 +466,6 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -510,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 ) ) else if( p_intf->p_sys->b_playing && vlc_object_alive( p_intf ) )
{ {
......
...@@ -11,19 +11,6 @@ ...@@ -11,19 +11,6 @@
# include <libintl.h> # include <libintl.h>
# undef _ # undef _
# define _(String) dgettext (PACKAGE, String) # define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
#endif #endif
......
test_libvlc_core
test_libvlc_events
test_libvlc_media_list
test_libvlc_media_list_player
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment