* gnome_callbacks.c : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gnome_callbacks.c,v 1.23 2001/04/20 05:40:03 stef Exp $
+ * $Id: gnome_callbacks.c,v 1.25 2001/05/01 04:18:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
}
+
+void
+on_menubar_angle_toggle (GtkCheckMenuItem *menuitem,
+ gpointer user_data)
+{
+ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
+ input_area_t * p_area = p_intf->p_input->stream.p_selected_area;
+ gint i_angle = (gint)user_data;
+
+ if( menuitem->active && !p_intf->p_sys->b_angle_update )
+ {
+ p_area->i_angle = i_angle;
+ p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+
+ p_intf->p_sys->b_angle_update = 1;
+ }
+}
+
+
void
on_menubar_modules_activate (GtkMenuItem *menuitem,
gpointer user_data)
}
+void
+on_popup_angle_toggle (GtkCheckMenuItem *menuitem,
+ gpointer user_data)
+{
+ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+ input_area_t * p_area = p_intf->p_input->stream.p_selected_area;
+ gint i_angle = (gint)user_data;
+
+ if( menuitem->active && !p_intf->p_sys->b_angle_update )
+ {
+ p_area->i_angle = i_angle;
+ p_intf->p_input->pf_set_area( p_intf->p_input, (input_area_t*)p_area );
+
+ p_intf->p_sys->b_angle_update = 1;
+ }
+}
+
+
void
on_popup_open_activate (GtkMenuItem *menuitem,
gpointer user_data)
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename );
/* Select added item and switch to file interface */
- intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 );
if( p_intf->p_input != NULL )
p_intf->p_input->b_eof = 1;
- p_intf->p_sys->i_intf_mode = FILE_MODE;
- p_intf->p_sys->b_mode_changed = 1;
+
+// p_intf->p_sys->b_mode_changed = 1;
}
GTK_WIDGET(button), "disc_name" ) ) );
/* "dvd:foo" has size 5 + strlen(foo) */
- psz_source = malloc( 5 + strlen( psz_device ) );
+ psz_source = malloc( 3 /* "dvd" */ + 1 /* ":" */
+ + strlen( psz_device ) + 1 /* "\0" */ );
if( psz_source == NULL )
{
return;
intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 );
if( p_intf->p_input != NULL )
p_intf->p_input->b_eof = 1;
- p_intf->p_sys->b_mode_changed = 1;
+// p_intf->p_sys->b_mode_changed = 1;
gtk_widget_hide( p_intf->p_sys->p_disc );
}
}
/* Allocate room for "protocol://server:port" */
- psz_source = malloc( strlen( psz_protocol ) + strlen( psz_server ) + 10 );
+ psz_source = malloc( strlen( psz_protocol ) + 3 /* "://" */
+ + strlen( psz_server ) + 1 /* ":" */
+ + 5 /* 0-65535 */ + 1 /* "\0" */ );
if( psz_source == NULL )
{
return;
intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 );
if( p_intf->p_input != NULL )
p_intf->p_input->b_eof = 1;
- p_intf->p_sys->b_mode_changed = 1;
- p_intf->p_sys->i_intf_mode = NET_MODE;
+// p_intf->p_sys->b_mode_changed = 1;
gtk_widget_hide( p_intf->p_sys->p_network );
}