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 @@ ...@@ -2,7 +2,7 @@
* intf_playlist.h : Playlist functions * intf_playlist.h : Playlist functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -45,6 +45,7 @@ typedef struct playlist_s ...@@ -45,6 +45,7 @@ typedef struct playlist_s
int i_mode; /* parse mode (random, forward, backward) */ int i_mode; /* parse mode (random, forward, backward) */
int i_seed; /* seed used for random mode */ int i_seed; /* seed used for random mode */
boolean_t b_stopped;
vlc_mutex_t change_lock; vlc_mutex_t change_lock;
......
...@@ -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.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> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -562,6 +562,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -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 ); 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 ) 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 ) ...@@ -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 /* uodate title environnement variable so that we don't
* loop on the same title forever */ * 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 */ /* ifo vts */
if( IfoTitleSet( p_dvd->p_ifo ) < 0 ) if( IfoTitleSet( p_dvd->p_ifo ) < 0 )
...@@ -947,7 +950,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -947,7 +950,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
} }
/* warn interface that something has changed */ /* warn interface that something has changed */
p_input->stream.b_seekable = 1;
p_input->stream.b_changed = 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 ); vlc_mutex_unlock( &p_input->stream.stream_lock );
...@@ -1153,6 +1158,7 @@ static int DVDRead( input_thread_t * p_input, ...@@ -1153,6 +1158,7 @@ static int DVDRead( input_thread_t * p_input,
if( b_eot ) if( b_eot )
{ {
intf_WarnMsg( 3, "dvd info: new title" );
p_dvd->i_title++; p_dvd->i_title++;
DVDSetArea( p_input, p_area ); DVDSetArea( p_input, p_area );
return 0; return 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome_callbacks.c : Callbacks for the Gnome plugin. * gnome_callbacks.c : Callbacks for the Gnome plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -113,47 +113,6 @@ on_intf_window_drag_data_received (GtkWidget *widget, ...@@ -113,47 +113,6 @@ on_intf_window_drag_data_received (GtkWidget *widget,
guint time, guint time,
gpointer user_data) 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" ); intf_thread_t * p_intf = GetIntf( GTK_WIDGET( widget ), "intf_window" );
int i_end = p_main->p_playlist->i_size; int i_end = p_main->p_playlist->i_size;
...@@ -166,8 +125,7 @@ on_intf_window_drag_data_received (GtkWidget *widget, ...@@ -166,8 +125,7 @@ on_intf_window_drag_data_received (GtkWidget *widget,
} }
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;
#endif
} }
...@@ -741,10 +699,10 @@ on_toolbar_stop_clicked (GtkButton *button, ...@@ -741,10 +699,10 @@ on_toolbar_stop_clicked (GtkButton *button,
if( p_intf->p_input != NULL ) if( p_intf->p_input != NULL )
{ {
p_vout_bank->pp_vout[0]->b_die = 1; p_intf->p_input->b_eof = 1;
p_aout_bank->pp_aout[0]->b_die = 1; p_main->p_playlist->i_index--;
p_intf->p_input->b_die = 1;
} }
p_main->p_playlist->b_stopped = 1;
} }
...@@ -758,6 +716,20 @@ on_toolbar_play_clicked (GtkButton *button, ...@@ -758,6 +716,20 @@ on_toolbar_play_clicked (GtkButton *button,
{ {
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY ); 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, ...@@ -879,6 +851,7 @@ on_popup_play_activate (GtkMenuItem *menuitem,
if( p_intf->p_input != NULL ) if( p_intf->p_input != NULL )
{ {
input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY ); 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, ...@@ -1210,6 +1183,7 @@ on_fileopen_ok_clicked (GtkButton *button,
} }
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;
} }
...@@ -1356,6 +1330,7 @@ on_disc_ok_clicked (GtkButton *button, ...@@ -1356,6 +1330,7 @@ on_disc_ok_clicked (GtkButton *button,
} }
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;
} }
...@@ -1468,6 +1443,7 @@ on_network_ok_clicked (GtkButton *button, ...@@ -1468,6 +1443,7 @@ on_network_ok_clicked (GtkButton *button,
} }
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;
} }
...@@ -1545,6 +1521,7 @@ on_jump_apply_clicked (GtkButton *button, ...@@ -1545,6 +1521,7 @@ on_jump_apply_clicked (GtkButton *button,
{ {
input_Seek( p_intf->p_input, i_seek ); input_Seek( p_intf->p_input, i_seek );
} }
p_main->p_playlist->b_stopped = 0;
#endif #endif
} }
...@@ -1687,4 +1664,3 @@ on_preferences_cancel_clicked (GtkButton *button, ...@@ -1687,4 +1664,3 @@ on_preferences_cancel_clicked (GtkButton *button,
{ {
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) ); gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome_callbacks.h : Callbacks for the Gnome plugin. * gnome_callbacks.h : Callbacks for the Gnome plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -426,3 +426,7 @@ on_playlist_cancel_clicked (GtkButton *button, ...@@ -426,3 +426,7 @@ on_playlist_cancel_clicked (GtkButton *button,
void void
on_popup_back_activate (GtkMenuItem *menuitem, on_popup_back_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
on_playlist_destroy (GtkObject *object,
gpointer user_data);
...@@ -500,7 +500,6 @@ create_intf_window (void) ...@@ -500,7 +500,6 @@ create_intf_window (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (slider); gtk_widget_show (slider);
gtk_container_add (GTK_CONTAINER (slider_frame), 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_draw_value (GTK_SCALE (slider), FALSE);
gtk_scale_set_digits (GTK_SCALE (slider), 3); gtk_scale_set_digits (GTK_SCALE (slider), 3);
...@@ -510,7 +509,6 @@ create_intf_window (void) ...@@ -510,7 +509,6 @@ create_intf_window (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (file_box); gtk_widget_show (file_box);
gtk_box_pack_start (GTK_BOX (vbox8), file_box, TRUE, TRUE, 0); 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 (""); label_status = gtk_label_new ("");
gtk_widget_ref (label_status); gtk_widget_ref (label_status);
...@@ -524,7 +522,6 @@ create_intf_window (void) ...@@ -524,7 +522,6 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "dvd_box", dvd_box, gtk_object_set_data_full (GTK_OBJECT (intf_window), "dvd_box", dvd_box,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_box_pack_start (GTK_BOX (vbox8), dvd_box, TRUE, TRUE, 0); 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 ")); label21 = gtk_label_new (_("DVD "));
gtk_widget_ref (label21); gtk_widget_ref (label21);
...@@ -622,7 +619,6 @@ create_intf_window (void) ...@@ -622,7 +619,6 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "network_box", network_box, gtk_object_set_data_full (GTK_OBJECT (intf_window), "network_box", network_box,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_box_pack_start (GTK_BOX (vbox8), network_box, FALSE, FALSE, 0); 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")); network_address_label = gtk_label_new (_("No server"));
gtk_widget_ref (network_address_label); gtk_widget_ref (network_address_label);
...@@ -810,7 +806,7 @@ static GnomeUIInfo intf_popup_uiinfo[] = ...@@ -810,7 +806,7 @@ static GnomeUIInfo intf_popup_uiinfo[] =
}, },
GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_SEPARATOR,
{ {
GNOME_APP_UI_ITEM, N_("_Jump"), GNOME_APP_UI_ITEM, N_("_Jump..."),
N_("Got directly so specified point"), N_("Got directly so specified point"),
(gpointer) on_popup_jump_activate, NULL, NULL, (gpointer) on_popup_jump_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_JUMP_TO, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_JUMP_TO,
...@@ -988,7 +984,6 @@ create_intf_popup (void) ...@@ -988,7 +984,6 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_preferences", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_preferences",
intf_popup_uiinfo[17].widget, intf_popup_uiinfo[17].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (intf_popup_uiinfo[17].widget, FALSE);
gtk_widget_ref (intf_popup_uiinfo[18].widget); gtk_widget_ref (intf_popup_uiinfo[18].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
...@@ -1699,6 +1694,7 @@ create_intf_playlist (void) ...@@ -1699,6 +1694,7 @@ create_intf_playlist (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_frame); gtk_widget_show (playlist_frame);
gtk_container_add (GTK_CONTAINER (playlist_viewport), 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); gtk_frame_set_label_align (GTK_FRAME (playlist_frame), 0.05, 0.5);
playlist_clist = gtk_clist_new (2); playlist_clist = gtk_clist_new (2);
...@@ -1817,6 +1813,9 @@ create_intf_playlist (void) ...@@ -1817,6 +1813,9 @@ create_intf_playlist (void)
gtk_widget_show (playlist_cancel); gtk_widget_show (playlist_cancel);
GTK_WIDGET_SET_FLAGS (playlist_cancel, GTK_CAN_DEFAULT); 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_connect (GTK_OBJECT (playlist_clist), "event",
GTK_SIGNAL_FUNC (on_playlist_clist_event), GTK_SIGNAL_FUNC (on_playlist_clist_event),
NULL); NULL);
...@@ -1870,6 +1869,7 @@ create_intf_jump (void) ...@@ -1870,6 +1869,7 @@ create_intf_jump (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_frame); gtk_widget_show (jump_frame);
gtk_box_pack_start (GTK_BOX (jump_vbox), jump_frame, FALSE, FALSE, 0); 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); gtk_frame_set_label_align (GTK_FRAME (jump_frame), 0.05, 0.5);
jump_box = gtk_hbox_new (FALSE, 0); jump_box = gtk_hbox_new (FALSE, 0);
...@@ -1878,6 +1878,7 @@ create_intf_jump (void) ...@@ -1878,6 +1878,7 @@ create_intf_jump (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_box); gtk_widget_show (jump_box);
gtk_container_add (GTK_CONTAINER (jump_frame), 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.")); jump_label3 = gtk_label_new (_("s."));
gtk_widget_ref (jump_label3); gtk_widget_ref (jump_label3);
...@@ -2045,17 +2046,17 @@ create_intf_preferences (void) ...@@ -2045,17 +2046,17 @@ create_intf_preferences (void)
GtkWidget *preferences_playlist_enqueue_as_default_checkbutton; GtkWidget *preferences_playlist_enqueue_as_default_checkbutton;
GtkWidget *preferences_playlist; GtkWidget *preferences_playlist;
GtkWidget *preferences_misc_table; 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_frame;
GtkWidget *preferences_misc_message_table; GtkWidget *preferences_misc_message_table;
GtkWidget *preferences_misc_messages_label; GtkWidget *preferences_misc_messages_label;
GtkObject *preferences_misc_messages_spinbutton_adj; GtkObject *preferences_misc_messages_spinbutton_adj;
GtkWidget *preferences_misc_messages_spinbutton; 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_misc;
GtkWidget *preferences_dialog; GtkWidget *preferences_dialog;
GtkWidget *preferences_ok; GtkWidget *preferences_ok;
...@@ -2070,6 +2071,7 @@ create_intf_preferences (void) ...@@ -2070,6 +2071,7 @@ create_intf_preferences (void)
preferences_vbox = GNOME_DIALOG (intf_preferences)->vbox; preferences_vbox = GNOME_DIALOG (intf_preferences)->vbox;
gtk_object_set_data (GTK_OBJECT (intf_preferences), "preferences_vbox", preferences_vbox); gtk_object_set_data (GTK_OBJECT (intf_preferences), "preferences_vbox", preferences_vbox);
gtk_widget_show (preferences_vbox); gtk_widget_show (preferences_vbox);
gtk_container_set_border_width (GTK_CONTAINER (preferences_vbox), 5);
preferences_frame = gtk_frame_new (_("Preferences")); preferences_frame = gtk_frame_new (_("Preferences"));
gtk_widget_ref (preferences_frame); gtk_widget_ref (preferences_frame);
...@@ -2092,6 +2094,9 @@ create_intf_preferences (void) ...@@ -2092,6 +2094,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_file_table); gtk_widget_show (preferences_file_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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); preferences_file_combo = gnome_file_entry_new (NULL, NULL);
gtk_widget_ref (preferences_file_combo); gtk_widget_ref (preferences_file_combo);
...@@ -2131,6 +2136,9 @@ create_intf_preferences (void) ...@@ -2131,6 +2136,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_disc_table); gtk_widget_show (preferences_disc_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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); preferences_disc_dvd_combo = gnome_file_entry_new (NULL, NULL);
gtk_widget_ref (preferences_disc_dvd_combo); gtk_widget_ref (preferences_disc_dvd_combo);
...@@ -2195,6 +2203,9 @@ create_intf_preferences (void) ...@@ -2195,6 +2203,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_network_table); gtk_widget_show (preferences_network_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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: ")); preferences_network_server_label = gtk_label_new (_("Default server: "));
gtk_widget_ref (preferences_network_server_label); gtk_widget_ref (preferences_network_server_label);
...@@ -2329,6 +2340,9 @@ create_intf_preferences (void) ...@@ -2329,6 +2340,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_network_interface_table); gtk_widget_show (preferences_network_interface_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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: ")); preferences_interface_label = gtk_label_new (_("Default interface: "));
gtk_widget_ref (preferences_interface_label); gtk_widget_ref (preferences_interface_label);
...@@ -2368,6 +2382,9 @@ create_intf_preferences (void) ...@@ -2368,6 +2382,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_video_table); gtk_widget_show (preferences_video_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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: ")); preferences_video_output_label = gtk_label_new (_("Default output: "));
gtk_widget_ref (preferences_video_output_label); gtk_widget_ref (preferences_video_output_label);
...@@ -2547,6 +2564,9 @@ create_intf_preferences (void) ...@@ -2547,6 +2564,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preference_audio_table); gtk_widget_show (preference_audio_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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")); preferences_audio_spdif_checkbutton = gtk_check_button_new_with_label (_("Spdif output"));
gtk_widget_ref (preferences_audio_spdif_checkbutton); gtk_widget_ref (preferences_audio_spdif_checkbutton);
...@@ -2708,6 +2728,9 @@ create_intf_preferences (void) ...@@ -2708,6 +2728,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preference_playlist_table); gtk_widget_show (preference_playlist_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), 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")); preferences_playlist_launch_on_startup_checkbutton = gtk_check_button_new_with_label (_("Launch on startup"));
gtk_widget_ref (preferences_playlist_launch_on_startup_checkbutton); gtk_widget_ref (preferences_playlist_launch_on_startup_checkbutton);
...@@ -2749,42 +2772,9 @@ create_intf_preferences (void) ...@@ -2749,42 +2772,9 @@ create_intf_preferences (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_table); gtk_widget_show (preferences_misc_table);
gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_misc_table); gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_misc_table);
gtk_container_set_border_width (GTK_CONTAINER (preferences_misc_table), 5);
preferences_misc_message_frame = gtk_frame_new (_("Messages")); gtk_table_set_row_spacings (GTK_TABLE (preferences_misc_table), 5);
gtk_widget_ref (preferences_misc_message_frame); gtk_table_set_col_spacings (GTK_TABLE (preferences_misc_table), 5);
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);
preferences_misc_associated_files_frame = gtk_frame_new (_("Files associated with vlc")); preferences_misc_associated_files_frame = gtk_frame_new (_("Files associated with vlc"));
gtk_widget_ref (preferences_misc_associated_files_frame); gtk_widget_ref (preferences_misc_associated_files_frame);
...@@ -2793,7 +2783,7 @@ create_intf_preferences (void) ...@@ -2793,7 +2783,7 @@ create_intf_preferences (void)
gtk_widget_show (preferences_misc_associated_files_frame); 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, gtk_table_attach (GTK_TABLE (preferences_misc_table), preferences_misc_associated_files_frame, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_EXPAND), (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_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); gtk_frame_set_label_align (GTK_FRAME (preferences_misc_associated_files_frame), 0.05, 0.5);
...@@ -2804,12 +2794,21 @@ create_intf_preferences (void) ...@@ -2804,12 +2794,21 @@ create_intf_preferences (void)
gtk_widget_show (preferences_misc_associated_table); gtk_widget_show (preferences_misc_associated_table);
gtk_container_add (GTK_CONTAINER (preferences_misc_associated_files_frame), 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")); preferences_misc_ts_checkbutton = gtk_check_button_new_with_label (_("ts"));
gtk_widget_ref (preferences_misc_mpeg_checkbutton); gtk_widget_ref (preferences_misc_ts_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_mpeg_checkbutton", preferences_misc_mpeg_checkbutton, gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_ts_checkbutton", preferences_misc_ts_checkbutton,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_mpeg_checkbutton); gtk_widget_show (preferences_misc_ts_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_mpeg_checkbutton, 0, 1, 0, 1, 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) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
...@@ -2822,24 +2821,51 @@ create_intf_preferences (void) ...@@ -2822,24 +2821,51 @@ create_intf_preferences (void)
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
preferences_misc_vob_checkbutton = gtk_check_button_new_with_label (_("vob")); preferences_misc_mpeg_checkbutton = gtk_check_button_new_with_label (_("mpeg"));
gtk_widget_ref (preferences_misc_vob_checkbutton); gtk_widget_ref (preferences_misc_mpeg_checkbutton);
gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_vob_checkbutton", preferences_misc_vob_checkbutton, gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_misc_mpeg_checkbutton", preferences_misc_mpeg_checkbutton,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences_misc_vob_checkbutton); gtk_widget_show (preferences_misc_mpeg_checkbutton);
gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_vob_checkbutton, 0, 1, 2, 3, gtk_table_attach (GTK_TABLE (preferences_misc_associated_table), preferences_misc_mpeg_checkbutton, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
preferences_misc_ts_checkbutton = gtk_check_button_new_with_label (_("ts")); preferences_misc_message_frame = gtk_frame_new (_("Messages"));