Commit 9530fc9f authored by Stéphane Borel's avatar Stéphane Borel

*initialization bugfixes in input_dvd

*added a b_stopped flag to interface playlist to have a stop function in
interface plugins. As a consequence, the playlist no longer loops on end
but wait for the user to press 'play' or to add another item (gtk/gnome
interface). I think that other plugins are broken but it shouldn't be
difficult to repair: just add a 'p_main->p_playlist->b_stopped = 0' in
play functions and 'p_main->p_playlist->b_stopped = 1' when you have to
stop.

*Updated gtk interface so that it has the same features as gnome. I
think I will merge the code so that we don't have to copy and paste each
change. Only the .glade file would be different.
parent db7b0421
......@@ -2,7 +2,7 @@
* intf_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.h,v 1.2 2001/03/21 13:42:33 sam Exp $
* $Id: intf_playlist.h,v 1.3 2001/05/15 01:01:44 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -45,6 +45,7 @@ typedef struct playlist_s
int i_mode; /* parse mode (random, forward, backward) */
int i_seed; /* seed used for random mode */
boolean_t b_stopped;
vlc_mutex_t change_lock;
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.57 2001/05/07 04:42:42 sam Exp $
* $Id: input_dvd.c,v 1.58 2001/05/15 01:01:44 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -562,6 +562,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
vlc_mutex_lock( &p_input->stream.stream_lock );
/* we can't use the interface slider until initilization is complete */
p_input->stream.b_seekable = 0;
if( p_area != p_input->stream.p_selected_area )
{
......@@ -581,7 +584,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
/* uodate title environnement variable so that we don't
* loop on the same title forever */
main_PutIntVariable( INPUT_TITLE_VAR, p_dvd->i_title + 1 );
// main_PutIntVariable( INPUT_TITLE_VAR, p_dvd->i_title + 1 );
/* ifo vts */
if( IfoTitleSet( p_dvd->p_ifo ) < 0 )
......@@ -947,7 +950,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
}
/* warn interface that something has changed */
p_input->stream.b_seekable = 1;
p_input->stream.b_changed = 1;
intf_WarnMsg( 3, "Pos: %lld Size: %lld", p_input->stream.p_selected_area->i_tell,p_input->stream.p_selected_area->i_size );
vlc_mutex_unlock( &p_input->stream.stream_lock );
......@@ -1153,6 +1158,7 @@ static int DVDRead( input_thread_t * p_input,
if( b_eot )
{
intf_WarnMsg( 3, "dvd info: new title" );
p_dvd->i_title++;
DVDSetArea( p_input, p_area );
return 0;
......
......@@ -2,7 +2,7 @@
* gnome_callbacks.c : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gnome_callbacks.c,v 1.28 2001/05/10 06:47:31 sam Exp $
* $Id: gnome_callbacks.c,v 1.29 2001/05/15 01:01:44 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -113,47 +113,6 @@ on_intf_window_drag_data_received (GtkWidget *widget,
guint time,
gpointer user_data)
{
#if 0
char *psz_text = data->data;
int i_len = strlen( psz_text );
switch( info )
{
case DROP_ACCEPT_TEXT_PLAIN: /* FIXME: handle multiple files */
if( i_len < 1 )
{
return;
}
/* get rid of ' ' at the end */
*( psz_text + i_len - 1 ) = 0;
intf_WarnMsg( 3, "intf: dropped text/uri-list data `%s'", psz_text );
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
break;
case DROP_ACCEPT_TEXT_URI_LIST: /* FIXME: handle multiple files */
if( i_len < 2 )
{
return;
}
/* get rid of \r\n at the end */
*( psz_text + i_len - 2 ) = 0;
intf_WarnMsg( 3, "intf: dropped text/uri-list data `%s'", psz_text );
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
break;
default:
intf_ErrMsg( "intf error: unknown dropped type");
break;
}
#else
intf_thread_t * p_intf = GetIntf( GTK_WIDGET( widget ), "intf_window" );
int i_end = p_main->p_playlist->i_size;
......@@ -166,8 +125,7 @@ on_intf_window_drag_data_received (GtkWidget *widget,
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
#endif
p_main->p_playlist->b_stopped = 0;
}
......@@ -741,10 +699,10 @@ on_toolbar_stop_clicked (GtkButton *button,
if( p_intf->p_input != NULL )
{
p_vout_bank->pp_vout[0]->b_die = 1;
p_aout_bank->pp_aout[0]->b_die = 1;
p_intf->p_input->b_die = 1;
p_intf->p_input->b_eof = 1;
p_main->p_playlist->i_index--;
}
p_main->p_playlist->b_stopped = 1;
}
......@@ -758,6 +716,20 @@ on_toolbar_play_clicked (GtkButton *button,
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
}
else if( p_main->p_playlist->b_stopped )
{
if( p_main->p_playlist->i_size )
{
intf_PlaylistJumpto( p_main->p_playlist,
p_main->p_playlist->i_index );
p_main->p_playlist->b_stopped = 0;
}
else
{
on_toolbar_open_clicked( button, user_data );
}
}
}
......@@ -879,6 +851,7 @@ on_popup_play_activate (GtkMenuItem *menuitem,
if( p_intf->p_input != NULL )
{
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
p_main->p_playlist->b_stopped = 0;
}
}
......@@ -1210,6 +1183,7 @@ on_fileopen_ok_clicked (GtkButton *button,
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
}
......@@ -1356,6 +1330,7 @@ on_disc_ok_clicked (GtkButton *button,
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
}
......@@ -1468,6 +1443,7 @@ on_network_ok_clicked (GtkButton *button,
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
}
......@@ -1545,6 +1521,7 @@ on_jump_apply_clicked (GtkButton *button,
{
input_Seek( p_intf->p_input, i_seek );
}
p_main->p_playlist->b_stopped = 0;
#endif
}
......@@ -1687,4 +1664,3 @@ on_preferences_cancel_clicked (GtkButton *button,
{
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
......@@ -2,7 +2,7 @@
* gnome_callbacks.h : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gnome_callbacks.h,v 1.16 2001/05/06 18:32:30 stef Exp $
* $Id: gnome_callbacks.h,v 1.17 2001/05/15 01:01:44 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -426,3 +426,7 @@ on_playlist_cancel_clicked (GtkButton *button,
void
on_popup_back_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_destroy (GtkObject *object,
gpointer user_data);
......@@ -500,7 +500,6 @@ create_intf_window (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (slider);
gtk_container_add (GTK_CONTAINER (slider_frame), slider);
gtk_widget_set_usize (slider, 500, 15);
gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
gtk_scale_set_digits (GTK_SCALE (slider), 3);
......@@ -510,7 +509,6 @@ create_intf_window (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (file_box);
gtk_box_pack_start (GTK_BOX (vbox8), file_box, TRUE, TRUE, 0);
gtk_widget_set_usize (file_box, 500, 24);
label_status = gtk_label_new ("");
gtk_widget_ref (label_status);
......@@ -524,7 +522,6 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "dvd_box", dvd_box,
(GtkDestroyNotify) gtk_widget_unref);
gtk_box_pack_start (GTK_BOX (vbox8), dvd_box, TRUE, TRUE, 0);
gtk_widget_set_usize (dvd_box, 500, 24);
label21 = gtk_label_new (_("DVD "));
gtk_widget_ref (label21);
......@@ -622,7 +619,6 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "network_box", network_box,
(GtkDestroyNotify) gtk_widget_unref);
gtk_box_pack_start (GTK_BOX (vbox8), network_box, FALSE, FALSE, 0);
gtk_widget_set_usize (network_box, 500, 24);
network_address_label = gtk_label_new (_("No server"));
gtk_widget_ref (network_address_label);
......@@ -810,7 +806,7 @@ static GnomeUIInfo intf_popup_uiinfo[] =
},
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM, N_("_Jump"),
GNOME_APP_UI_ITEM, N_("_Jump..."),
N_("Got directly so specified point"),
(gpointer) on_popup_jump_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_JUMP_TO,
......@@ -988,7 +984,6 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_preferences",
intf_popup_uiinfo[17].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (intf_popup_uiinfo[17].widget, FALSE);
gtk_widget_ref (intf_popup_uiinfo[18].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
......@@ -1699,6 +1694,7 @@ create_intf_playlist (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_frame);
gtk_container_add (GTK_CONTAINER (playlist_viewport), playlist_frame);
gtk_container_set_border_width (GTK_CONTAINER (playlist_frame), 4);
gtk_frame_set_label_align (GTK_FRAME (playlist_frame), 0.05, 0.5);
playlist_clist = gtk_clist_new (2);
......@@ -1817,6 +1813,9 @@ create_intf_playlist (void)
gtk_widget_show (playlist_cancel);
GTK_WIDGET_SET_FLAGS (playlist_cancel, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (intf_playlist), "destroy",
GTK_SIGNAL_FUNC (on_playlist_destroy),
NULL);
gtk_signal_connect (GTK_OBJECT (playlist_clist), "event",
GTK_SIGNAL_FUNC (on_playlist_clist_event),
NULL);
......@@ -1870,6 +1869,7 @@ create_intf_jump (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_frame);
gtk_box_pack_start (GTK_BOX (jump_vbox), jump_frame, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (jump_frame), 5);
gtk_frame_set_label_align (GTK_FRAME (jump_frame), 0.05, 0.5);
jump_box = gtk_hbox_new (FALSE, 0);
......@@ -1878,6 +1878,7 @@ create_intf_jump (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_box);
gtk_container_add (GTK_CONTAINER (jump_frame), jump_box);
gtk_container_set_border_width (GTK_CONTAINER (jump_box), 5);
jump_label3 = gtk_label_new (_("s."));
gtk_widget_ref (jump_label3);
......@@ -2045,17 +2046,17 @@ create_intf_preferences (void)
GtkWidget *preferences_playlist_enqueue_as_default_checkbutton;
GtkWidget *preferences_playlist;
GtkWidget *preferences_misc_table;
GtkWidget *preferences_misc_associated_files_frame;
GtkWidget *preferences_misc_associated_table;
GtkWidget *preferences_misc_ts_checkbutton;
GtkWidget *preferences_misc_vob_checkbutton;
GtkWidget *preferences_misc_mp2_checkbutton;
GtkWidget *preferences_misc_mpeg_checkbutton;
GtkWidget *preferences_misc_message_frame;
GtkWidget *preferences_misc_message_table;
GtkWidget *preferences_misc_messages_label;
GtkObject *preferences_misc_messages_spinbutton_adj;
GtkWidget *preferences_misc_messages_spinbutton;
GtkWidget *preferences_misc_associated_files_frame;
GtkWidget *preferences_misc_associated_table;
GtkWidget *preferences_misc_mpeg_checkbutton;
GtkWidget *preferences_misc_mp2_checkbutton;
GtkWidget *preferences_misc_vob_checkbutton;
GtkWidget *preferences_misc_ts_checkbutton;
GtkWidget *preferences_misc;
GtkWidget *preferences_dialog;
GtkWidget *preferences_ok;
......@@ -2070,6 +2071,7 @@ create_intf_preferences (void)
preferences_vbox = GNOME_DIALOG (intf_preferences)->vbox;
gtk_object_set_data (GTK_OBJECT (intf_preferences), "preferences_vbox", preferences_vbox);
gtk_widget_show (preferences_vbox);
gtk_container_set_border_width (GTK_CONTAINER (preferences_vbox), 5);
preferences_frame = gtk_frame_new (_("Preferences"));
gtk_widget_ref (preferences_frame);
......@@ -2092,6 +2094,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_file_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_file_table);
gtk_container_set_border_width (GTK_CONTAINER (preferences_file_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preferences_file_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preferences_file_table), 5);
preferences_file_combo = gnome_file_entry_new (NULL, NULL);
gtk_widget_ref (preferences_file_combo);
......@@ -2131,6 +2136,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_disc_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_disc_table);
gtk_container_set_border_width (GTK_CONTAINER (preferences_disc_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preferences_disc_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preferences_disc_table), 5);
preferences_disc_dvd_combo = gnome_file_entry_new (NULL, NULL);
gtk_widget_ref (preferences_disc_dvd_combo);
......@@ -2195,6 +2203,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_network_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_network_table);
gtk_container_set_border_width (GTK_CONTAINER (preferences_network_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preferences_network_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preferences_network_table), 5);
preferences_network_server_label = gtk_label_new (_("Default server: "));
gtk_widget_ref (preferences_network_server_label);
......@@ -2329,6 +2340,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_network_interface_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_network_interface_table);
gtk_container_set_border_width (GTK_CONTAINER (preferences_network_interface_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preferences_network_interface_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preferences_network_interface_table), 5);
preferences_interface_label = gtk_label_new (_("Default interface: "));
gtk_widget_ref (preferences_interface_label);
......@@ -2368,6 +2382,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_video_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_video_table);
gtk_container_set_border_width (GTK_CONTAINER (preferences_video_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preferences_video_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preferences_video_table), 5);
preferences_video_output_label = gtk_label_new (_("Default output: "));
gtk_widget_ref (preferences_video_output_label);
......@@ -2547,6 +2564,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preference_audio_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preference_audio_table);
gtk_container_set_border_width (GTK_CONTAINER (preference_audio_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preference_audio_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preference_audio_table), 5);
preferences_audio_spdif_checkbutton = gtk_check_button_new_with_label (_("Spdif output"));
gtk_widget_ref (preferences_audio_spdif_checkbutton);
......@@ -2708,6 +2728,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preference_playlist_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preference_playlist_table);
gtk_container_set_border_width (GTK_CONTAINER (preference_playlist_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preference_playlist_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preference_playlist_table), 5);
preferences_playlist_launch_on_startup_checkbutton = gtk_check_button_new_with_label (_("Launch on startup"));
gtk_widget_ref (preferences_playlist_launch_on_startup_checkbutton);
......@@ -2749,42 +2772,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_misc_table);
preferences_misc_message_frame = gtk_frame_new (_("Messages"));
gtk_widget_ref (preferences_misc_message_frame);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_message_frame", preferences_misc_message_frame,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_message_frame);
gtk_table_attach (GTK_TABLE (preferences_misc_table), preferences_misc_message_frame, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_frame_set_label_align (GTK_FRAME (preferences_misc_message_frame), 0.05, 0.5);
preferences_misc_message_table = gtk_table_new (1, 2, FALSE);
gtk_widget_ref (preferences_misc_message_table);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_message_table", preferences_misc_message_table,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_message_table);
gtk_container_add (GTK_CONTAINER (preferences_misc_message_frame), preferences_misc_message_table);
preferences_misc_messages_label = gtk_label_new (_("Warning level: "));
gtk_widget_ref (preferences_misc_messages_label);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_messages_label", preferences_misc_messages_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_messages_label);
gtk_table_attach (GTK_TABLE (preferences_misc_message_table), preferences_misc_messages_label, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
preferences_misc_messages_spinbutton_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
preferences_misc_messages_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (preferences_misc_messages_spinbutton_adj), 1, 0);
gtk_widget_ref (preferences_misc_messages_spinbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_messages_spinbutton", preferences_misc_messages_spinbutton,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_messages_spinbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_message_table), preferences_misc_messages_spinbutton, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (preferences_misc_table), 5);
gtk_table_set_row_spacings (GTK_TABLE (preferences_misc_table), 5);
gtk_table_set_col_spacings (GTK_TABLE (preferences_misc_table), 5);
preferences_misc_associated_files_frame = gtk_frame_new (_("Files associated with vlc"));
gtk_widget_ref (preferences_misc_associated_files_frame);
......@@ -2793,7 +2783,7 @@ create_intf_preferences (void)
gtk_widget_show (preferences_misc_associated_files_frame);
gtk_table_attach (GTK_TABLE (preferences_misc_table), preferences_misc_associated_files_frame, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_EXPAND),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_widget_set_sensitive (preferences_misc_associated_files_frame, FALSE);
gtk_frame_set_label_align (GTK_FRAME (preferences_misc_associated_files_frame), 0.05, 0.5);
......@@ -2804,12 +2794,21 @@ create_intf_preferences (void)
gtk_widget_show (preferences_misc_associated_table);
gtk_container_add (GTK_CONTAINER (preferences_misc_associated_files_frame), preferences_misc_associated_table);
preferences_misc_mpeg_checkbutton = gtk_check_button_new_with_label (_("mpeg"));
gtk_widget_ref (preferences_misc_mpeg_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_mpeg_checkbutton", preferences_misc_mpeg_checkbutton,
preferences_misc_ts_checkbutton = gtk_check_button_new_with_label (_("ts"));
gtk_widget_ref (preferences_misc_ts_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_ts_checkbutton", preferences_misc_ts_checkbutton,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_mpeg_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_mpeg_checkbutton, 0, 1, 0, 1,
gtk_widget_show (preferences_misc_ts_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_ts_checkbutton, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
preferences_misc_vob_checkbutton = gtk_check_button_new_with_label (_("vob"));
gtk_widget_ref (preferences_misc_vob_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_vob_checkbutton", preferences_misc_vob_checkbutton,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_vob_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_vob_checkbutton, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
......@@ -2822,24 +2821,51 @@ create_intf_preferences (void)
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
preferences_misc_vob_checkbutton = gtk_check_button_new_with_label (_("vob"));
gtk_widget_ref (preferences_misc_vob_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_vob_checkbutton", preferences_misc_vob_checkbutton,
preferences_misc_mpeg_checkbutton = gtk_check_button_new_with_label (_("mpeg"));
gtk_widget_ref (preferences_misc_mpeg_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_mpeg_checkbutton", preferences_misc_mpeg_checkbutton,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_vob_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_vob_checkbutton, 0, 1, 2, 3,
gtk_widget_show (preferences_misc_mpeg_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_mpeg_checkbutton, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
preferences_misc_ts_checkbutton = gtk_check_button_new_with_label (_("ts"));
gtk_widget_ref (preferences_misc_ts_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_ts_checkbutton", preferences_misc_ts_checkbutton,
preferences_misc_message_frame = gtk_frame_new (_("Messages"));
gtk_widget_ref (preferences_misc_message_frame);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_message_frame", preferences_misc_message_frame,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_ts_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_ts_checkbutton, 0, 1, 3, 4,
gtk_widget_show (preferences_misc_message_frame);
gtk_table_attach (GTK_TABLE (preferences_misc_table), preferences_misc_message_frame, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_frame_set_label_align (GTK_FRAME (preferences_misc_message_frame), 0.05, 0.5);
preferences_misc_message_table = gtk_table_new (1, 2, FALSE);
gtk_widget_ref (preferences_misc_message_table);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_message_table", preferences_misc_message_table,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_message_table);
gtk_container_add (GTK_CONTAINER (preferences_misc_message_frame), preferences_misc_message_table);
preferences_misc_messages_label = gtk_label_new (_("Warning level: "));
gtk_widget_ref (preferences_misc_messages_label);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_messages_label", preferences_misc_messages_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_messages_label);
gtk_table_attach (GTK_TABLE (preferences_misc_message_table), preferences_misc_messages_label, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
preferences_misc_messages_spinbutton_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
preferences_misc_messages_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (preferences_misc_messages_spinbutton_adj), 1, 0);
gtk_widget_ref (preferences_misc_messages_spinbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_messages_spinbutton", preferences_misc_messages_spinbutton,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_messages_spinbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_message_table), preferences_misc_messages_spinbutton, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
preferences_misc = gtk_label_new (_("Misc"));
gtk_widget_ref (preferences_misc);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc", preferences_misc,
......
......@@ -2,7 +2,7 @@
* gnome_playlist.c : Interface for the playlist dialog
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: gnome_playlist.c,v 1.2 2001/05/07 03:14:09 stef Exp $
* $Id: gnome_playlist.c,v 1.3 2001/05/15 01:01:44 stef Exp $
*
* Authors: Pierre Baillet <oct@zoy.org>
*
......@@ -68,7 +68,7 @@
* The following callbacks are related to the playlist.
*****************************************************************************/
void
on_intf_playlist_destroy (GtkObject *object,
on_playlist_destroy (GtkObject *object,
gpointer user_data)
{
gtk_widget_hide( GTK_WIDGET(object));
......@@ -314,6 +314,7 @@ on_playlist_clist_event (GtkWidget *widget,
p_intf->p_input->b_eof = 1;
}
intf_PlaylistJumpto( p_main->p_playlist, i_row - 1 );
p_main->p_playlist->b_stopped = 0;
}
return TRUE;
}
......@@ -337,6 +338,7 @@ on_playlist_clist_drag_data_received (GtkWidget *widget,
GtkCList * p_clist;
gint i_row;
gint i_col;
int i_end = p_main->p_playlist->i_size;
p_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_playlist ), "playlist_clist" ) );
......@@ -351,6 +353,10 @@ on_playlist_clist_drag_data_received (GtkWidget *widget,
/* else, put that at the end of the playlist */
GnomeDropDataReceived( p_intf, data, info, PLAYLIST_END );
}
intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
p_main->p_playlist->b_stopped = 0;
}
......@@ -506,6 +512,8 @@ void GnomeDropDataReceived( intf_thread_t * p_intf,
/* unlock the interface */
vlc_mutex_unlock( &p_intf->change_lock );
p_main->p_playlist->b_stopped = 0;
}
}
......
......@@ -2,7 +2,7 @@
* intf_gnome.c: Gnome interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gnome.c,v 1.38 2001/05/10 06:47:31 sam Exp $
* $Id: intf_gnome.c,v 1.39 2001/05/15 01:01:44 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -439,7 +439,7 @@ static gint GnomeRadioMenu( intf_thread_t * p_intf,
}
snprintf( psz_name, GNOME_MENU_LABEL_SIZE,
"Chapters %d to %d", i_item + 1, i_item + 10);
"%ss %d to %d", psz_item_name, i_item + 1, i_item + 10);
psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0';
p_item_group = gtk_menu_item_new_with_label( psz_name );
gtk_widget_show( p_item_group );
......@@ -1121,14 +1121,14 @@ static gint GnomeModeManage( intf_thread_t * p_intf )
/* control buttons for free pace streams */
b_control = p_intf->p_input->stream.b_pace_control;
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_back"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_stop"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_play"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_stop"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_play"), TRUE );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_pause"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_slow"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_fast"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_back"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_stop"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_play"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_play"), TRUE );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_pause"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_slow"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_fast"), b_control );
......
......@@ -73,8 +73,6 @@
<class>GtkMenuBar</class>
<name>menubar</name>
<border_width>2</border_width>
<width>500</width>
<height>32</height>
<shadow_type>GTK_SHADOW_NONE</shadow_type>
<widget>
......@@ -546,8 +544,6 @@
<widget>
<class>GtkHScale</class>
<name>slider</name>
<width>500</width>
<height>15</height>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
......@@ -576,8 +572,6 @@
<widget>
<class>GtkHBox</class>
<name>file_box</name>
<width>500</width>
<height>24</height>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
......@@ -607,8 +601,6 @@
<widget>
<class>GtkHBox</class>
<name>dvd_box</name>
<width>500</width>
<height>24</height>
<visible>False</visible>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
......@@ -816,8 +808,6 @@
<widget>
<class>GtkHBox</class>
<name>network_box</name>
<width>500</width>
<height>24</height>
<visible>False</visible>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
......@@ -1034,7 +1024,7 @@
<handler>on_popup_jump_activate</handler>
<last_modification_time>Tue, 01 May 2001 22:22:49 GMT</last_modification_time>
</signal>
<label>_Jump</label>
<label>_Jump...</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_JUMP_TO</stock_icon>
</widget>
......@@ -1168,7 +1158,6 @@
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_preferences</name>
<sensitive>False</sensitive>
<signal>
<name>activate</name>
<handler>on_popup_preferences_activate</handler>
......@@ -2058,6 +2047,11 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
<widget>
<class>GnomeDialog</class>
<name>intf_playlist</name>
<signal>
<name>destroy</name>
<handler>on_playlist_destroy</handler>
<last_modification_time>Tue, 08 May 2001 23:21:39 GMT</last_modification_time>
</signal>
<title>Playlist</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
......@@ -2147,6 +2141,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
<widget>
<class>GtkFrame</class>
<name>playlist_frame</name>
<border_width>4</border_width>
<label>Playlist</label>
<label_xalign>0.05</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
......@@ -2382,7 +2377,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
<homogeneous>False</homogeneous>
<spacing>8</spacing>
<child>
<padding>4</padding>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
......@@ -2434,6 +2429,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
<widget>
<class>GtkFrame</class>
<name>jump_frame</name>
<border_width>5</border_width>
<label>Jump to: </label>
<label_xalign>0.05</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
......@@ -2446,6 +2442,7 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
<widget>
<class>GtkHBox</class>