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

*Bugfixes, cleanings in gtk.

parent 9530fc9f
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* 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>
*
......@@ -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_start;
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 */
p_input->stream.pp_programs[0]->i_synchro_state = SYNCHRO_REINIT;
......
......@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -66,10 +66,9 @@
* Main interface callbacks
*/
gboolean
GtkExit (GtkWidget *widget,
gboolean GtkExit( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
......@@ -80,10 +79,9 @@ GtkExit (GtkWidget *widget,
return TRUE;
}
gboolean
GtkWindowDelete (GtkWidget *widget,
gboolean GtkWindowDelete( GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
gpointer user_data )
{
GtkExit( GTK_WIDGET( widget ), NULL, user_data );
......@@ -91,10 +89,9 @@ GtkWindowDelete (GtkWidget *widget,
}
gboolean
GtkWindowToggle (GtkWidget *widget,
gboolean GtkWindowToggle( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
......@@ -111,25 +108,27 @@ GtkWindowToggle (GtkWidget *widget,
return TRUE;
}
gboolean
GtkFullscreen (GtkWidget *widget,
gboolean GtkFullscreen( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
if( p_vout_bank->i_count )
{
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;
vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock );
}
return TRUE;
}
else
{
return FALSE;
}
}
void
GtkWindowDrag (GtkWidget *widget,
void GtkWindowDrag( GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
......@@ -140,7 +139,7 @@ GtkWindowDrag (GtkWidget *widget,
{
intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
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 )
{
......@@ -149,15 +148,16 @@ GtkWindowDrag (GtkWidget *widget,
}
intf_PlaylistJumpto( p_main->p_playlist, end-1 );
p_main->p_playlist->b_stopped = 0;
}
/****************************************************************************
* Slider management
****************************************************************************/
gboolean
GtkSliderRelease (GtkWidget *widget,
gboolean GtkSliderRelease( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" );
......@@ -169,8 +169,7 @@ GtkSliderRelease (GtkWidget *widget,
}
gboolean
GtkSliderPress (GtkWidget *widget,
gboolean GtkSliderPress( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
......@@ -184,9 +183,11 @@ GtkSliderPress (GtkWidget *widget,
}
void
GtkTitlePrev (GtkButton *button,
gpointer user_data)
/****************************************************************************
* DVD specific items
****************************************************************************/
void GtkTitlePrev( GtkButton * button, gpointer user_data )
{
intf_thread_t * p_intf;
input_area_t * p_area;
......@@ -208,15 +209,13 @@ GtkTitlePrev (GtkButton *button,
}
void
GtkTitleNext (GtkButton *button,
gpointer user_data)
void GtkTitleNext( GtkButton * button, gpointer user_data )
{
intf_thread_t * p_intf;
input_area_t * p_area;
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;
if( i_id < p_intf->p_input->stream.i_area_nb )
......@@ -232,9 +231,7 @@ GtkTitleNext (GtkButton *button,
}
void
GtkChapterPrev (GtkButton *button,
gpointer user_data)
void GtkChapterPrev( GtkButton * button, gpointer user_data )
{
intf_thread_t * p_intf;
input_area_t * p_area;
......@@ -254,9 +251,7 @@ GtkChapterPrev (GtkButton *button,
}
void
GtkChapterNext (GtkButton *button,
gpointer user_data)
void GtkChapterNext( GtkButton * button, gpointer user_data )
{
intf_thread_t * p_intf;
input_area_t * p_area;
......@@ -378,94 +373,42 @@ GtkJumpCancel (GtkButton *button,
}
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 );
}
void
GtkExitActivate (GtkMenuItem *menuitem,
gpointer user_data)
/****************************************************************************
* Callbacks for menuitems
****************************************************************************/
void GtkExitActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkExit( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkWindowToggleActivate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkWindowToggle( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkFullscreenActivate (GtkMenuItem *menuitem,
gpointer user_data)
void GtkFullscreenActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkFullscreen( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkPlaylistActivate (GtkMenuItem *menuitem,
gpointer user_data)
void GtkWindowToggleActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkPlaylistShow( GTK_WIDGET( menuitem ), NULL, user_data );
GtkWindowToggle( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkModulesActivate (GtkMenuItem *menuitem,
gpointer user_data)
void GtkAboutActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkAboutShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkPreferencesActivate (GtkMenuItem *menuitem,
gpointer user_data)
void GtkJumpActivate( GtkMenuItem * menuitem, gpointer user_data )
{
GtkPreferencesShow( GTK_WIDGET( menuitem ), NULL, user_data );
GtkJumpShow( GTK_WIDGET( menuitem ), NULL, user_data );
}
void
GtkAboutActivate (GtkMenuItem *menuitem,
GtkPlaylistDestroy (GtkObject *object,
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 @@
* gtk_control.c : functions to handle stream control buttons.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -83,12 +83,12 @@ gboolean GtkControlStop( GtkWidget *widget,
p_intf->p_input->b_eof = 1;
/* 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->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,
}
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->i_size )
{
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto( p_main->p_playlist,
p_main->p_playlist->i_index );
p_main->p_playlist->b_stopped = 0;
}
else
{
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
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;
......@@ -141,7 +146,10 @@ gboolean GtkControlPause( GtkWidget *widget,
if( p_intf->p_input != NULL )
{
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;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
return TRUE;
......@@ -157,7 +165,10 @@ gboolean GtkControlSlow( GtkWidget *widget,
if( p_intf->p_input != NULL )
{
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;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
return TRUE;
......@@ -173,7 +184,10 @@ gboolean GtkControlFast( GtkWidget *widget,
if( p_intf->p_input != NULL )
{
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;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
return TRUE;
......
......@@ -958,7 +958,7 @@ create_intf_popup (void)
gtk_container_add (GTK_CONTAINER (intf_popup), separator6);
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),
_("Toggle _Interface"));
gtk_widget_add_accelerator (popup_interface_toggle, "activate_item", intf_popup_accels,
......@@ -968,10 +968,8 @@ create_intf_popup (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (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),
_("_Fullscreen"));
gtk_widget_add_accelerator (popup_fullscreen, "activate_item", intf_popup_accels,
......@@ -981,7 +979,6 @@ create_intf_popup (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (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 ();
gtk_widget_ref (separator5);
......@@ -1803,9 +1800,9 @@ create_intf_jump (void)
GtkWidget *dialog_vbox3;
GtkWidget *jump_frame;
GtkWidget *hbox13;
GtkWidget *jump_seconde_label;
GtkObject *jump_seconde_spinbutton_adj;
GtkWidget *jump_seconde_spinbutton;
GtkWidget *jump_second_label;
GtkObject *jump_second_spinbutton_adj;
GtkWidget *jump_second_spinbutton;
GtkWidget *jump_minute_label;
GtkObject *jump_minute_spinbutton_adj;
GtkWidget *jump_minute_spinbutton;
......@@ -1841,20 +1838,20 @@ create_intf_jump (void)
gtk_widget_show (hbox13);
gtk_container_add (GTK_CONTAINER (jump_frame), hbox13);
jump_seconde_label = gtk_label_new (_("s."));
gtk_widget_ref (jump_seconde_label);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_seconde_label", jump_seconde_label,
jump_second_label = gtk_label_new (_("s."));
gtk_widget_ref (jump_second_label);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_second_label", jump_second_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_seconde_label);
gtk_box_pack_end (GTK_BOX (hbox13), jump_seconde_label, FALSE, FALSE, 5);
gtk_widget_show (jump_second_label);
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_seconde_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (jump_seconde_spinbutton_adj), 1, 0);
gtk_widget_ref (jump_seconde_spinbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_seconde_spinbutton", jump_seconde_spinbutton,
jump_second_spinbutton_adj = gtk_adjustment_new (0, 0, 60, 1, 10, 10);
jump_second_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (jump_second_spinbutton_adj), 1, 0);
gtk_widget_ref (jump_second_spinbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_second_spinbutton", jump_second_spinbutton,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_seconde_spinbutton);
gtk_box_pack_end (GTK_BOX (hbox13), jump_seconde_spinbutton, FALSE, TRUE, 0);
gtk_widget_show (jump_second_spinbutton);
gtk_box_pack_end (GTK_BOX (hbox13), jump_second_spinbutton, FALSE, TRUE, 0);
jump_minute_label = gtk_label_new (_("m:"));
gtk_widget_ref (jump_minute_label);
......@@ -2136,6 +2133,12 @@ create_intf_playlist (void)
gtk_widget_show (playlist_cancel_button);
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_FUNC (GtkDiscOpenActivate),
"intf_playlist");
......
......@@ -2,7 +2,7 @@
* gtk_menu.c : functions to handle menu items.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -347,11 +347,14 @@ static gint GtkRadioMenu( intf_thread_t * p_intf,
/* link the new menu to the title menu item */
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 )
{
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_selected ),
TRUE );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
}
/* be sure that menu is sensitive, if there are several items */
......@@ -427,7 +430,6 @@ static gint GtkLanguageMenus( gpointer p_data,
gtk_widget_show( 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;
i_item = 0;
......@@ -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 */
gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu );
/* 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 )
{
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
TRUE );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
}
/* be sure that menu is sensitive if non empty */
......@@ -487,6 +491,7 @@ static gint GtkLanguageMenus( gpointer p_data,
return TRUE;
}
#if 1
/*****************************************************************************
* GtkTitleMenu: sets menus for titles and chapters selection
......@@ -708,10 +713,14 @@ static gint GtkTitleMenu( gpointer p_data,
/* link the new menu to the menubar item */
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 )
{
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
TRUE );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
}
#if 0
if( p_intf->p_input->stream.i_area_nb > 1 )
......@@ -724,6 +733,7 @@ static gint GtkTitleMenu( gpointer p_data,
return TRUE;
}
#endif
/*****************************************************************************
* GtkSetupMenu: function that generates title/chapter/audio/subpic
* menus with help from preceding functions
......@@ -736,7 +746,9 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
GtkWidget * p_popup_menu;
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_audio_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 )
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;
}
......@@ -2,7 +2,7 @@
* gtk_menu.h: prototypes for menu functions
*****************************************************************************
* 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>
* Stéphane Borel <stef@via.ecp.fr>
......@@ -21,18 +21,3 @@
* along with this program; if not, write to the Free Software
* 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 @@
* gtk_modules.c : functions to build modules configuration boxes.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -81,3 +81,10 @@ void GtkModulesCancel( GtkButton * button, gpointer user_data )
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 @@
* gtk_modules.h: prototypes for modules functions
*****************************************************************************
* 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>
* Stéphane Borel <stef@via.ecp.fr>
......@@ -22,8 +22,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
gboolean GtkModulesShow( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void GtkModulesCancel ( GtkButton * button, gpointer user_data );
gboolean GtkModulesShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkModulesCancel ( GtkButton * button, gpointer );
void GtkModulesActivate( GtkMenuItem * menuitem, gpointer );
......@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -61,32 +61,9 @@
*****************************************************************************
* The following callbacks are related to the file requester.
*****************************************************************************/
#if 0
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,
gboolean GtkFileOpenShow( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
......@@ -105,12 +82,11 @@ GtkFileOpenShow (GtkWidget *widget,
gtk_widget_show( p_intf->p_sys->p_fileopen );
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) ) );
}
......@@ -145,7 +121,6 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
}
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 )
*****************************************************************************
* The following callbacks are related to the disc manager.
*****************************************************************************/
#if 0
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,
gboolean GtkDiscOpenShow( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
......@@ -186,10 +144,10 @@ GtkDiscOpenShow (GtkWidget *widget,
gtk_widget_show( p_intf->p_sys->p_disc );
gdk_window_raise( p_intf->p_sys->p_disc->window );
return FALSE;
return TRUE;
}
#endif
void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
{
if( togglebutton->active )
......@@ -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 )
{
......@@ -276,45 +234,24 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data )
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 );
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) ) );
}
/*****************************************************************************
* Network stream callbacks
*****************************************************************************
* The following callbacks are related to the network stream manager.
*****************************************************************************/
#if 0
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,
gboolean GtkNetworkOpenShow( GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
gpointer user_data )
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
......@@ -328,13 +265,10 @@ GtkNetworkOpenShow (GtkWidget *widget,
gtk_widget_show( p_intf->p_sys->p_network );
gdk_window_raise( p_intf->p_sys->p_network->window );
return FALSE;
return TRUE;
}
#endif
void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
{
intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_network" );
......@@ -428,12 +362,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
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 );
p_main->p_playlist->b_stopped = 0;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
void GtkNetworkOpenCancel( GtkButton * button, gpointer user_data)
......@@ -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 @@
* gtk_open.h: prototypes for open functions
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -22,35 +22,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
gboolean
GtkFileOpenShow (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean GtkFileOpenShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkFileOpenCancel ( GtkButton *, gpointer );
void GtkFileOpenOk ( GtkButton *, gpointer );
void GtkFileOpenCancel( GtkButton * button, gpointer user_data);
void GtkFileOpenOk( GtkButton * button, gpointer user_data );
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 GtkDiscOpenShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkDiscOpenDvd ( GtkToggleButton *, gpointer );
void GtkDiscOpenVcd ( GtkToggleButton *, gpointer );
void GtkDiscOpenOk ( GtkButton *, gpointer );
void GtkDiscOpenCancel ( GtkButton *, gpointer );
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 @@
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -74,9 +74,22 @@ gboolean GtkPlaylistShow( GtkWidget *widget,
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();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
"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 ) )
......@@ -147,6 +160,12 @@ gboolean GtkPlaylistNext( GtkWidget *widget,
/****************************************************************************
* 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 )
{
GtkPlaylistNext( GTK_WIDGET( menuitem ), NULL, user_data );
......@@ -294,12 +313,7 @@ gboolean GtkPlaylistEvent( GtkWidget * widget,
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 );
p_main->p_playlist->b_stopped = 0;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
return TRUE;
}
......@@ -339,12 +353,7 @@ void GtkPlaylistDragData( GtkWidget *widget,
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 );
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,
/* unlock the interface */
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 )
playlist_t * p_playlist = p_main->p_playlist ;
GtkCList * p_clist;
if( GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
{
p_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT(
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 )
{
GdkColor color;
......@@ -681,6 +692,9 @@ void GtkPlayListManage( intf_thread_t * p_intf )
}
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 )
......
......@@ -2,7 +2,7 @@
* gtk_playlist.h : Playlist functions for the Gtk plugin.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -29,9 +29,10 @@ void GtkPlaylistInvert ( GtkMenuItem *, gpointer );
void GtkPlaylistSelect ( GtkMenuItem *, gpointer );
void GtkPlaylistOk ( GtkButton *, gpointer );
void GtkPlaylistCancel ( GtkButton *, gpointer );
void GtkPlaylistAddUrl ( GtkMenuItem *, gpointer );
int GtkHasValidExtension ( gchar * );
gint GtkCompareItems ( gconstpointer, gconstpointer );
int GtkHasValidExtension ( gchar * );
GList * GtkReadFiles ( gchar * );
gboolean GtkPlaylistShow ( GtkWidget *, GdkEventButton *, gpointer );
......@@ -44,3 +45,8 @@ void GtkPlaylistDragData ( GtkWidget *, GdkDragContext *,
gint, gint, GtkSelectionData *,
guint, guint, gpointer );
void GtkDeleteGListItem ( gpointer, gpointer );
void GtkPlaylistActivate ( GtkMenuItem *, gpointer );
void GtkNextActivate ( GtkMenuItem *, gpointer );
void GtkPrevActivate ( GtkMenuItem *, gpointer );
......@@ -2,7 +2,7 @@
* gtk_control.c : functions to handle stream control buttons.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -318,3 +318,11 @@ void GtkPreferencesCancel( GtkButton * button, gpointer user_data )
{
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 @@
* gtk_control.h: prototypes for control functions
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -25,4 +25,5 @@
gboolean GtkPreferencesShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkPreferencesOk ( GtkButton *, gpointer );
void GtkPreferencesApply ( GtkButton *, gpointer );
void GtkPreferencesCancel( GtkButton *, gpointer );
void GtkPreferencesCancel ( GtkButton *, gpointer );
void GtkPreferencesActivate( GtkMenuItem *, gpointer );
......@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -198,7 +198,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* Create some useful widgets that will certainly be used */
p_intf->p_sys->p_window = create_intf_window( );
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 */
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 )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
"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 );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
......@@ -316,14 +316,14 @@ static gint GtkManage( gpointer p_data )
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 */
if( p_intf->p_input->stream.b_changed )
{
GtkModeManage( p_intf );
}
GtkSetupMenu( p_intf );
/* Manage the slider */
if( p_intf->p_input->stream.b_seekable )
{
......@@ -347,13 +347,19 @@ static gint GtkManage( gpointer p_data )
{
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 );
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
/* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue;
}
#undef p_area
}
GtkSetupMenu( p_intf );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
}
else if( !p_intf->b_die )
{
......@@ -386,6 +392,7 @@ static gint GtkManage( gpointer p_data )
*****************************************************************************
* This function displays the current date related to the position in
* 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 )
{
......@@ -398,20 +405,19 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
#define p_area p_intf->p_input->stream.p_selected_area
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 ),
input_OffsetToTime( p_intf->p_input, psz_time,
( p_area->i_size * p_adj->value ) / 100 ) );
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
#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 )
{
......@@ -497,10 +503,26 @@ static gint GtkModeManage( intf_thread_t * p_intf )
}
else
{
/* default mode */
p_label = gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_window ),
"label_status" );
gtk_label_set_text( GTK_LABEL( p_label ), "" );
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 */
......
......@@ -942,7 +942,7 @@
<name>activate</name>
<handler>GtkPlayActivate</handler>
<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>
<label>_Play</label>
<right_justify>False</right_justify>
......@@ -956,7 +956,7 @@
<name>activate</name>
<handler>GtkPauseActivate</handler>
<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>
<label>Pause</label>
<right_justify>False</right_justify>
......@@ -970,7 +970,7 @@
<name>activate</name>
<handler>GtKStopActivate</handler>
<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>
<label>Stop</label>
<right_justify>False</right_justify>
......@@ -984,7 +984,7 @@
<name>activate</name>
<handler>GtkBackActivate</handler>
<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>
<label>Back</label>
<right_justify>False</right_justify>
......@@ -998,7 +998,7 @@
<name>activate</name>
<handler>GtkSlowActivate</handler>
<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>
<label>Slow</label>
<right_justify>False</right_justify>
......@@ -1012,7 +1012,7 @@
<name>activate</name>
<handler>GtkFastActivate</handler>
<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>
<label>Fast</label>
<right_justify>False</right_justify>
......@@ -1025,31 +1025,29 @@
</widget>
<widget>
<class>GtkCheckMenuItem</class>
<class>GtkMenuItem</class>
<name>popup_interface_toggle</name>
<signal>
<name>activate</name>
<handler>GtkWindowToggleActivate</handler>
<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>
<label>Toggle _Interface</label>
<active>True</active>
<always_show_toggle>True</always_show_toggle>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkCheckMenuItem</class>
<class>GtkMenuItem</class>
<name>popup_fullscreen</name>
<signal>
<name>activate</name>
<handler>GtkFullscreenActivate</handler>
<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>
<label>_Fullscreen</label>
<active>False</active>
<always_show_toggle>True</always_show_toggle>
<right_justify>False</right_justify>
</widget>
<widget>
......@@ -1065,7 +1063,7 @@
<name>activate</name>
<handler>GtkNextActivate</handler>
<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>
<label>Next</label>
<right_justify>False</right_justify>
......@@ -1078,7 +1076,7 @@
<name>activate</name>
<handler>GtkPrevActivate</handler>
<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>
<label>Prev</label>
<right_justify>False</right_justify>
......@@ -1091,7 +1089,7 @@
<name>activate</name>
<handler>GtkJumpActivate</handler>
<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>
<label>_Jump...</label>
<right_justify>False</right_justify>
......@@ -1209,7 +1207,7 @@
<name>activate</name>
<handler>GtkPlaylistActivate</handler>
<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>
<label>Playlist...</label>
<right_justify>False</right_justify>
......@@ -1222,7 +1220,7 @@
<name>activate</name>
<handler>GtkPreferencesActivate</handler>
<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>
<label>_Preferences...</label>
<right_justify>False</right_justify>
......@@ -1241,7 +1239,7 @@
<name>activate</name>
<handler>GtkExitActivate</handler>
<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>
<label>E_xit</label>
<right_justify>False</right_justify>
......@@ -2298,7 +2296,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
<widget>
<class>GtkLabel</class>
<name>jump_seconde_label</name>
<name>jump_second_label</name>
<label>s.</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
......@@ -2316,7 +2314,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
<widget>
<class>GtkSpinButton</class>
<name>jump_seconde_spinbutton</name>
<name>jump_second_spinbutton</name>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>0</digits>
......@@ -2429,6 +2427,16 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;</label>
<widget>
<class>GtkDialog</class>
<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>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
......
......@@ -4,7 +4,7 @@
* interface, such as command line.
*****************************************************************************
* 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>
*
......@@ -154,6 +154,8 @@ static void intf_Manage( intf_thread_t *p_intf )
/* If no stream is being played, try to find one */
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 )
{
/* Select the next playlist item */
......@@ -167,6 +169,9 @@ static void intf_Manage( intf_thread_t *p_intf )
else
{
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 =
input_CreateThread( &p_main->p_playlist->current, NULL );
}
......@@ -186,6 +191,8 @@ static void intf_Manage( intf_thread_t *p_intf )
p_vout_bank->i_count--;
}
}
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
......
......@@ -2,7 +2,7 @@
* intf_playlist.c : Playlist management functions
*****************************************************************************
* 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>
*
......@@ -248,8 +248,6 @@ void intf_PlaylistDestroy( playlist_t * p_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)
{
......@@ -269,6 +267,7 @@ void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
= strdup( p_playlist->current.psz_name );
}
p_main->p_playlist->b_stopped = 0;
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