* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.18 2001/05/15 14:49:48 stef Exp $
+ * $Id: gtk_callbacks.c,v 1.22 2001/05/30 17:03:12 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-#define MODULE_NAME gtk
-#include "modules_inner.h"
-
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "intf_gtk.h"
#include "main.h"
+#include "netutils.h"
+
+#include "modules_export.h"
/*****************************************************************************
* Callbacks
if( i_id > 0 )
{
p_area = p_intf->p_input->stream.pp_areas[i_id];
- p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+ input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
p_intf->p_sys->b_title_update = 1;
+ GtkSetupMenus( p_intf );
}
}
if( i_id < p_intf->p_input->stream.i_area_nb )
{
p_area = p_intf->p_input->stream.pp_areas[i_id];
- p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+ input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
p_intf->p_sys->b_title_update = 1;
+ GtkSetupMenus( p_intf );
}
}
if( p_area->i_part > 0 )
{
p_area->i_part--;
- p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+ input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
p_intf->p_sys->b_chapter_update = 1;
+ GtkSetupMenus( p_intf );
}
}
if( p_area->i_part < p_area->i_part_nb )
{
p_area->i_part++;
- p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+ input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
p_intf->p_sys->b_chapter_update = 1;
+ GtkSetupMenus( p_intf );
}
}
+/****************************************************************************
+ * 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
****************************************************************************/
-gboolean
-GtkAboutShow (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
+gboolean GtkAboutShow( GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
* Jump box
****************************************************************************/
-gboolean
-GtkJumpShow (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
+gboolean GtkJumpShow( GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
}
-void
-GtkJumpOk (GtkButton *button,
- gpointer user_data)
+void GtkJumpOk( GtkButton *button,
+ gpointer user_data)
{
intf_thread_t * p_intf;
off_t i_seek;
}
-void
-GtkJumpCancel (GtkButton *button,
- gpointer user_data)
+void GtkJumpCancel( GtkButton *button,
+ gpointer user_data)
{
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
GtkJumpShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
-void
-GtkPlaylistDestroy (GtkObject *object,
- gpointer user_data)
-{
-
-}
-