* familiar.c : familiar plugin for vlc
*****************************************************************************
* 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>
*
p_intf->p_sys->b_autoplayfile = 1;
p_intf->p_sys->pf_callback[0] = NULL;
- /* Initialize Gtk+ thread */
- p_intf->p_sys->p_input = NULL;
p_intf->pf_run = Run;
return (0);
*****************************************************************************/
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 */
free( p_intf->p_sys );
}
GTK_OBJECT( p_intf->p_sys->p_window ), "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(
GTK_OBJECT( p_intf->p_sys->p_window ), "progress" ) );
gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_progess) );
* familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* 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>
*
****************************************************************************/
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;
- intf_ErrMsg( "@@@ MediaURLOpenChanged" );
// Add p_url to playlist .... but how ?
if( p_main->p_playlist )
{
{
p_input_bank->pp_input[0]->b_eof = 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;
+ }
+ }
}
/*****************************************************************
{
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 );
if (p_intf->p_sys->p_clist)
{
{
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 );
}
on_toolbar_rewind_clicked (GtkButton *button,
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 );
}
}
on_toolbar_pause_clicked (GtkButton *button,
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 );
}
}
{
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 */
- vlc_mutex_lock( &p_main->p_playlist->change_lock );
- if( p_main->p_playlist->i_size )
+ if( p_input_bank->pp_input[0] != NULL )
{
- vlc_mutex_unlock( &p_main->p_playlist->change_lock );
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY );
+ input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
p_main->p_playlist->b_stopped = 0;
gdk_window_lower( p_intf->p_sys->p_window->window );
}
}
else
{
+
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
{
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 */
- p_intf->p_sys->p_input->b_eof = 1;
+ p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
on_toolbar_forward_clicked (GtkButton *button,
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 );
}
}
// Toggle notebook
if (p_intf->p_sys->p_notebook)
{
-/* if ( gtk_get_data( GTK_WIDGET(p_intf->p_sys->p_notebook), "visible" ) )
- * gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) );
- * else
- */ gtk_widget_show( GTK_WIDGET(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,2);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
}
gint ret;
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);
if (ret)
{
on_buttonApply_clicked (GtkButton *button,
gpointer user_data)
{
+ GtkWidget *apply_button;
// GHashTable *hash_table;
-// GtkWidget *apply_button;
//
// hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data),
// "config_hash_table" );
// g_hash_table_foreach_remove( hash_table, GtkSaveHashValue, NULL );
-//
-// /* change the highlight status of the Apply button */
-// apply_button = (GtkWidget *)gtk_object_get_data( GTK_OBJECT(user_data),
-// "apply_button" );
-// gtk_widget_set_sensitive( apply_button, FALSE );
+
+ /* change the highlight status of the Apply button */
+ apply_button = (GtkWidget *)gtk_object_get_data( GTK_OBJECT(user_data),
+ "buttonAapply" );
+ gtk_widget_set_sensitive( apply_button, FALSE );
}