Commit 7b7ebdee authored by Jean-Paul Saman's avatar Jean-Paul Saman

Little cleanup action.

parent b85c7e1e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin. * callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * 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> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -98,8 +98,6 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url ) ...@@ -98,8 +98,6 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
g_print( "%s\n",psz_url ); g_print( "%s\n",psz_url );
// Add p_url to playlist .... but how ? // Add p_url to playlist .... but how ?
if (p_intf)
{
p_playlist = (playlist_t *) p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist ) if( p_playlist )
...@@ -108,7 +106,6 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url ) ...@@ -108,7 +106,6 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
}
} }
/***************************************************************** /*****************************************************************
...@@ -243,8 +240,6 @@ on_toolbar_open_clicked (GtkButton *button, ...@@ -243,8 +240,6 @@ on_toolbar_open_clicked (GtkButton *button,
{ {
intf_thread_t *p_intf = GtkGetIntf( button ); intf_thread_t *p_intf = GtkGetIntf( button );
if (p_intf)
{
/* Testing routine */ /* Testing routine */
/* /*
GtkCList *clistmedia = NULL; GtkCList *clistmedia = NULL;
...@@ -257,7 +252,6 @@ on_toolbar_open_clicked (GtkButton *button, ...@@ -257,7 +252,6 @@ on_toolbar_open_clicked (GtkButton *button,
*/ */
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) ); 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 );
}
} }
...@@ -266,10 +260,9 @@ on_toolbar_preferences_clicked (GtkButton *button, ...@@ -266,10 +260,9 @@ on_toolbar_preferences_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) {
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) ); 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 );
}
} }
...@@ -279,13 +272,10 @@ on_toolbar_rewind_clicked (GtkButton *button, ...@@ -279,13 +272,10 @@ on_toolbar_rewind_clicked (GtkButton *button,
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); 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 );
} }
}
} }
...@@ -295,13 +285,10 @@ on_toolbar_pause_clicked (GtkButton *button, ...@@ -295,13 +285,10 @@ on_toolbar_pause_clicked (GtkButton *button,
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); 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 );
} }
}
} }
...@@ -313,12 +300,9 @@ on_toolbar_play_clicked (GtkButton *button, ...@@ -313,12 +300,9 @@ on_toolbar_play_clicked (GtkButton *button,
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_playlist == NULL ) if( p_playlist == NULL )
{
if( p_intf )
{ {
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) ); 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 );
}
/* Display open page */ /* Display open page */
} }
...@@ -362,13 +346,10 @@ on_toolbar_forward_clicked (GtkButton *button, ...@@ -362,13 +346,10 @@ on_toolbar_forward_clicked (GtkButton *button,
{ {
intf_thread_t * p_intf = GtkGetIntf( button ); 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 );
} }
}
} }
...@@ -377,8 +358,8 @@ on_toolbar_about_clicked (GtkButton *button, ...@@ -377,8 +358,8 @@ on_toolbar_about_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)
{// 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" ) ) /* if ( gtk_get_data( GTK_WIDGET(p_intf->p_sys->p_notebook), "visible" ) )
...@@ -387,7 +368,6 @@ on_toolbar_about_clicked (GtkButton *button, ...@@ -387,7 +368,6 @@ on_toolbar_about_clicked (GtkButton *button,
*/ gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) ); */ 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 );
}
} }
...@@ -398,14 +378,11 @@ on_comboURL_entry_changed (GtkEditable *editable, ...@@ -398,14 +378,11 @@ on_comboURL_entry_changed (GtkEditable *editable,
intf_thread_t * p_intf = GtkGetIntf( editable ); intf_thread_t * p_intf = GtkGetIntf( editable );
gchar * psz_url; 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)); psz_url = gtk_entry_get_text(GTK_ENTRY(editable));
MediaURLOpenChanged( GTK_WIDGET(editable), psz_url ); MediaURLOpenChanged( GTK_WIDGET(editable), psz_url );
} }
}
} }
void void
...@@ -463,13 +440,10 @@ on_cbautoplay_toggled (GtkToggleButton *togglebutton, ...@@ -463,13 +440,10 @@ on_cbautoplay_toggled (GtkToggleButton *togglebutton,
{ {
intf_thread_t * p_intf = GtkGetIntf( togglebutton ); intf_thread_t * p_intf = GtkGetIntf( togglebutton );
if (p_intf)
{
if (p_intf->p_sys->b_autoplayfile == 1) if (p_intf->p_sys->b_autoplayfile == 1)
p_intf->p_sys->b_autoplayfile = 0; p_intf->p_sys->b_autoplayfile = 0;
else else
p_intf->p_sys->b_autoplayfile = 1; p_intf->p_sys->b_autoplayfile = 1;
}
} }
......
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