* fixed previous commit (didn't work everytime)
authorCyril Deguet <asmax@videolan.org>
Fri, 10 Jan 2003 12:34:50 +0000 (12:34 +0000)
committerCyril Deguet <asmax@videolan.org>
Fri, 10 Jan 2003 12:34:50 +0000 (12:34 +0000)
modules/gui/gtk/open.c

index 99149a3..3eca213 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_open.c : functions to handle file/disc/network open widgets.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: open.c,v 1.6 2003/01/10 11:02:21 asmax Exp $
+ * $Id: open.c,v 1.7 2003/01/10 12:34:50 asmax Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          St├ęphane Borel <stef@via.ecp.fr>
@@ -536,8 +536,29 @@ void GtkOpenOk( GtkButton * button, gpointer user_data )
     /* 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;
+    {  
+        GtkWidget *     p_network_box;
+        GtkWidget *     p_channel;
+        GtkWidget *     p_label;
+
+        p_network_box = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
+                        p_intf->p_sys->p_window ), "network_box" ) );
+        gtk_widget_show( GTK_WIDGET( p_network_box ) );
+        p_label = gtk_object_get_data( GTK_OBJECT(
+                   p_intf->p_sys->p_window ),
+                   "label_status" );
+        gtk_widget_hide( GTK_WIDGET( p_label ) );
+
+        p_channel = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
+                   p_intf->p_sys->p_window ), "network_channel_box" ) );
+        if( config_GetInt( p_intf, "network-channel" ) )
+        {
+            gtk_widget_show( GTK_WIDGET( p_channel ) );
+        }
+        else
+        {
+            gtk_widget_hide( GTK_WIDGET( p_channel ) );
+        }
     }
     
 }