Commit 3d5da10e authored by Jean-Paul Saman's avatar Jean-Paul Saman

Directory browsing and files from file list works. There is one caveat left...

Directory browsing and files from file list works. There is one caveat left when vlc is built with --enable-plugins then when browsing directories and run from the source-tree it suddenly cannot find it's plugins anymore.
When installed everything is fine.
parent 12699e33
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc * familiar.c : familiar plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: familiar.c,v 1.8.2.3 2002/10/01 19:13:14 jpsaman Exp $ * $Id: familiar.c,v 1.8.2.4 2002/10/02 19:58:45 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -142,8 +142,6 @@ static int Open( intf_thread_t *p_intf ) ...@@ -142,8 +142,6 @@ static int Open( intf_thread_t *p_intf )
p_intf->p_sys->b_autoplayfile = 1; p_intf->p_sys->b_autoplayfile = 1;
p_intf->p_sys->pf_callback[0] = NULL; p_intf->p_sys->pf_callback[0] = NULL;
/* Initialize Gtk+ thread */
p_intf->p_sys->p_input = NULL;
p_intf->pf_run = Run; p_intf->pf_run = Run;
return (0); return (0);
...@@ -154,11 +152,6 @@ static int Open( intf_thread_t *p_intf ) ...@@ -154,11 +152,6 @@ static int Open( intf_thread_t *p_intf )
*****************************************************************************/ *****************************************************************************/
static void Close( intf_thread_t *p_intf ) static void Close( intf_thread_t *p_intf )
{ {
if( p_intf->p_sys->p_input )
{
// vlc_object_release( p_intf->p_sys->p_input );
}
/* Destroy structure */ /* Destroy structure */
free( p_intf->p_sys ); free( p_intf->p_sys );
} }
...@@ -203,6 +196,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -203,6 +196,12 @@ static void Run( intf_thread_t *p_intf )
GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) ); GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
// gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) ); // gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) );
/* Create our config hash table and associate it with the dialog box */
// config_hash_table = g_hash_table_new( NULL, NULL );
// gtk_object_set_data( GTK_OBJECT(config_dialog),
// "config_hash_table", config_hash_table );
p_intf->p_sys->p_progess = GTK_PROGRESS_BAR( gtk_object_get_data( p_intf->p_sys->p_progess = GTK_PROGRESS_BAR( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "progress" ) ); GTK_OBJECT( p_intf->p_sys->p_window ), "progress" ) );
gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_progess) ); gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_progess) );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar.h: private Gtk+ interface description * familiar.h: private Gtk+ interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: familiar.h,v 1.6.2.1 2002/09/30 20:37:13 jpsaman Exp $ * $Id: familiar.h,v 1.6.2.2 2002/10/02 19:58:45 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -33,12 +33,9 @@ typedef struct intf_sys_s ...@@ -33,12 +33,9 @@ typedef struct intf_sys_s
GtkNotebook * p_notebook; GtkNotebook * p_notebook;
GtkProgressBar * p_progess; GtkProgressBar * p_progess;
GtkCList * p_clist; GtkCList * p_clist;
// GHashTable * config_hash_table;
boolean_t b_autoplayfile; boolean_t b_autoplayfile;
/* The input thread */
input_thread_t * p_input;
/* XXX: Ugly kludge, see gtk.c */ /* XXX: Ugly kludge, see gtk.c */
void ( *pf_callback[MAX_ATEXIT] ) ( void ); void ( *pf_callback[MAX_ATEXIT] ) ( void );
} intf_sys_t; } intf_sys_t;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin. * familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: familiar_callbacks.c,v 1.6.2.4 2002/10/01 21:17:52 jpsaman Exp $ * $Id: familiar_callbacks.c,v 1.6.2.5 2002/10/02 19:58:45 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -99,10 +99,9 @@ void * __GtkGetIntf( GtkWidget * widget ) ...@@ -99,10 +99,9 @@ void * __GtkGetIntf( GtkWidget * widget )
****************************************************************************/ ****************************************************************************/
static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url ) static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
{ {
// intf_thread_t *p_intf = GtkGetIntf( widget ); intf_thread_t *p_intf = GtkGetIntf( widget );
int i_end = p_main->p_playlist->i_size; int i_end = p_main->p_playlist->i_size;
intf_ErrMsg( "@@@ MediaURLOpenChanged" );
// Add p_url to playlist .... but how ? // Add p_url to playlist .... but how ?
if( p_main->p_playlist ) if( p_main->p_playlist )
{ {
...@@ -114,8 +113,16 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url ) ...@@ -114,8 +113,16 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
{ {
p_input_bank->pp_input[0]->b_eof = 1; p_input_bank->pp_input[0]->b_eof = 1;
} }
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
if (p_intf->p_sys->b_autoplayfile)
{
if( p_input_bank->pp_input[0] != NULL )
{
input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_main->p_playlist->b_stopped = 0;
}
}
} }
/***************************************************************** /*****************************************************************
...@@ -256,7 +263,11 @@ on_toolbar_open_clicked (GtkButton *button, ...@@ -256,7 +263,11 @@ on_toolbar_open_clicked (GtkButton *button,
{ {
intf_thread_t *p_intf = GtkGetIntf( button ); intf_thread_t *p_intf = GtkGetIntf( button );
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) ); if (p_intf->p_sys->p_notebook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gtk_notebook_set_page(p_intf->p_sys->p_notebook,0);
}
gdk_window_raise( p_intf->p_sys->p_window->window ); gdk_window_raise( p_intf->p_sys->p_window->window );
if (p_intf->p_sys->p_clist) if (p_intf->p_sys->p_clist)
{ {
...@@ -271,7 +282,11 @@ on_toolbar_preferences_clicked (GtkButton *button, ...@@ -271,7 +282,11 @@ on_toolbar_preferences_clicked (GtkButton *button,
{ {
intf_thread_t *p_intf = GtkGetIntf( button ); intf_thread_t *p_intf = GtkGetIntf( button );
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) ); if (p_intf->p_sys->p_notebook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gtk_notebook_set_page(p_intf->p_sys->p_notebook,1);
}
gdk_window_raise( p_intf->p_sys->p_window->window ); gdk_window_raise( p_intf->p_sys->p_window->window );
} }
...@@ -280,11 +295,11 @@ void ...@@ -280,11 +295,11 @@ void
on_toolbar_rewind_clicked (GtkButton *button, on_toolbar_rewind_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); // intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input ) if( p_input_bank->pp_input[0] != NULL )
{ {
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER ); input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER );
} }
} }
...@@ -293,11 +308,11 @@ void ...@@ -293,11 +308,11 @@ void
on_toolbar_pause_clicked (GtkButton *button, on_toolbar_pause_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); // intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input ) if( p_input_bank->pp_input[0] != NULL )
{ {
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE ); input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE );
} }
} }
...@@ -308,19 +323,10 @@ on_toolbar_play_clicked (GtkButton *button, ...@@ -308,19 +323,10 @@ on_toolbar_play_clicked (GtkButton *button,
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input == NULL )
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gdk_window_raise( p_intf->p_sys->p_window->window );
/* Display open page */
}
/* If the playlist is empty, open a file requester instead */ if( p_input_bank->pp_input[0] != NULL )
vlc_mutex_lock( &p_main->p_playlist->change_lock );
if( p_main->p_playlist->i_size )
{ {
vlc_mutex_unlock( &p_main->p_playlist->change_lock ); input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
p_main->p_playlist->b_stopped = 0; p_main->p_playlist->b_stopped = 0;
gdk_window_lower( p_intf->p_sys->p_window->window ); gdk_window_lower( p_intf->p_sys->p_window->window );
} }
...@@ -345,6 +351,7 @@ on_toolbar_play_clicked (GtkButton *button, ...@@ -345,6 +351,7 @@ on_toolbar_play_clicked (GtkButton *button,
} }
else else
{ {
vlc_mutex_unlock( &p_main->p_playlist->change_lock ); vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
...@@ -358,10 +365,10 @@ on_toolbar_stop_clicked (GtkButton *button, ...@@ -358,10 +365,10 @@ on_toolbar_stop_clicked (GtkButton *button,
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input != NULL ) if( p_input_bank->pp_input[0] != NULL )
{ {
/* end playing item */ /* end playing item */
p_intf->p_sys->p_input->b_eof = 1; p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */ /* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock ); vlc_mutex_lock( &p_main->p_playlist->change_lock );
...@@ -379,11 +386,11 @@ void ...@@ -379,11 +386,11 @@ void
on_toolbar_forward_clicked (GtkButton *button, on_toolbar_forward_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); // intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input ) if( p_input_bank->pp_input[0] != NULL )
{ {
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER ); input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER );
} }
} }
...@@ -397,10 +404,8 @@ on_toolbar_about_clicked (GtkButton *button, ...@@ -397,10 +404,8 @@ on_toolbar_about_clicked (GtkButton *button,
// Toggle notebook // Toggle notebook
if (p_intf->p_sys->p_notebook) if (p_intf->p_sys->p_notebook)
{ {
/* if ( gtk_get_data( GTK_WIDGET(p_intf->p_sys->p_notebook), "visible" ) ) gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
* gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) ); gtk_notebook_set_page(p_intf->p_sys->p_notebook,2);
* else
*/ gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
} }
gdk_window_raise( p_intf->p_sys->p_window->window ); gdk_window_raise( p_intf->p_sys->p_window->window );
} }
...@@ -456,9 +461,6 @@ on_clistmedia_select_row (GtkCList *clist, ...@@ -456,9 +461,6 @@ on_clistmedia_select_row (GtkCList *clist,
gint ret; gint ret;
struct stat st; struct stat st;
// gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
// gdk_window_raise( p_intf->p_sys->p_window->window );
ret = gtk_clist_get_text (p_intf->p_sys->p_clist, row, 0, text); ret = gtk_clist_get_text (p_intf->p_sys->p_clist, row, 0, text);
if (ret) if (ret)
{ {
...@@ -535,17 +537,17 @@ void ...@@ -535,17 +537,17 @@ void
on_buttonApply_clicked (GtkButton *button, on_buttonApply_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
GtkWidget *apply_button;
// GHashTable *hash_table; // GHashTable *hash_table;
// GtkWidget *apply_button;
// //
// hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data), // hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data),
// "config_hash_table" ); // "config_hash_table" );
// g_hash_table_foreach_remove( hash_table, GtkSaveHashValue, NULL ); // g_hash_table_foreach_remove( hash_table, GtkSaveHashValue, NULL );
//
// /* change the highlight status of the Apply button */ /* change the highlight status of the Apply button */
// apply_button = (GtkWidget *)gtk_object_get_data( GTK_OBJECT(user_data), apply_button = (GtkWidget *)gtk_object_get_data( GTK_OBJECT(user_data),
// "apply_button" ); "buttonAapply" );
// gtk_widget_set_sensitive( apply_button, FALSE ); gtk_widget_set_sensitive( apply_button, FALSE );
} }
......
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