* callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: callbacks.c,v 1.8 2002/08/25 20:44:40 jpsaman Exp $
+ * $Id: callbacks.c,v 1.9 2002/09/04 21:18:29 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
g_print( "%s\n",psz_url );
// Add p_url to playlist .... but how ?
- if (p_intf)
+ p_playlist = (playlist_t *)
+ vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ if( p_playlist )
{
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if( p_playlist )
- {
- playlist_Add( p_playlist, (char*)psz_url,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
- vlc_object_release( p_playlist );
- }
+ playlist_Add( p_playlist, (char*)psz_url,
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
+ vlc_object_release( p_playlist );
}
}
{
intf_thread_t *p_intf = GtkGetIntf( button );
- if (p_intf)
- {
- /* Testing routine */
+ /* Testing routine */
/*
- GtkCList *clistmedia = NULL;
- clistmedia = GTK_CLIST( lookup_widget( p_intf->p_sys->p_window,
- "clistmedia") );
- if (GTK_CLIST(clistmedia))
- {
- ReadDirectory(clistmedia, ".");
- }
-*/
- gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
- gdk_window_raise( p_intf->p_sys->p_window->window );
+ GtkCList *clistmedia = NULL;
+ clistmedia = GTK_CLIST( lookup_widget( p_intf->p_sys->p_window,
+ "clistmedia") );
+ if (GTK_CLIST(clistmedia))
+ {
+ ReadDirectory(clistmedia, ".");
}
+*/
+ gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
+ gdk_window_raise( p_intf->p_sys->p_window->window );
}
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( button );
- if (p_intf) {
- gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
- gdk_window_raise( p_intf->p_sys->p_window->window );
- }
+
+ gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
+ gdk_window_raise( p_intf->p_sys->p_window->window );
}
{
intf_thread_t * p_intf = GtkGetIntf( button );
- if( p_intf )
+ if( p_intf->p_sys->p_input )
{
- if( p_intf->p_sys->p_input )
- {
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
- }
+ input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
}
}
{
intf_thread_t * p_intf = GtkGetIntf( button );
- if( p_intf )
+ if( p_intf->p_sys->p_input )
{
- if( p_intf->p_sys->p_input )
- {
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
- }
+ input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
}
}
FIND_ANYWHERE );
if( p_playlist == NULL )
{
- if( p_intf )
- {
- gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
- gdk_window_raise( p_intf->p_sys->p_window->window );
- }
+ gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
+ gdk_window_raise( p_intf->p_sys->p_window->window );
/* Display open page */
}
{
intf_thread_t * p_intf = GtkGetIntf( button );
- if( p_intf )
+ if( p_intf->p_sys->p_input )
{
- if( p_intf->p_sys->p_input )
- {
- input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
- }
+ input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
}
}
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( button );
- if (p_intf)
- {// 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) );
- }
- gdk_window_raise( p_intf->p_sys->p_window->window );
+
+ // 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) );
}
+ gdk_window_raise( p_intf->p_sys->p_window->window );
}
intf_thread_t * p_intf = GtkGetIntf( editable );
gchar * psz_url;
- if (p_intf)
+ if (p_intf->p_sys->b_autoplayfile == 1)
{
- if (p_intf->p_sys->b_autoplayfile == 1)
- {
- psz_url = gtk_entry_get_text(GTK_ENTRY(editable));
- MediaURLOpenChanged( GTK_WIDGET(editable), psz_url );
- }
+ psz_url = gtk_entry_get_text(GTK_ENTRY(editable));
+ MediaURLOpenChanged( GTK_WIDGET(editable), psz_url );
}
}
{
intf_thread_t * p_intf = GtkGetIntf( togglebutton );
- if (p_intf)
- {
- if (p_intf->p_sys->b_autoplayfile == 1)
- p_intf->p_sys->b_autoplayfile = 0;
- else
- p_intf->p_sys->b_autoplayfile = 1;
- }
+ if (p_intf->p_sys->b_autoplayfile == 1)
+ p_intf->p_sys->b_autoplayfile = 0;
+ else
+ p_intf->p_sys->b_autoplayfile = 1;
}