Commit 32ef13cf authored by Stéphane Borel's avatar Stéphane Borel

*Bugfixes, cleanings in gtk.

parent 9530fc9f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* -dvd_udf to find files * -dvd_udf to find files
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.58 2001/05/15 01:01:44 stef Exp $ * $Id: input_dvd.c,v 1.59 2001/05/15 14:49:47 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -1043,7 +1043,7 @@ static int DVDRead( input_thread_t * p_input, ...@@ -1043,7 +1043,7 @@ static int DVDRead( input_thread_t * p_input,
p_input->stream.p_selected_area->i_tell = i_off - p_input->stream.p_selected_area->i_tell = i_off -
p_input->stream.p_selected_area->i_start; p_input->stream.p_selected_area->i_start;
p_input->stream.p_selected_area->i_part = p_dvd->i_chapter; p_input->stream.p_selected_area->i_part = p_dvd->i_chapter;
intf_WarnMsg( 2, "chapter %d", p_dvd->i_chapter);
/* the synchro has to be reinitialized when we change cell */ /* the synchro has to be reinitialized when we change cell */
p_input->stream.pp_programs[0]->i_synchro_state = SYNCHRO_REINIT; p_input->stream.pp_programs[0]->i_synchro_state = SYNCHRO_REINIT;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin. * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.17 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_callbacks.c,v 1.18 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -66,10 +66,9 @@ ...@@ -66,10 +66,9 @@
* Main interface callbacks * Main interface callbacks
*/ */
gboolean gboolean GtkExit( GtkWidget *widget,
GtkExit (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data )
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
...@@ -80,10 +79,9 @@ GtkExit (GtkWidget *widget, ...@@ -80,10 +79,9 @@ GtkExit (GtkWidget *widget,
return TRUE; return TRUE;
} }
gboolean gboolean GtkWindowDelete( GtkWidget *widget,
GtkWindowDelete (GtkWidget *widget,
GdkEvent *event, GdkEvent *event,
gpointer user_data) gpointer user_data )
{ {
GtkExit( GTK_WIDGET( widget ), NULL, user_data ); GtkExit( GTK_WIDGET( widget ), NULL, user_data );
...@@ -91,10 +89,9 @@ GtkWindowDelete (GtkWidget *widget, ...@@ -91,10 +89,9 @@ GtkWindowDelete (GtkWidget *widget,
} }
gboolean gboolean GtkWindowToggle( GtkWidget *widget,
GtkWindowToggle (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data )
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
...@@ -111,25 +108,27 @@ GtkWindowToggle (GtkWidget *widget, ...@@ -111,25 +108,27 @@ GtkWindowToggle (GtkWidget *widget,
return TRUE; return TRUE;
} }
gboolean gboolean GtkFullscreen( GtkWidget *widget,
GtkFullscreen (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
if( p_vout_bank->i_count ) if( p_vout_bank->i_count )
{ {
vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock ); vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock );
if( p_vout_bank->pp_vout[0]->b_fullscreen ==
!GTK_CHECK_MENU_ITEM( widget )->active )
p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE;
vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock ); vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock );
}
return TRUE; return TRUE;
}
else
{
return FALSE;
}
} }
void void GtkWindowDrag( GtkWidget *widget,
GtkWindowDrag (GtkWidget *widget,
GdkDragContext *drag_context, GdkDragContext *drag_context,
gint x, gint x,
gint y, gint y,
...@@ -140,7 +139,7 @@ GtkWindowDrag (GtkWidget *widget, ...@@ -140,7 +139,7 @@ GtkWindowDrag (GtkWidget *widget,
{ {
intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" ); intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
int end = p_main->p_playlist->i_size; int end = p_main->p_playlist->i_size;
GtkDropDataReceived( p_intf, data, info, PLAYLIST_END); GtkDropDataReceived( p_intf, data, info, PLAYLIST_END );
if( p_intf->p_input != NULL ) if( p_intf->p_input != NULL )
{ {
...@@ -149,15 +148,16 @@ GtkWindowDrag (GtkWidget *widget, ...@@ -149,15 +148,16 @@ GtkWindowDrag (GtkWidget *widget,
} }
intf_PlaylistJumpto( p_main->p_playlist, end-1 ); intf_PlaylistJumpto( p_main->p_playlist, end-1 );
p_main->p_playlist->b_stopped = 0;
} }
/****************************************************************************
* Slider management
****************************************************************************/
gboolean gboolean GtkSliderRelease( GtkWidget *widget,
GtkSliderRelease (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data )
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" ); intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
...@@ -169,8 +169,7 @@ GtkSliderRelease (GtkWidget *widget, ...@@ -169,8 +169,7 @@ GtkSliderRelease (GtkWidget *widget,
} }
gboolean gboolean GtkSliderPress( GtkWidget *widget,
GtkSliderPress (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
...@@ -184,9 +183,11 @@ GtkSliderPress (GtkWidget *widget, ...@@ -184,9 +183,11 @@ GtkSliderPress (GtkWidget *widget,
} }
void /****************************************************************************
GtkTitlePrev (GtkButton *button, * DVD specific items
gpointer user_data) ****************************************************************************/
void GtkTitlePrev( GtkButton * button, gpointer user_data )
{ {
intf_thread_t * p_intf; intf_thread_t * p_intf;
input_area_t * p_area; input_area_t * p_area;
...@@ -208,15 +209,13 @@ GtkTitlePrev (GtkButton *button, ...@@ -208,15 +209,13 @@ GtkTitlePrev (GtkButton *button,
} }
void void GtkTitleNext( GtkButton * button, gpointer user_data )
GtkTitleNext (GtkButton *button,
gpointer user_data)
{ {
intf_thread_t * p_intf; intf_thread_t * p_intf;
input_area_t * p_area; input_area_t * p_area;
int i_id; int i_id;
p_intf = GetIntf( GTK_WIDGET(button), "intf_window" ); p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data );
i_id = p_intf->p_input->stream.p_selected_area->i_id + 1; i_id = p_intf->p_input->stream.p_selected_area->i_id + 1;
if( i_id < p_intf->p_input->stream.i_area_nb ) if( i_id < p_intf->p_input->stream.i_area_nb )
...@@ -232,9 +231,7 @@ GtkTitleNext (GtkButton *button, ...@@ -232,9 +231,7 @@ GtkTitleNext (GtkButton *button,
} }
void void GtkChapterPrev( GtkButton * button, gpointer user_data )
GtkChapterPrev (GtkButton *button,
gpointer user_data)
{ {
intf_thread_t * p_intf; intf_thread_t * p_intf;
input_area_t * p_area; input_area_t * p_area;
...@@ -254,9 +251,7 @@ GtkChapterPrev (GtkButton *button, ...@@ -254,9 +251,7 @@ GtkChapterPrev (GtkButton *button,
} }
void void GtkChapterNext( GtkButton * button, gpointer user_data )
GtkChapterNext (GtkButton *button,
gpointer user_data)
{ {
intf_thread_t * p_intf; intf_thread_t * p_intf;
input_area_t * p_area; input_area_t * p_area;
...@@ -378,94 +373,42 @@ GtkJumpCancel (GtkButton *button, ...@@ -378,94 +373,42 @@ GtkJumpCancel (GtkButton *button,
} }
void /****************************************************************************
GtkFileOpenActivate (GtkMenuItem *menuitem, * Callbacks for menuitems
gpointer user_data) ****************************************************************************/
{ void GtkExitActivate( GtkMenuItem * menuitem, gpointer user_data )
GtkFileOpenShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkDiscOpenActivate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkDiscOpenShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkNetworkOpenActivate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkNetworkOpenShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkExitActivate (GtkMenuItem *menuitem,
gpointer user_data)
{ {
GtkExit( GTK_WIDGET( menuitem ), NULL, user_data ); GtkExit( GTK_WIDGET( menuitem ), NULL, user_data );
} }
void void GtkFullscreenActivate( GtkMenuItem * menuitem, gpointer user_data )
GtkWindowToggleActivate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkWindowToggle( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkFullscreenActivate (GtkMenuItem *menuitem,
gpointer user_data)
{ {
GtkFullscreen( GTK_WIDGET( menuitem ), NULL, user_data ); GtkFullscreen( GTK_WIDGET( menuitem ), NULL, user_data );
} }
void void GtkWindowToggleActivate( GtkMenuItem * menuitem, gpointer user_data )
GtkPlaylistActivate (GtkMenuItem *menuitem,
gpointer user_data)
{ {
GtkPlaylistShow( GTK_WIDGET( menuitem ), NULL, user_data ); GtkWindowToggle( GTK_WIDGET( menuitem ), NULL, user_data );
} }
void void GtkAboutActivate( GtkMenuItem * menuitem, gpointer user_data )
GtkModulesActivate (GtkMenuItem *menuitem,
gpointer user_data)
{ {
GtkAboutShow( GTK_WIDGET( menuitem ), NULL, user_data );
} }
void void GtkJumpActivate( GtkMenuItem * menuitem, gpointer user_data )
GtkPreferencesActivate (GtkMenuItem *menuitem,
gpointer user_data)
{ {
GtkPreferencesShow( GTK_WIDGET( menuitem ), NULL, user_data ); GtkJumpShow( GTK_WIDGET( menuitem ), NULL, user_data );
} }
void void
GtkAboutActivate (GtkMenuItem *menuitem, GtkPlaylistDestroy (GtkObject *object,
gpointer user_data) gpointer user_data)
{ {
GtkAboutShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkJumpActivate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkJumpShow( GTK_WIDGET( menuitem ), NULL, user_data );
} }
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_control.c : functions to handle stream control buttons. * gtk_control.c : functions to handle stream control buttons.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_control.c,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_control.c,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -83,12 +83,12 @@ gboolean GtkControlStop( GtkWidget *widget, ...@@ -83,12 +83,12 @@ gboolean GtkControlStop( GtkWidget *widget,
p_intf->p_input->b_eof = 1; p_intf->p_input->b_eof = 1;
/* update playlist */ /* update playlist */
// vlc_mutex_lock( &p_main->p_playlist->change_lock ); vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->i_index--; p_main->p_playlist->i_index--;
p_main->p_playlist->b_stopped = 1; p_main->p_playlist->b_stopped = 1;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock ); vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
...@@ -109,23 +109,28 @@ gboolean GtkControlPlay( GtkWidget *widget, ...@@ -109,23 +109,28 @@ gboolean GtkControlPlay( GtkWidget *widget,
} }
else else
{ {
// vlc_mutex_lock( &p_main->p_playlist->change_lock ); vlc_mutex_lock( &p_main->p_playlist->change_lock );
if( p_main->p_playlist->b_stopped ) if( p_main->p_playlist->b_stopped )
{ {
if( p_main->p_playlist->i_size ) if( p_main->p_playlist->i_size )
{ {
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist, intf_PlaylistJumpto( p_main->p_playlist,
p_main->p_playlist->i_index ); p_main->p_playlist->i_index );
p_main->p_playlist->b_stopped = 0;
} }
else else
{ {
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
GtkFileOpenShow( widget, event, user_data ); GtkFileOpenShow( widget, event, user_data );
} }
} }
else
{
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
return TRUE; return TRUE;
...@@ -141,7 +146,10 @@ gboolean GtkControlPause( GtkWidget *widget, ...@@ -141,7 +146,10 @@ gboolean GtkControlPause( GtkWidget *widget,
if( p_intf->p_input != NULL ) if( p_intf->p_input != NULL )
{ {
input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE ); input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->b_stopped = 0; p_main->p_playlist->b_stopped = 0;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
return TRUE; return TRUE;
...@@ -157,7 +165,10 @@ gboolean GtkControlSlow( GtkWidget *widget, ...@@ -157,7 +165,10 @@ gboolean GtkControlSlow( GtkWidget *widget,
if( p_intf->p_input != NULL ) if( p_intf->p_input != NULL )
{ {
input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER ); input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->b_stopped = 0; p_main->p_playlist->b_stopped = 0;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
return TRUE; return TRUE;
...@@ -173,7 +184,10 @@ gboolean GtkControlFast( GtkWidget *widget, ...@@ -173,7 +184,10 @@ gboolean GtkControlFast( GtkWidget *widget,
if( p_intf->p_input != NULL ) if( p_intf->p_input != NULL )
{ {
input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER ); input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->b_stopped = 0; p_main->p_playlist->b_stopped = 0;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
return TRUE; return TRUE;
......
...@@ -958,7 +958,7 @@ create_intf_popup (void) ...@@ -958,7 +958,7 @@ create_intf_popup (void)
gtk_container_add (GTK_CONTAINER (intf_popup), separator6); gtk_container_add (GTK_CONTAINER (intf_popup), separator6);
gtk_widget_set_sensitive (separator6, FALSE); gtk_widget_set_sensitive (separator6, FALSE);
popup_interface_toggle = gtk_check_menu_item_new_with_label (""); popup_interface_toggle = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_interface_toggle)->child), tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_interface_toggle)->child),
_("Toggle _Interface")); _("Toggle _Interface"));
gtk_widget_add_accelerator (popup_interface_toggle, "activate_item", intf_popup_accels, gtk_widget_add_accelerator (popup_interface_toggle, "activate_item", intf_popup_accels,
...@@ -968,10 +968,8 @@ create_intf_popup (void) ...@@ -968,10 +968,8 @@ create_intf_popup (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_interface_toggle); gtk_widget_show (popup_interface_toggle);
gtk_container_add (GTK_CONTAINER (intf_popup), popup_interface_toggle); gtk_container_add (GTK_CONTAINER (intf_popup), popup_interface_toggle);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (popup_interface_toggle), TRUE);
gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (popup_interface_toggle), TRUE);
popup_fullscreen = gtk_check_menu_item_new_with_label (""); popup_fullscreen = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_fullscreen)->child), tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_fullscreen)->child),
_("_Fullscreen")); _("_Fullscreen"));
gtk_widget_add_accelerator (popup_fullscreen, "activate_item", intf_popup_accels, gtk_widget_add_accelerator (popup_fullscreen, "activate_item", intf_popup_accels,
...@@ -981,7 +979,6 @@ create_intf_popup (void) ...@@ -981,7 +979,6 @@ create_intf_popup (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_fullscreen); gtk_widget_show (popup_fullscreen);
gtk_container_add (GTK_CONTAINER (intf_popup), popup_fullscreen); gtk_container_add (GTK_CONTAINER (intf_popup), popup_fullscreen);
gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (popup_fullscreen), TRUE);
separator5 = gtk_menu_item_new (); separator5 = gtk_menu_item_new ();
gtk_widget_ref (separator5); gtk_widget_ref (separator5);
...@@ -1803,9 +1800,9 @@ create_intf_jump (void) ...@@ -1803,9 +1800,9 @@ create_intf_jump (void)
GtkWidget *dialog_vbox3; GtkWidget *dialog_vbox3;
GtkWidget *jump_frame; GtkWidget *jump_frame;
GtkWidget *hbox13; GtkWidget *hbox13;
GtkWidget *jump_seconde_label; GtkWidget *jump_second_label;
GtkObject *jump_seconde_spinbutton_adj; GtkObject *jump_second_spinbutton_adj;
GtkWidget *jump_seconde_spinbutton; GtkWidget *jump_second_spinbutton;
GtkWidget *jump_minute_label; GtkWidget *jump_minute_label;
GtkObject *jump_minute_spinbutton_adj; GtkObject *jump_minute_spinbutton_adj;
GtkWidget *jump_minute_spinbutton; GtkWidget *jump_minute_spinbutton;
...@@ -1841,20 +1838,20 @@ create_intf_jump (void) ...@@ -1841,20 +1838,20 @@ create_intf_jump (void)
gtk_widget_show (hbox13); gtk_widget_show (hbox13);
gtk_container_add (GTK_CONTAINER (jump_frame), hbox13); gtk_container_add (GTK_CONTAINER (jump_frame), hbox13);
jump_seconde_label = gtk_label_new (_("s.")); jump_second_label = gtk_label_new (_("s."));
gtk_widget_ref (jump_seconde_label); gtk_widget_ref (jump_second_label);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_seconde_label", jump_seconde_label, gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_second_label", jump_second_label,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_seconde_label); gtk_widget_show (jump_second_label);
gtk_box_pack_end (GTK_BOX (hbox13), jump_seconde_label, FALSE, FALSE, 5); gtk_box_pack_end (GTK_BOX (hbox13), jump_second_label, FALSE, FALSE, 5);
jump_seconde_spinbutton_adj = gtk_adjustment_new (0, 0, 60, 1, 10, 10); jump_second_spinbutton_adj = gtk_adjustment_new (0, 0, 60, 1, 10, 10);
jump_seconde_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (jump_seconde_spinbutton_adj), 1, 0); jump_second_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (jump_second_spinbutton_adj), 1, 0);
gtk_widget_ref (jump_seconde_spinbutton); gtk_widget_ref (jump_second_spinbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_seconde_spinbutton", jump_seconde_spinbutton, gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_second_spinbutton", jump_second_spinbutton,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_seconde_spinbutton); gtk_widget_show (jump_second_spinbutton);
gtk_box_pack_end (GTK_BOX (hbox13), jump_seconde_spinbutton, FALSE, TRUE, 0); gtk_box_pack_end (GTK_BOX (hbox13), jump_second_spinbutton, FALSE, TRUE, 0);
jump_minute_label = gtk_label_new (_("m:")); jump_minute_label = gtk_label_new (_("m:"));
gtk_widget_ref (jump_minute_label); gtk_widget_ref (jump_minute_label);
...@@ -2136,6 +2133,12 @@ create_intf_playlist (void) ...@@ -2136,6 +2133,12 @@ create_intf_playlist (void)
gtk_widget_show (playlist_cancel_button); gtk_widget_show (playlist_cancel_button);
gtk_box_pack_start (GTK_BOX (dialog_action_area3), playlist_cancel_button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (dialog_action_area3), playlist_cancel_button, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (intf_playlist), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_hide),
NULL);
gtk_signal_connect (GTK_OBJECT (intf_playlist), "delete_event",
GTK_SIGNAL_FUNC (gtk_widget_hide),
NULL);
gtk_signal_connect (GTK_OBJECT (playlist_add_disc), "activate", gtk_signal_connect (GTK_OBJECT (playlist_add_disc), "activate",
GTK_SIGNAL_FUNC (GtkDiscOpenActivate), GTK_SIGNAL_FUNC (GtkDiscOpenActivate),
"intf_playlist"); "intf_playlist");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_menu.c : functions to handle menu items. * gtk_menu.c : functions to handle menu items.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_menu.c,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_menu.c,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -347,11 +347,14 @@ static gint GtkRadioMenu( intf_thread_t * p_intf, ...@@ -347,11 +347,14 @@ static gint GtkRadioMenu( intf_thread_t * p_intf,
/* link the new menu to the title menu item */ /* link the new menu to the title menu item */
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu ); gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu );
/* toggle currently selected chapter */ /* toggle currently selected chapter
* We have to release the lock since input_ToggleES needs it */
if( p_item_selected != NULL ) if( p_item_selected != NULL )
{ {
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_selected ), gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_selected ),
TRUE ); TRUE );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
} }
/* be sure that menu is sensitive, if there are several items */ /* be sure that menu is sensitive, if there are several items */
...@@ -427,7 +430,6 @@ static gint GtkLanguageMenus( gpointer p_data, ...@@ -427,7 +430,6 @@ static gint GtkLanguageMenus( gpointer p_data,
gtk_widget_show( p_separator ); gtk_widget_show( p_separator );
gtk_menu_append( GTK_MENU( p_menu ), p_separator ); gtk_menu_append( GTK_MENU( p_menu ), p_separator );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
p_item_active = NULL; p_item_active = NULL;
i_item = 0; i_item = 0;
...@@ -466,17 +468,19 @@ static gint GtkLanguageMenus( gpointer p_data, ...@@ -466,17 +468,19 @@ static gint GtkLanguageMenus( gpointer p_data,
} }
} }
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
/* link the new menu to the menubar item */ /* link the new menu to the menubar item */
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu ); gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu );
/* acitvation will call signals so we can only do it /* acitvation will call signals so we can only do it
* when submenu is attached to menu - to get intf_window */ * when submenu is attached to menu - to get intf_window
* We have to release the lock since input_ToggleES needs it */
if( p_item_active != NULL ) if( p_item_active != NULL )
{ {
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ), gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
TRUE ); TRUE );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
} }
/* be sure that menu is sensitive if non empty */ /* be sure that menu is sensitive if non empty */
...@@ -487,6 +491,7 @@ static gint GtkLanguageMenus( gpointer p_data, ...@@ -487,6 +491,7 @@ static gint GtkLanguageMenus( gpointer p_data,
return TRUE; return TRUE;
} }
#if 1 #if 1
/***************************************************************************** /*****************************************************************************
* GtkTitleMenu: sets menus for titles and chapters selection * GtkTitleMenu: sets menus for titles and chapters selection
...@@ -708,10 +713,14 @@ static gint GtkTitleMenu( gpointer p_data, ...@@ -708,10 +713,14 @@ static gint GtkTitleMenu( gpointer p_data,
/* link the new menu to the menubar item */ /* link the new menu to the menubar item */
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_navigation ), p_title_menu ); gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_navigation ), p_title_menu );
/* Default selected chapter
* We have to release the lock since input_ToggleES needs it */
if( p_item_active != NULL ) if( p_item_active != NULL )
{ {
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ), gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
TRUE ); TRUE );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
} }
#if 0 #if 0
if( p_intf->p_input->stream.i_area_nb > 1 ) if( p_intf->p_input->stream.i_area_nb > 1 )
...@@ -724,6 +733,7 @@ static gint GtkTitleMenu( gpointer p_data, ...@@ -724,6 +733,7 @@ static gint GtkTitleMenu( gpointer p_data,
return TRUE; return TRUE;
} }
#endif #endif
/***************************************************************************** /*****************************************************************************
* GtkSetupMenu: function that generates title/chapter/audio/subpic * GtkSetupMenu: function that generates title/chapter/audio/subpic
* menus with help from preceding functions * menus with help from preceding functions
...@@ -736,7 +746,9 @@ gint GtkSetupMenu( intf_thread_t * p_intf ) ...@@ -736,7 +746,9 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
GtkWidget * p_popup_menu; GtkWidget * p_popup_menu;
gint i; gint i;
p_intf->p_sys->b_chapter_update |= p_intf->p_sys->b_title_update; p_intf->p_sys->b_chapter_update |= p_intf->p_sys->b_title_update |
( p_intf->p_sys->i_part !=
p_intf->p_input->stream.p_selected_area->i_part );
p_intf->p_sys->b_angle_update |= p_intf->p_sys->b_title_update; p_intf->p_sys->b_angle_update |= p_intf->p_sys->b_title_update;
p_intf->p_sys->b_audio_update |= p_intf->p_sys->b_title_update; p_intf->p_sys->b_audio_update |= p_intf->p_sys->b_title_update;
p_intf->p_sys->b_spu_update |= p_intf->p_sys->b_title_update; p_intf->p_sys->b_spu_update |= p_intf->p_sys->b_title_update;
...@@ -865,22 +877,6 @@ gint GtkSetupMenu( intf_thread_t * p_intf ) ...@@ -865,22 +877,6 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
p_intf->p_sys->b_spu_update = 0; p_intf->p_sys->b_spu_update = 0;
} }
/* handle fullscreen check items */
if( p_vout_bank->i_count )
{
p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "menubar_fullscreen" ) );
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_popup ), "popup_fullscreen" ) );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_menubar_menu ),
p_vout_bank->pp_vout[0]->b_fullscreen );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_popup_menu ),
p_vout_bank->pp_vout[0]->b_fullscreen );
}
return TRUE; return TRUE;
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_menu.h: prototypes for menu functions * gtk_menu.h: prototypes for menu functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_menu.h,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_menu.h,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr> * Stéphane Borel <stef@via.ecp.fr>
...@@ -21,18 +21,3 @@ ...@@ -21,18 +21,3 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#if 0
void GtkMenubarAudioToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupAudioToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarSubtitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupSubtitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarTitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupTitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarChapterToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupChapterToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarAngleToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupAngleToggle ( GtkCheckMenuItem *, gpointer );
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_modules.c : functions to build modules configuration boxes. * gtk_modules.c : functions to build modules configuration boxes.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_modules.c,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_modules.c,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -81,3 +81,10 @@ void GtkModulesCancel( GtkButton * button, gpointer user_data ) ...@@ -81,3 +81,10 @@ void GtkModulesCancel( GtkButton * button, gpointer user_data )
gtk_widget_hide( p_intf->p_sys->p_modules ); gtk_widget_hide( p_intf->p_sys->p_modules );
} }
/****************************************************************************
* Callbacks for menuitems
****************************************************************************/
void GtkModulesActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkModulesShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_modules.h: prototypes for modules functions * gtk_modules.h: prototypes for modules functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_modules.h,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_modules.h,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr> * Stéphane Borel <stef@via.ecp.fr>
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
gboolean GtkModulesShow( GtkWidget *widget, gboolean GtkModulesShow ( GtkWidget *, GdkEventButton *, gpointer );
GdkEventButton *event, void GtkModulesCancel ( GtkButton * button, gpointer );
gpointer user_data); void GtkModulesActivate( GtkMenuItem * menuitem, gpointer );
void GtkModulesCancel ( GtkButton * button, gpointer user_data );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets. * gtk_open.c : functions to handle file/disc/network open widgets.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_open.c,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_open.c,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -61,32 +61,9 @@ ...@@ -61,32 +61,9 @@
***************************************************************************** *****************************************************************************
* The following callbacks are related to the file requester. * The following callbacks are related to the file requester.
*****************************************************************************/ *****************************************************************************/
#if 0 gboolean GtkFileOpenShow( GtkWidget *widget,
void GtkFileOpenShow( GtkMenuItem * menuitem, gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data );
/* If we have never used the file selector, open it */
if( !GTK_IS_WIDGET( p_intf->p_sys->p_fileopen ) )
{
p_intf->p_sys->p_fileopen = create_intf_fileopen();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
"p_intf", p_intf );
gtk_file_selection_set_filename( GTK_FILE_SELECTION(
p_intf->p_sys->p_fileopen ),
main_GetPszVariable( INTF_PATH_VAR, INTF_PATH_DEFAULT ) );
}
gtk_widget_show( p_intf->p_sys->p_fileopen );
gdk_window_raise( p_intf->p_sys->p_fileopen->window );
}
#else
gboolean
GtkFileOpenShow (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data )
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
...@@ -105,12 +82,11 @@ GtkFileOpenShow (GtkWidget *widget, ...@@ -105,12 +82,11 @@ GtkFileOpenShow (GtkWidget *widget,
gtk_widget_show( p_intf->p_sys->p_fileopen ); gtk_widget_show( p_intf->p_sys->p_fileopen );
gdk_window_raise( p_intf->p_sys->p_fileopen->window ); gdk_window_raise( p_intf->p_sys->p_fileopen->window );
return FALSE; return TRUE;
} }
#endif void GtkFileOpenCancel( GtkButton * button, gpointer user_data )
void GtkFileOpenCancel( GtkButton * button, gpointer user_data)
{ {
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) ); gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
} }
...@@ -145,7 +121,6 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data ) ...@@ -145,7 +121,6 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
} }
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
} }
/***************************************************************************** /*****************************************************************************
...@@ -153,24 +128,7 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data ) ...@@ -153,24 +128,7 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
***************************************************************************** *****************************************************************************
* The following callbacks are related to the disc manager. * The following callbacks are related to the disc manager.
*****************************************************************************/ *****************************************************************************/
#if 0 gboolean GtkDiscOpenShow( GtkWidget *widget,
void GtkDiscOpenShow( GtkMenuItem * menuitem, gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_disc ) )
{
p_intf->p_sys->p_disc = create_intf_disc();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_disc ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_disc );
gdk_window_raise( p_intf->p_sys->p_disc->window );
}
#else
gboolean
GtkDiscOpenShow (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
...@@ -186,10 +144,10 @@ GtkDiscOpenShow (GtkWidget *widget, ...@@ -186,10 +144,10 @@ GtkDiscOpenShow (GtkWidget *widget,
gtk_widget_show( p_intf->p_sys->p_disc ); gtk_widget_show( p_intf->p_sys->p_disc );
gdk_window_raise( p_intf->p_sys->p_disc->window ); gdk_window_raise( p_intf->p_sys->p_disc->window );
return FALSE; return TRUE;
} }
#endif
void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data ) void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
{ {
if( togglebutton->active ) if( togglebutton->active )
...@@ -201,7 +159,7 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data ) ...@@ -201,7 +159,7 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
} }
} }
void GtkDiscOpenVcd( GtkToggleButton *togglebutton, gpointer user_data ) void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
{ {
if( togglebutton->active ) if( togglebutton->active )
{ {
...@@ -276,45 +234,24 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data ) ...@@ -276,45 +234,24 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data )
p_intf->p_input->b_eof = 1; p_intf->p_input->b_eof = 1;
} }
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
void GtkDiscOpenCancel( GtkButton * button, gpointer user_data)
void GtkDiscOpenCancel( GtkButton * button, gpointer user_data )
{ {
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) ); gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
} }
/***************************************************************************** /*****************************************************************************
* Network stream callbacks * Network stream callbacks
***************************************************************************** *****************************************************************************
* The following callbacks are related to the network stream manager. * The following callbacks are related to the network stream manager.
*****************************************************************************/ *****************************************************************************/
#if 0 gboolean GtkNetworkOpenShow( GtkWidget *widget,
void GtkNetworkOpenShow( GtkMenuItem * menuitem, gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_network ) )
{
p_intf->p_sys->p_disc = create_intf_network();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_network ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_network );
gdk_window_raise( p_intf->p_sys->p_network->window );
}
#else
gboolean
GtkNetworkOpenShow (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
gpointer user_data) gpointer user_data )
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
...@@ -328,13 +265,10 @@ GtkNetworkOpenShow (GtkWidget *widget, ...@@ -328,13 +265,10 @@ GtkNetworkOpenShow (GtkWidget *widget,
gtk_widget_show( p_intf->p_sys->p_network ); gtk_widget_show( p_intf->p_sys->p_network );
gdk_window_raise( p_intf->p_sys->p_network->window ); gdk_window_raise( p_intf->p_sys->p_network->window );
return FALSE; return TRUE;
} }
#endif
void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
{ {
intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_network" ); intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_network" );
...@@ -428,12 +362,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) ...@@ -428,12 +362,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
p_intf->p_input->b_eof = 1; p_intf->p_input->b_eof = 1;
} }
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
void GtkNetworkOpenCancel( GtkButton * button, gpointer user_data) void GtkNetworkOpenCancel( GtkButton * button, gpointer user_data)
...@@ -460,3 +389,24 @@ void GtkNetworkOpenBroadcast( GtkToggleButton * togglebutton, ...@@ -460,3 +389,24 @@ void GtkNetworkOpenBroadcast( GtkToggleButton * togglebutton,
/****************************************************************************
* Callbacks for menuitem
****************************************************************************/
void GtkFileOpenActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkFileOpenShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void GtkDiscOpenActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkDiscOpenShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void GtkNetworkOpenActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkNetworkOpenShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_open.h: prototypes for open functions * gtk_open.h: prototypes for open functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_open.h,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_open.h,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -22,35 +22,21 @@ ...@@ -22,35 +22,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
gboolean gboolean GtkFileOpenShow ( GtkWidget *, GdkEventButton *, gpointer );
GtkFileOpenShow (GtkWidget *widget, void GtkFileOpenCancel ( GtkButton *, gpointer );
GdkEventButton *event, void GtkFileOpenOk ( GtkButton *, gpointer );
gpointer user_data);
void GtkFileOpenCancel( GtkButton * button, gpointer user_data); gboolean GtkDiscOpenShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkDiscOpenDvd ( GtkToggleButton *, gpointer );
void GtkFileOpenOk( GtkButton * button, gpointer user_data ); void GtkDiscOpenVcd ( GtkToggleButton *, gpointer );
void GtkDiscOpenOk ( GtkButton *, gpointer );
void GtkDiscOpenCancel ( GtkButton *, gpointer );
gboolean
GtkDiscOpenShow (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data );
void GtkDiscOpenVcd( GtkToggleButton *togglebutton, gpointer user_data );
void GtkDiscOpenOk( GtkButton * button, gpointer user_data );
void GtkDiscOpenCancel( GtkButton * button, gpointer user_data);
gboolean
GtkNetworkOpenShow (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void GtkNetworkOpenOk( GtkButton *button, gpointer user_data );
void GtkNetworkOpenCancel( GtkButton * button, gpointer user_data);
void GtkNetworkOpenBroadcast( GtkToggleButton * togglebutton,
gpointer user_data );
gboolean GtkNetworkOpenShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkNetworkOpenOk ( GtkButton *, gpointer );
void GtkNetworkOpenCancel ( GtkButton *, gpointer );
void GtkNetworkOpenBroadcast( GtkToggleButton *, gpointer );
void GtkFileOpenActivate ( GtkMenuItem *, gpointer );
void GtkDiscOpenActivate ( GtkMenuItem *, gpointer );
void GtkNetworkOpenActivate ( GtkMenuItem *, gpointer );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog * gtk_playlist.c : Interface for the playlist dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: gtk_playlist.c,v 1.12 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_playlist.c,v 1.13 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Pierre Baillet <oct@zoy.org> * Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -74,9 +74,22 @@ gboolean GtkPlaylistShow( GtkWidget *widget, ...@@ -74,9 +74,22 @@ gboolean GtkPlaylistShow( GtkWidget *widget,
if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) ) if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
{ {
/* The data types we are allowed to receive */
static GtkTargetEntry target_table[] =
{
{ "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
{ "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
};
p_intf->p_sys->p_playlist = create_intf_playlist(); p_intf->p_sys->p_playlist = create_intf_playlist();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
"p_intf", p_intf ); "p_intf", p_intf );
/* Accept file drops on the playlist window */
gtk_drag_dest_set( GTK_WIDGET( lookup_widget( p_intf->p_sys->p_playlist,
"playlist_clist") ),
GTK_DEST_DEFAULT_ALL, target_table,
1, GDK_ACTION_COPY );
} }
if( GTK_WIDGET_VISIBLE( p_intf->p_sys->p_playlist ) ) if( GTK_WIDGET_VISIBLE( p_intf->p_sys->p_playlist ) )
...@@ -147,6 +160,12 @@ gboolean GtkPlaylistNext( GtkWidget *widget, ...@@ -147,6 +160,12 @@ gboolean GtkPlaylistNext( GtkWidget *widget,
/**************************************************************************** /****************************************************************************
* Menu callbacks for playlist functions * Menu callbacks for playlist functions
****************************************************************************/ ****************************************************************************/
void GtkPlaylistActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkPlaylistShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void GtkNextActivate( GtkMenuItem * menuitem, gpointer user_data ) void GtkNextActivate( GtkMenuItem * menuitem, gpointer user_data )
{ {
GtkPlaylistNext( GTK_WIDGET( menuitem ), NULL, user_data ); GtkPlaylistNext( GTK_WIDGET( menuitem ), NULL, user_data );
...@@ -294,12 +313,7 @@ gboolean GtkPlaylistEvent( GtkWidget * widget, ...@@ -294,12 +313,7 @@ gboolean GtkPlaylistEvent( GtkWidget * widget,
p_intf->p_input->b_eof = 1; p_intf->p_input->b_eof = 1;
} }
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist, i_row - 1 ); intf_PlaylistJumpto( p_main->p_playlist, i_row - 1 );
p_main->p_playlist->b_stopped = 0;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
return TRUE; return TRUE;
} }
...@@ -339,12 +353,7 @@ void GtkPlaylistDragData( GtkWidget *widget, ...@@ -339,12 +353,7 @@ void GtkPlaylistDragData( GtkWidget *widget,
GtkDropDataReceived( p_intf, data, info, PLAYLIST_END ); GtkDropDataReceived( p_intf, data, info, PLAYLIST_END );
} }
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
...@@ -500,8 +509,6 @@ void GtkDropDataReceived( intf_thread_t * p_intf, ...@@ -500,8 +509,6 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
/* unlock the interface */ /* unlock the interface */
vlc_mutex_unlock( &p_intf->change_lock ); vlc_mutex_unlock( &p_intf->change_lock );
p_main->p_playlist->b_stopped = 0;
} }
} }
...@@ -658,9 +665,13 @@ void GtkPlayListManage( intf_thread_t * p_intf ) ...@@ -658,9 +665,13 @@ void GtkPlayListManage( intf_thread_t * p_intf )
playlist_t * p_playlist = p_main->p_playlist ; playlist_t * p_playlist = p_main->p_playlist ;
GtkCList * p_clist; GtkCList * p_clist;
if( GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
{
p_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_playlist ), "playlist_clist" ) ); p_intf->p_sys->p_playlist ), "playlist_clist" ) );
vlc_mutex_lock( &p_playlist->change_lock );
if( p_intf->p_sys->i_playing != p_playlist->i_index ) if( p_intf->p_sys->i_playing != p_playlist->i_index )
{ {
GdkColor color; GdkColor color;
...@@ -681,6 +692,9 @@ void GtkPlayListManage( intf_thread_t * p_intf ) ...@@ -681,6 +692,9 @@ void GtkPlayListManage( intf_thread_t * p_intf )
} }
p_intf->p_sys->i_playing = p_playlist->i_index; p_intf->p_sys->i_playing = p_playlist->i_index;
} }
vlc_mutex_unlock( &p_playlist->change_lock );
}
} }
void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist ) void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_playlist.h : Playlist functions for the Gtk plugin. * gtk_playlist.h : Playlist functions for the Gtk plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_playlist.h,v 1.2 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_playlist.h,v 1.3 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Pierre Baillet <oct@zoy.org> * Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -29,9 +29,10 @@ void GtkPlaylistInvert ( GtkMenuItem *, gpointer ); ...@@ -29,9 +29,10 @@ void GtkPlaylistInvert ( GtkMenuItem *, gpointer );
void GtkPlaylistSelect ( GtkMenuItem *, gpointer ); void GtkPlaylistSelect ( GtkMenuItem *, gpointer );
void GtkPlaylistOk ( GtkButton *, gpointer ); void GtkPlaylistOk ( GtkButton *, gpointer );
void GtkPlaylistCancel ( GtkButton *, gpointer ); void GtkPlaylistCancel ( GtkButton *, gpointer );
void GtkPlaylistAddUrl ( GtkMenuItem *, gpointer );
int GtkHasValidExtension ( gchar * );
gint GtkCompareItems ( gconstpointer, gconstpointer ); gint GtkCompareItems ( gconstpointer, gconstpointer );
int GtkHasValidExtension ( gchar * );
GList * GtkReadFiles ( gchar * ); GList * GtkReadFiles ( gchar * );
gboolean GtkPlaylistShow ( GtkWidget *, GdkEventButton *, gpointer ); gboolean GtkPlaylistShow ( GtkWidget *, GdkEventButton *, gpointer );
...@@ -44,3 +45,8 @@ void GtkPlaylistDragData ( GtkWidget *, GdkDragContext *, ...@@ -44,3 +45,8 @@ void GtkPlaylistDragData ( GtkWidget *, GdkDragContext *,
gint, gint, GtkSelectionData *, gint, gint, GtkSelectionData *,
guint, guint, gpointer ); guint, guint, gpointer );
void GtkDeleteGListItem ( gpointer, gpointer ); void GtkDeleteGListItem ( gpointer, gpointer );
void GtkPlaylistActivate ( GtkMenuItem *, gpointer );
void GtkNextActivate ( GtkMenuItem *, gpointer );
void GtkPrevActivate ( GtkMenuItem *, gpointer );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_control.c : functions to handle stream control buttons. * gtk_control.c : functions to handle stream control buttons.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_preferences.c,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_preferences.c,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -318,3 +318,11 @@ void GtkPreferencesCancel( GtkButton * button, gpointer user_data ) ...@@ -318,3 +318,11 @@ void GtkPreferencesCancel( GtkButton * button, gpointer user_data )
{ {
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) ); gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
} }
/****************************************************************************
* Callbacks for menuitems
****************************************************************************/
void GtkPreferencesActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkPreferencesShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_control.h: prototypes for control functions * gtk_control.h: prototypes for control functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_preferences.h,v 1.1 2001/05/15 01:01:44 stef Exp $ * $Id: gtk_preferences.h,v 1.2 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -25,4 +25,5 @@ ...@@ -25,4 +25,5 @@
gboolean GtkPreferencesShow ( GtkWidget *, GdkEventButton *, gpointer ); gboolean GtkPreferencesShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkPreferencesOk ( GtkButton *, gpointer ); void GtkPreferencesOk ( GtkButton *, gpointer );
void GtkPreferencesApply ( GtkButton *, gpointer ); void GtkPreferencesApply ( GtkButton *, gpointer );
void GtkPreferencesCancel( GtkButton *, gpointer ); void GtkPreferencesCancel ( GtkButton *, gpointer );
void GtkPreferencesActivate( GtkMenuItem *, gpointer );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface * intf_gtk.c: Gtk+ interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.c,v 1.18 2001/05/15 01:01:44 stef Exp $ * $Id: intf_gtk.c,v 1.19 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -198,7 +198,7 @@ static void intf_Run( intf_thread_t *p_intf ) ...@@ -198,7 +198,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* Create some useful widgets that will certainly be used */ /* Create some useful widgets that will certainly be used */
p_intf->p_sys->p_window = create_intf_window( ); p_intf->p_sys->p_window = create_intf_window( );
p_intf->p_sys->p_popup = create_intf_popup( ); p_intf->p_sys->p_popup = create_intf_popup( );
p_intf->p_sys->p_playlist = create_intf_playlist( ); p_intf->p_sys->p_playlist = create_intf_playlist();
/* Set the title of the main window */ /* Set the title of the main window */
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window), gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
...@@ -251,7 +251,7 @@ static void intf_Run( intf_thread_t *p_intf ) ...@@ -251,7 +251,7 @@ static void intf_Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup), gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
"p_intf", p_intf ); "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_playlist), gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
"p_intf", p_intf ); "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj), gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
...@@ -316,14 +316,14 @@ static gint GtkManage( gpointer p_data ) ...@@ -316,14 +316,14 @@ static gint GtkManage( gpointer p_data )
if( p_intf->p_input != NULL && !p_intf->b_die ) if( p_intf->p_input != NULL && !p_intf->b_die )
{ {
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
/* New input or stream map change */ /* New input or stream map change */
if( p_intf->p_input->stream.b_changed ) if( p_intf->p_input->stream.b_changed )
{ {
GtkModeManage( p_intf ); GtkModeManage( p_intf );
} }
GtkSetupMenu( p_intf );
/* Manage the slider */ /* Manage the slider */
if( p_intf->p_input->stream.b_seekable ) if( p_intf->p_input->stream.b_seekable )
{ {
...@@ -347,13 +347,19 @@ static gint GtkManage( gpointer p_data ) ...@@ -347,13 +347,19 @@ static gint GtkManage( gpointer p_data )
{ {
off_t i_seek = ( newvalue * p_area->i_size ) / 100; off_t i_seek = ( newvalue * p_area->i_size ) / 100;
/* release the lock to be able to seek */
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
input_Seek( p_intf->p_input, i_seek ); input_Seek( p_intf->p_input, i_seek );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
/* Update the old value */ /* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue; p_intf->p_sys->f_adj_oldvalue = newvalue;
} }
#undef p_area #undef p_area
} }
GtkSetupMenu( p_intf );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
} }
else if( !p_intf->b_die ) else if( !p_intf->b_die )
{ {
...@@ -386,6 +392,7 @@ static gint GtkManage( gpointer p_data ) ...@@ -386,6 +392,7 @@ static gint GtkManage( gpointer p_data )
***************************************************************************** *****************************************************************************
* This function displays the current date related to the position in * This function displays the current date related to the position in
* the stream. It is called whenever the slider changes its value. * the stream. It is called whenever the slider changes its value.
* The lock has to be taken before you call the function.
*****************************************************************************/ *****************************************************************************/
void GtkDisplayDate( GtkAdjustment *p_adj ) void GtkDisplayDate( GtkAdjustment *p_adj )
{ {
...@@ -398,20 +405,19 @@ void GtkDisplayDate( GtkAdjustment *p_adj ) ...@@ -398,20 +405,19 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
#define p_area p_intf->p_input->stream.p_selected_area #define p_area p_intf->p_input->stream.p_selected_area
char psz_time[ OFFSETTOTIME_MAX_SIZE ]; char psz_time[ OFFSETTOTIME_MAX_SIZE ];
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
gtk_frame_set_label( GTK_FRAME( p_intf->p_sys->p_slider_frame ), gtk_frame_set_label( GTK_FRAME( p_intf->p_sys->p_slider_frame ),
input_OffsetToTime( p_intf->p_input, psz_time, input_OffsetToTime( p_intf->p_input, psz_time,
( p_area->i_size * p_adj->value ) / 100 ) ); ( p_area->i_size * p_adj->value ) / 100 ) );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
#undef p_area #undef p_area
} }
} }
/***************************************************************************** /*****************************************************************************
* GtkModeManage * GtkModeManage: actualise the aspect of the interface whenever the input
* changes.
*****************************************************************************
* The lock has to be taken before you call the function.
*****************************************************************************/ *****************************************************************************/
static gint GtkModeManage( intf_thread_t * p_intf ) static gint GtkModeManage( intf_thread_t * p_intf )
{ {
...@@ -497,10 +503,26 @@ static gint GtkModeManage( intf_thread_t * p_intf ) ...@@ -497,10 +503,26 @@ static gint GtkModeManage( intf_thread_t * p_intf )
} }
else else
{ {
/* default mode */
p_label = gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_window ), p_label = gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_window ),
"label_status" ); "label_status" );
gtk_label_set_text( GTK_LABEL( p_label ), "" ); gtk_label_set_text( GTK_LABEL( p_label ), "" );
gtk_widget_show( GTK_WIDGET( p_file_box ) ); gtk_widget_show( GTK_WIDGET( p_file_box ) );
/* unsensitize menus */
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_angle"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_angle"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"),
FALSE );
} }
/* set control items */ /* set control items */
......
...@@ -942,7 +942,7 @@ ...@@ -942,7 +942,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkPlayActivate</handler> <handler>GtkPlayActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:30:37 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:43 GMT</last_modification_time>
</signal> </signal>
<label>_Play</label> <label>_Play</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -956,7 +956,7 @@ ...@@ -956,7 +956,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkPauseActivate</handler> <handler>GtkPauseActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:30:47 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:37 GMT</last_modification_time>
</signal> </signal>
<label>Pause</label> <label>Pause</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -970,7 +970,7 @@ ...@@ -970,7 +970,7 @@
<name>activate</name> <name>activate</name>
<handler>GtKStopActivate</handler> <handler>GtKStopActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:31:03 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:29 GMT</last_modification_time>
</signal> </signal>
<label>Stop</label> <label>Stop</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -984,7 +984,7 @@ ...@@ -984,7 +984,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkBackActivate</handler> <handler>GtkBackActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:31:13 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:21 GMT</last_modification_time>
</signal> </signal>
<label>Back</label> <label>Back</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -998,7 +998,7 @@ ...@@ -998,7 +998,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkSlowActivate</handler> <handler>GtkSlowActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:31:22 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:15 GMT</last_modification_time>
</signal> </signal>
<label>Slow</label> <label>Slow</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1012,7 +1012,7 @@ ...@@ -1012,7 +1012,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkFastActivate</handler> <handler>GtkFastActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:31:33 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:07 GMT</last_modification_time>
</signal> </signal>
<label>Fast</label> <label>Fast</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1025,31 +1025,29 @@ ...@@ -1025,31 +1025,29 @@
</widget> </widget>
<widget> <widget>
<class>GtkCheckMenuItem</class> <class>GtkMenuItem</class>
<name>popup_interface_toggle</name> <name>popup_interface_toggle</name>
<signal> <signal>
<name>activate</name> <name>activate</name>
<handler>GtkWindowToggleActivate</handler> <handler>GtkWindowToggleActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:32:18 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:53:00 GMT</last_modification_time>
</signal> </signal>
<label>Toggle _Interface</label> <label>Toggle _Interface</label>
<active>True</active> <right_justify>False</right_justify>
<always_show_toggle>True</always_show_toggle>
</widget> </widget>
<widget> <widget>
<class>GtkCheckMenuItem</class> <class>GtkMenuItem</class>
<name>popup_fullscreen</name> <name>popup_fullscreen</name>
<signal> <signal>
<name>activate</name> <name>activate</name>
<handler>GtkFullscreenActivate</handler> <handler>GtkFullscreenActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:32:30 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:52:38 GMT</last_modification_time>
</signal> </signal>
<label>_Fullscreen</label> <label>_Fullscreen</label>
<active>False</active> <right_justify>False</right_justify>
<always_show_toggle>True</always_show_toggle>
</widget> </widget>
<widget> <widget>
...@@ -1065,7 +1063,7 @@ ...@@ -1065,7 +1063,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkNextActivate</handler> <handler>GtkNextActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:33:12 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:52:31 GMT</last_modification_time>
</signal> </signal>
<label>Next</label> <label>Next</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1078,7 +1076,7 @@ ...@@ -1078,7 +1076,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkPrevActivate</handler> <handler>GtkPrevActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:33:25 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:52:23 GMT</last_modification_time>
</signal> </signal>
<label>Prev</label> <label>Prev</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1091,7 +1089,7 @@ ...@@ -1091,7 +1089,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkJumpActivate</handler> <handler>GtkJumpActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:33:37 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:52:13 GMT</last_modification_time>
</signal> </signal>
<label>_Jump...</label> <label>_Jump...</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1209,7 +1207,7 @@ ...@@ -1209,7 +1207,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkPlaylistActivate</handler> <handler>GtkPlaylistActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:35:07 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:51:55 GMT</last_modification_time>
</signal> </signal>
<label>Playlist...</label> <label>Playlist...</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1222,7 +1220,7 @@ ...@@ -1222,7 +1220,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkPreferencesActivate</handler> <handler>GtkPreferencesActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:35:18 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:51:46 GMT</last_modification_time>
</signal> </signal>
<label>_Preferences...</label> <label>_Preferences...</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1241,7 +1239,7 @@ ...@@ -1241,7 +1239,7 @@
<name>activate</name> <name>activate</name>
<handler>GtkExitActivate</handler> <handler>GtkExitActivate</handler>
<data>&quot;intf_popup&quot;</data> <data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:35:31 GMT</last_modification_time> <last_modification_time>Tue, 15 May 2001 13:52:03 GMT</last_modification_time>
</signal> </signal>
<label>E_xit</label> <label>E_xit</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -2298,7 +2296,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label> ...@@ -2298,7 +2296,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>jump_seconde_label</name> <name>jump_second_label</name>
<label>s.</label> <label>s.</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
...@@ -2316,7 +2314,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label> ...@@ -2316,7 +2314,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
<widget> <widget>
<class>GtkSpinButton</class> <class>GtkSpinButton</class>
<name>jump_seconde_spinbutton</name> <name>jump_second_spinbutton</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<climb_rate>1</climb_rate> <climb_rate>1</climb_rate>
<digits>0</digits> <digits>0</digits>
...@@ -2429,6 +2427,16 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label> ...@@ -2429,6 +2427,16 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
<widget> <widget>
<class>GtkDialog</class> <class>GtkDialog</class>
<name>intf_playlist</name> <name>intf_playlist</name>
<signal>
<name>destroy</name>
<handler>gtk_widget_hide</handler>
<last_modification_time>Tue, 15 May 2001 14:20:39 GMT</last_modification_time>
</signal>
<signal>
<name>delete_event</name>
<handler>gtk_widget_hide</handler>
<last_modification_time>Tue, 15 May 2001 14:20:22 GMT</last_modification_time>
</signal>
<title>Playlist</title> <title>Playlist</title>
<type>GTK_WINDOW_TOPLEVEL</type> <type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position> <position>GTK_WIN_POS_NONE</position>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* interface, such as command line. * interface, such as command line.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: interface.c,v 1.78 2001/05/15 01:01:44 stef Exp $ * $Id: interface.c,v 1.79 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -154,6 +154,8 @@ static void intf_Manage( intf_thread_t *p_intf ) ...@@ -154,6 +154,8 @@ static void intf_Manage( intf_thread_t *p_intf )
/* If no stream is being played, try to find one */ /* If no stream is being played, try to find one */
if( p_intf->p_input == NULL && !p_intf->b_die ) if( p_intf->p_input == NULL && !p_intf->b_die )
{ {
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
if( !p_main->p_playlist->b_stopped ) if( !p_main->p_playlist->b_stopped )
{ {
/* Select the next playlist item */ /* Select the next playlist item */
...@@ -167,6 +169,9 @@ static void intf_Manage( intf_thread_t *p_intf ) ...@@ -167,6 +169,9 @@ static void intf_Manage( intf_thread_t *p_intf )
else else
{ {
p_main->p_playlist->b_stopped = 0; p_main->p_playlist->b_stopped = 0;
p_main->p_playlist->i_mode = PLAYLIST_FORWARD +
main_GetIntVariable( PLAYLIST_LOOP_VAR,
PLAYLIST_LOOP_DEFAULT );
p_intf->p_input = p_intf->p_input =
input_CreateThread( &p_main->p_playlist->current, NULL ); input_CreateThread( &p_main->p_playlist->current, NULL );
} }
...@@ -186,6 +191,8 @@ static void intf_Manage( intf_thread_t *p_intf ) ...@@ -186,6 +191,8 @@ static void intf_Manage( intf_thread_t *p_intf )
p_vout_bank->i_count--; p_vout_bank->i_count--;
} }
} }
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_playlist.c : Playlist management functions * intf_playlist.c : Playlist management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.c,v 1.5 2001/05/15 01:01:44 stef Exp $ * $Id: intf_playlist.c,v 1.6 2001/05/15 14:49:48 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -248,8 +248,6 @@ void intf_PlaylistDestroy( playlist_t * p_playlist ) ...@@ -248,8 +248,6 @@ void intf_PlaylistDestroy( playlist_t * p_playlist )
/***************************************************************************** /*****************************************************************************
* intf_PlaylistJumpto: go to a specified position in playlist. * intf_PlaylistJumpto: go to a specified position in playlist.
*****************************************************************************
* Note that this function does NOT take the lock
*****************************************************************************/ *****************************************************************************/
void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos) void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
{ {
...@@ -269,6 +267,7 @@ void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos) ...@@ -269,6 +267,7 @@ void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
= strdup( p_playlist->current.psz_name ); = strdup( p_playlist->current.psz_name );
} }
p_main->p_playlist->b_stopped = 0;
vlc_mutex_unlock( &p_playlist->change_lock ); vlc_mutex_unlock( &p_playlist->change_lock );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment