* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: open.c,v 1.2 2002/08/24 11:57:07 sam Exp $
+ * $Id: open.c,v 1.6 2003/01/10 11:02:21 asmax Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
#include "gtk_interface.h"
#include "gtk_support.h"
-#include "playlist.h"
#include "common.h"
#include "netutils.h"
{
GtkWidget * p_file = create_intf_file();
- gtk_object_set_data( GTK_OBJECT(p_file), "p_intf", GtkGetIntf( button ) );
+ gtk_object_set_data( GTK_OBJECT(p_file), "p_intf",
+ GtkGetIntf( button ) );
gtk_widget_show( p_file );
gdk_window_raise( p_file->window );
}
else if( SELECTED( "network_http" ) )
{
- g_string_sprintfa( p_target, "http://%s",
- gtk_entry_get_text( GTK_ENTRY( lookup_widget(
+ g_string_assign( p_target,
+ gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "network_http_url" ) ) ) );
}
free( psz_var );
}
+ gtk_entry_set_text( GTK_ENTRY( gtk_object_get_data(
+ GTK_OBJECT( p_intf->p_sys->p_open ), "network_http_url" ) ),
+ "http://" );
+
gtk_spin_button_set_value( GTK_SPIN_BUTTON( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_open ), "network_channel_port" ) ),
config_GetInt( p_intf, "channel-port" ) );
GtkRebuildCList( p_playlist_clist, p_playlist );
vlc_object_release( p_playlist );
+
+ /* Enable the channel box when network channel is selected */
+ if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
+ "network_channel" ) )->active )
+ {
+ p_intf->p_sys->b_playing = 1;
+ }
+
}
void GtkOpenCancel( GtkButton * button, gpointer user_data )