]> git.sesse.net Git - vlc/blobdiff - plugins/gtk/gtk_callbacks.c
-Changes and bugfixes to make network work in VLAN Broadcast mode.
[vlc] / plugins / gtk / gtk_callbacks.c
index d3467daf4709c4b4efef847800876fa6d24acdde..96c9405ca56463290872ea4c8b26a629cc61eb0a 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.20 2001/05/23 23:08:20 stef Exp $
+ * $Id: gtk_callbacks.c,v 1.21 2001/05/30 05:19:03 stef Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -54,6 +54,7 @@
 #include "intf_gtk.h"
 
 #include "main.h"
+#include "netutils.h"
 
 /*****************************************************************************
  * Callbacks
@@ -271,6 +272,36 @@ void GtkChapterNext( GtkButton * button, gpointer user_data )
     }
 }
 
+/****************************************************************************
+ * Network specific items
+ ****************************************************************************/
+void GtkNetworkJoin( GtkEditable * editable, gpointer user_data )
+{
+    int     i_channel;
+
+    i_channel = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( editable ) );
+    intf_WarnMsg( 3, "intf info: joining channel %d", i_channel );
+
+//    network_ChannelJoin( i_channel );
+}
+
+void GtkChannelGo( GtkButton * button, gpointer user_data )
+{
+    GtkWidget *     window;
+    GtkWidget *     spin;
+    int             i_channel;
+
+    window = gtk_widget_get_toplevel( GTK_WIDGET (button) );
+    spin = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( window ),
+                       "network_channel_spinbutton" ) );
+
+    i_channel = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( spin ) );
+    intf_WarnMsg( 3, "intf info: joining channel %d", i_channel );
+
+    network_ChannelJoin( i_channel );
+}
+
+
 /****************************************************************************
  * About box
  ****************************************************************************/
@@ -401,3 +432,4 @@ void GtkJumpActivate( GtkMenuItem * menuitem, gpointer user_data )
 {
     GtkJumpShow( GTK_WIDGET( menuitem ), NULL, user_data );
 }
+