Commit ca90f850 authored by Stéphane Borel's avatar Stéphane Borel

*Changed the level arg in intf_WarnMsg so that it is more logical: the

level corresponds now to the nb of -v to display the message.

*added functionnal preference window in gnome: it changes the
envirronment variables

*added jump window in gnome to jump to a precise time.
parent fd1da66f
......@@ -145,6 +145,7 @@
/* Default search path for interface file browser */
#define INTF_PATH_VAR "vlc_search_path"
#define INTF_PATH_DEFAULT ""
/*****************************************************************************
* Input thread configuration
......@@ -228,7 +229,7 @@
#define INPUT_SUBTITLE_VAR "vlc_input_subtitle"
/* VCD defaults */
#define INPUT_VVC_DEVICE_VAR "vlc_vcd_device"
#define INPUT_VCD_DEVICE_VAR "vlc_vcd_device"
#define INPUT_VCD_DEVICE_DEFAULT "/dev/cdrom"
/*****************************************************************************
......@@ -476,7 +477,7 @@
/* Interface warnig message level */
#define INTF_WARNING_VAR "vlc_warning_level"
#define INTF_WARNING_DEFAULT 12
#define INTF_WARNING_DEFAULT 0
/* Define to enable messages queues - disabling messages queue can be useful
* when debugging, since it allows messages which would not be printed
......@@ -512,7 +513,7 @@
/* Enqueue drag'n dropped item */
#define PLAYLIST_ENQUEUE_VAR "vlc_playlist_enqueue"
#define PLAYLIST_ENQUEUE_DZFAULT 0
#define PLAYLIST_ENQUEUE_DEFAULT 0
/* Loop on playlist end */
#define PLAYLIST_LOOP_VAR "vlc_playlist_loop"
......
......@@ -2,7 +2,7 @@
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_css.c,v 1.27 2001/05/02 20:01:44 sam Exp $
* $Id: dvd_css.c,v 1.28 2001/05/07 03:14:09 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -108,17 +108,17 @@ int CSSInit( int i_fd, css_t * p_css )
return -1;
case 1:
intf_WarnMsg( 3, "css info: already authenticated" );
intf_WarnMsg( 2, "css info: already authenticated" );
return 0;
case 0:
intf_WarnMsg( 3, "css info: need to authenticate" );
intf_WarnMsg( 2, "css info: need to authenticate" );
}
/* Init sequence, request AGID */
for( i = 1; i < 4 ; ++i )
{
intf_WarnMsg( 3, "css info: requesting AGID %d", i );
intf_WarnMsg( 2, "css info: requesting AGID %d", i );
i_ret = ioctl_ReportAgid( i_fd, &i_agid );
......@@ -180,7 +180,7 @@ int CSSInit( int i_fd, css_t * p_css )
if( memcmp( p_css->disc.pi_key_check,
p_css->disc.pi_key1, KEY_SIZE ) == 0 )
{
intf_WarnMsg( 3, "css info: drive authentic, using variant %d", i);
intf_WarnMsg( 2, "css info: drive authentic, using variant %d", i);
p_css->disc.i_varient = i;
break;
}
......@@ -221,7 +221,7 @@ int CSSInit( int i_fd, css_t * p_css )
return -1;
}
intf_WarnMsg( 3, "css info: authentication established" );
intf_WarnMsg( 2, "css info: authentication established" );
memcpy( p_css->disc.pi_challenge, p_css->disc.pi_key1, KEY_SIZE );
memcpy( p_css->disc.pi_challenge+KEY_SIZE, p_css->disc.pi_key2, KEY_SIZE );
......@@ -229,7 +229,7 @@ int CSSInit( int i_fd, css_t * p_css )
CSSCryptKey( 2, p_css->disc.i_varient, p_css->disc.pi_challenge,
p_css->disc.pi_key_check );
intf_WarnMsg( 1, "css info: received session key" );
intf_WarnMsg( 2, "css info: received session key" );
if( i_agid < 0 )
{
......@@ -243,11 +243,11 @@ int CSSInit( int i_fd, css_t * p_css )
return -1;
case 1:
intf_WarnMsg( 3, "css info: already authenticated" );
intf_WarnMsg( 2, "css info: already authenticated" );
return 0;
case 0:
intf_WarnMsg( 3, "css info: need to get disc key" );
intf_WarnMsg( 2, "css info: need to get disc key" );
}
/* Get encrypted disc key */
......@@ -277,7 +277,7 @@ int CSSInit( int i_fd, css_t * p_css )
return -1;
case 1:
intf_WarnMsg( 3, "css info: successfully authenticated" );
intf_WarnMsg( 2, "css info: successfully authenticated" );
return 0;
case 0:
......@@ -374,7 +374,7 @@ int CSSGetKey( int i_fd, css_t * p_css )
if( !b_encrypted )
{
intf_WarnMsg( 3, "css warning: this file was _NOT_ encrypted!" );
intf_WarnMsg( 2, "css warning: this file was _NOT_ encrypted!" );
return 0;
}
......
......@@ -2,7 +2,7 @@
* dvd_ifo.c: Functions for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ifo.c,v 1.24 2001/04/22 00:08:25 stef Exp $
* $Id: dvd_ifo.c,v 1.25 2001/05/07 03:14:09 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -493,7 +493,7 @@ DumpBits( p_ifo, pi_buffer, &p_current, 2 );
p_ifo->vts.b_initialized = 0;
intf_WarnMsg( 1, "ifo info: vmg initialized" );
intf_WarnMsg( 2, "ifo info: vmg initialized" );
return 0;
}
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.55 2001/05/06 18:32:30 stef Exp $
* $Id: input_dvd.c,v 1.56 2001/05/07 03:14:09 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -600,7 +600,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_dvd->i_title_id =
vts.title_inf.p_title_start[p_dvd->i_vts_title-1].i_title_id;
intf_WarnMsg( 1, "dvd: title %d vts_title %d pgc %d",
intf_WarnMsg( 3, "dvd: title %d vts_title %d pgc %d",
p_dvd->i_title,
p_dvd->i_vts_title,
p_dvd->i_title_id );
......@@ -747,7 +747,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
for( i = 1 ; i <= vts.manager_inf.i_audio_nb ; i++ )
{
intf_WarnMsg( 1, "Audio %d: %x %x %x %x %x %x %x %x %x %x %x %x", i,
intf_WarnMsg( 5, "dvd info: audio %d: %x %x %x %x %x %x %x %x %x %x %x %x", i,
vts.manager_inf.p_audio_attr[i-1].i_num_channels,
vts.manager_inf.p_audio_attr[i-1].i_coding_mode,
vts.manager_inf.p_audio_attr[i-1].i_multichannel_extension,
......@@ -775,7 +775,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) );
strcat( p_es->psz_desc, " (ac3)" );
intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)",
intf_WarnMsg( 3, "dvd info: audio stream %d %s\t(0x%x)",
i, p_es->psz_desc, i_id );
break;
......@@ -792,7 +792,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) );
strcat( p_es->psz_desc, " (mpeg)" );
intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)",
intf_WarnMsg( 3, "dvd info: audio stream %d %s\t(0x%x)",
i, p_es->psz_desc, i_id );
break;
......@@ -809,7 +809,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) );
strcat( p_es->psz_desc, " (lpcm)" );
intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)",
intf_WarnMsg( 3, "dvd info: audio stream %d %s\t(0x%x)",
i, p_es->psz_desc, i_id );
#else
i_id = 0;
......@@ -845,7 +845,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_es->i_cat = SPU_ES;
strcpy( p_es->psz_desc, Language( hton16(
vts.manager_inf.p_spu_attr[i-1].i_lang_code ) ) );
intf_WarnMsg( 1, "dvd info: spu stream %d %s\t(0x%x)",
intf_WarnMsg( 3, "dvd info: spu stream %d %s\t(0x%x)",
i, p_es->psz_desc, i_id );
/* The before the last spu has a 0x0 prefix */
......@@ -1277,7 +1277,7 @@ static void DVDSeek( input_thread_t * p_input, off_t i_off )
(off_t)( p_dvd->i_sector ) *DVD_LB_SIZE, SEEK_SET ) -
p_input->stream.p_selected_area->i_start;
/*
intf_WarnMsg( 1, "Program Cell: %d Cell: %d Chapter: %d",
intf_WarnMsg( 3, "Program Cell: %d Cell: %d Chapter: %d",
p_dvd->i_prg_cell, p_dvd->i_cell, p_dvd->i_chapter );
*/
......@@ -1312,7 +1312,7 @@ static int DVDFindCell( thread_dvd_data_t * p_dvd )
}
/*
intf_WarnMsg( 1, "FindCell: i_cell %d i_index %d found %d nb %d",
intf_WarnMsg( 3, "FindCell: i_cell %d i_index %d found %d nb %d",
p_dvd->i_cell,
p_dvd->i_prg_cell,
i_cell,
......@@ -1363,7 +1363,7 @@ static int DVDFindSector( thread_dvd_data_t * p_dvd )
#endif
/*
intf_WarnMsg( 1, "cell: %d sector1: 0x%x end1: 0x%x\n"
intf_WarnMsg( 3, "cell: %d sector1: 0x%x end1: 0x%x\n"
"index: %d sector2: 0x%x end2: 0x%x\n"
"category: 0x%x ilvu end: 0x%x vobu start 0x%x",
p_dvd->i_cell,
......@@ -1425,7 +1425,7 @@ static int DVDChooseAngle( thread_dvd_data_t * p_dvd )
case 0x5:
p_dvd->i_prg_cell += p_dvd->i_angle - 1;
p_dvd->i_angle_cell = 0;
// intf_WarnMsg( 1, "dvd info: choosing angle %d", p_dvd->i_angle );
// intf_WarnMsg( 3, "dvd info: choosing angle %d", p_dvd->i_angle );
break;
/* we exit a multi-angle section */
case 0x9:
......
......@@ -2,7 +2,7 @@
* vout_fb.c: framebuffer video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: vout_fb.c,v 1.11 2001/05/06 04:32:02 sam Exp $
* $Id: vout_fb.c,v 1.12 2001/05/07 03:14:09 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -334,7 +334,7 @@ static int vout_Manage( vout_thread_t *p_vout )
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
intf_WarnMsg( 1, "vout: reinitializing framebuffer screen" );
intf_WarnMsg( 3, "vout: reinitializing framebuffer screen" );
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Destroy XImages to change their size */
......@@ -459,7 +459,7 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
/* FIXME: if the image is full-size, it gets cropped on the left
* because of the xres / xres_virtual slight difference */
intf_WarnMsg( 1, "vout: %ix%i (virtual %ix%i)",
intf_WarnMsg( 3, "vout: %ix%i (virtual %ix%i)",
p_vout->p_sys->var_info.xres,
p_vout->p_sys->var_info.yres,
p_vout->p_sys->var_info.xres_virtual,
......@@ -573,7 +573,7 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
p_vout->p_sys->p_video );
}
intf_WarnMsg( 1, "framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d",
intf_WarnMsg( 3, "framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d",
fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
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.26 2001/05/06 18:32:30 stef Exp $
* $Id: gnome_callbacks.c,v 1.27 2001/05/07 03:14:09 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -129,7 +129,7 @@ on_intf_window_drag_data_received (GtkWidget *widget,
/* get rid of ' ' at the end */
*( psz_text + i_len - 1 ) = 0;
intf_WarnMsg( 1, "intf: dropped text/uri-list data `%s'", psz_text );
intf_WarnMsg( 3, "intf: dropped text/uri-list data `%s'", psz_text );
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
break;
......@@ -144,7 +144,7 @@ on_intf_window_drag_data_received (GtkWidget *widget,
/* get rid of \r\n at the end */
*( psz_text + i_len - 2 ) = 0;
intf_WarnMsg( 1, "intf: dropped text/uri-list data `%s'", psz_text );
intf_WarnMsg( 3, "intf: dropped text/uri-list data `%s'", psz_text );
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_text );
break;
......@@ -279,6 +279,10 @@ on_menubar_open_activate (GtkMenuItem *menuitem,
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 );
......@@ -513,6 +517,119 @@ on_menubar_preferences_activate (GtkMenuItem *menuitem,
p_intf->p_sys->p_preferences = create_intf_preferences();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_preferences ),
"p_intf", p_intf );
#if 1
#define ASSIGN_PSZ_ENTRY( var, default, name ) \
gtk_entry_set_text( GTK_ENTRY( gtk_object_get_data( GTK_OBJECT( \
p_intf->p_sys->p_preferences ), name ) ), \
main_GetPszVariable( var, default ) )
#define ASSIGN_INT_VALUE( var, default, name ) \
gtk_spin_button_set_value( GTK_SPIN_BUTTON( gtk_object_get_data( \
GTK_OBJECT( p_intf->p_sys->p_preferences ), name ) ), \
main_GetIntVariable( var, default ) )
#define ASSIGN_INT_TOGGLE( var, default, name ) \
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( gtk_object_get_data( \
GTK_OBJECT( p_intf->p_sys->p_preferences ), name ) ), \
main_GetIntVariable( var, default ) )
/* Default path */
ASSIGN_PSZ_ENTRY( INTF_PATH_VAR, INTF_PATH_DEFAULT,
"preferences_file_entry" );
/* Default DVD */
ASSIGN_PSZ_ENTRY( INPUT_DVD_DEVICE_VAR,INPUT_DVD_DEVICE_DEFAULT,
"preferences_disc_dvd_entry" );
/* Default VCD */
ASSIGN_PSZ_ENTRY( INPUT_VCD_DEVICE_VAR, INPUT_VCD_DEVICE_DEFAULT,
"preferences_disc_vcd_entry" );
/* Default server */
ASSIGN_PSZ_ENTRY( INPUT_SERVER_VAR, INPUT_SERVER_DEFAULT,
"preferences_network_server_entry" );
/* Default port */
ASSIGN_INT_VALUE( INPUT_PORT_VAR, INPUT_PORT_DEFAULT,
"preferences_network_port_spinbutton" );
/* Broadcast address */
ASSIGN_PSZ_ENTRY( INPUT_BCAST_ADRR_VAR, INPUT_BCAST_ADDR_DEFAULT,
"preferences_network_broadcast_entry" );
/* Broadcast stream by default ? */
ASSIGN_INT_TOGGLE( INPUT_BROADCAST_VAR, INPUT_BROADCAST_DEFAULT,
"preferences_network_broadcast_checkbutton" );
/* XXX Protocol */
/* Default interface */
ASSIGN_PSZ_ENTRY( INTF_METHOD_VAR, INTF_METHOD_DEFAULT,
"preferences_interface_entry" );
/* Default video output */
ASSIGN_PSZ_ENTRY( VOUT_METHOD_VAR, VOUT_METHOD_DEFAULT,
"preferences_video_output_entry" );
/* Default output width */
ASSIGN_INT_VALUE( VOUT_WIDTH_VAR, VOUT_WIDTH_DEFAULT,
"preferences_video_width_spinbutton" );
/* Default output height */
ASSIGN_INT_VALUE( VOUT_HEIGHT_VAR, VOUT_HEIGHT_DEFAULT,
"preferences_video_height_spinbutton" );
/* XXX Default screen depth */
/* XXX Default fullscreen depth */
/* XXX Default gamma */
/* Fullscreen on play */
ASSIGN_INT_TOGGLE( VOUT_FULLSCREEN_VAR, VOUT_FULLSCREEN_DEFAULT,
"preferences_video_fullscreen_checkbutton" );
/* Grayscale display */
ASSIGN_INT_TOGGLE( VOUT_GRAYSCALE_VAR, VOUT_GRAYSCALE_DEFAULT,
"preferences_video_grayscale_checkbutton" );
/* Default audio output */
ASSIGN_PSZ_ENTRY( AOUT_METHOD_VAR, AOUT_METHOD_DEFAULT,
"preferences_audio_output_entry" );
/* Default audio device */
ASSIGN_PSZ_ENTRY( AOUT_DSP_VAR, AOUT_DSP_DEFAULT,
"preferences_audio_device_entry" );
/* XXX Default frequency */
/* XXX Default quality */
/* XXX Default number of channels */
/* Use spdif output ? */
ASSIGN_INT_TOGGLE( AOUT_SPDIF_VAR, AOUT_SPDIF_DEFAULT,
"preferences_audio_spdif_checkbutton" );
/* Launch playlist on startup */
ASSIGN_INT_TOGGLE( PLAYLIST_STARTUP_VAR, PLAYLIST_STARTUP_DEFAULT,
"preferences_playlist_launch_on_startup_checkbutton" );
/* Enqueue drag'n dropped item as default */
ASSIGN_INT_TOGGLE( PLAYLIST_ENQUEUE_VAR, PLAYLIST_ENQUEUE_DEFAULT,
"preferences_playlist_enqueue_as_default_checkbutton" );
/* Loop on playlist end */
ASSIGN_INT_TOGGLE( PLAYLIST_LOOP_VAR, PLAYLIST_LOOP_DEFAULT,
"preferences_playlist_loop_checkbutton" );
/* Verbosity of warning messages */
ASSIGN_INT_VALUE( INTF_WARNING_VAR, INTF_WARNING_DEFAULT,
"preferences_misc_messages_spinbutton" );
#undef ASSIGN_PSZ_ENTRY
#undef ASSIGN_INT_VALUE
#undef ASSIGN_INT_TOGGLE
#endif
}
gtk_widget_show( p_intf->p_sys->p_preferences );
......@@ -555,6 +672,13 @@ on_toolbar_open_clicked (GtkButton *button,
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 );
if( main_GetPszVariable( INTF_PATH_VAR, INTF_PATH_DEFAULT ) != NULL )
{
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 );
......@@ -921,6 +1045,13 @@ on_popup_open_activate (GtkMenuItem *menuitem,
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 );
if( main_GetPszVariable( INTF_PATH_VAR, INTF_PATH_DEFAULT ) != NULL )
{
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 );
......@@ -1377,6 +1508,7 @@ void
on_jump_ok_clicked (GtkButton *button,
gpointer user_data)
{
on_jump_apply_clicked( button, user_data );
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
......@@ -1385,7 +1517,38 @@ void
on_jump_apply_clicked (GtkButton *button,
gpointer user_data)
{
#if 1
intf_thread_t * p_intf;
off_t i_seek;
off_t i_size;
int i_hours;
int i_minutes;
int i_seconds;
p_intf = GetIntf( GTK_WIDGET( button ), "intf_jump" );
#define GET_VALUE( name ) \
gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( gtk_object_get_data( \
GTK_OBJECT( p_intf->p_sys->p_jump ), name ) ) )
i_hours = GET_VALUE( "jump_hour_spinbutton" );
i_minutes = GET_VALUE( "jump_minute_spinbutton" );
i_seconds = GET_VALUE( "jump_second_spinbutton" );
#undef GET_VALUE
i_seconds += 60 *i_minutes + 3600* i_hours;
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
i_seek = i_seconds * 50 * p_intf->p_input->stream.i_mux_rate;
i_size = p_intf->p_input->stream.p_selected_area->i_size;
vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
if( i_seek < i_size )
{
input_Seek( p_intf->p_input, i_seek );
}
#endif
}
......@@ -1404,6 +1567,7 @@ void
on_preferences_ok_clicked (GtkButton *button,
gpointer user_data)
{
on_preferences_apply_clicked( button, user_data );
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
......@@ -1412,7 +1576,111 @@ void
on_preferences_apply_clicked (GtkButton *button,
gpointer user_data)
{
#if 1
GtkWidget * p_preferences;
/* get preferences window */
p_preferences = gtk_widget_get_toplevel( GTK_WIDGET( button ) );
#define ASSIGN_PSZ_ENTRY( var, name ) \
main_PutPszVariable( var, gtk_entry_get_text( \
GTK_ENTRY( gtk_object_get_data( GTK_OBJECT( p_preferences ), name ) ) ) )
#define ASSIGN_INT_VALUE( var, name ) \
main_PutIntVariable( var, gtk_spin_button_get_value_as_int( \
GTK_SPIN_BUTTON( gtk_object_get_data( GTK_OBJECT( p_preferences ), \
name ) ) ) )
#define ASSIGN_INT_TOGGLE( var, name ) \
main_PutIntVariable( var, gtk_toggle_button_get_active( \
GTK_TOGGLE_BUTTON( gtk_object_get_data( GTK_OBJECT( p_preferences ), \
name ) ) ) )
/* Default path */
ASSIGN_PSZ_ENTRY( INTF_PATH_VAR, "preferences_file_entry" );
/* Default DVD */
ASSIGN_PSZ_ENTRY( INPUT_DVD_DEVICE_VAR, "preferences_disc_dvd_entry" );
/* Default VCD */
ASSIGN_PSZ_ENTRY( INPUT_VCD_DEVICE_VAR, "preferences_disc_vcd_entry" );
/* Default server */
ASSIGN_PSZ_ENTRY( INPUT_SERVER_VAR, "preferences_network_server_entry" );
/* Default port */
ASSIGN_INT_VALUE( INPUT_PORT_VAR, "preferences_network_port_spinbutton" );
/* Broadcast address */
ASSIGN_PSZ_ENTRY( INPUT_BCAST_ADRR_VAR,
"preferences_network_broadcast_entry" );
/* Broadcast stream by default ? */
ASSIGN_INT_TOGGLE( INPUT_BROADCAST_VAR,
"preferences_network_broadcast_checkbutton" );
/* XXX Protocol */
/* Default interface */
ASSIGN_PSZ_ENTRY( INTF_METHOD_VAR, "preferences_interface_entry" );
/* Default video output */
ASSIGN_PSZ_ENTRY( VOUT_METHOD_VAR, "preferences_video_output_entry" );
/* Default output width */
ASSIGN_INT_VALUE( VOUT_WIDTH_VAR, "preferences_video_width_spinbutton" );
/* Default output height */
ASSIGN_INT_VALUE( VOUT_HEIGHT_VAR, "preferences_video_height_spinbutton" );
/* XXX Default screen depth */
/* XXX Default fullscreen depth */
/* XXX Default gamma */
/* Fullscreen on play */
ASSIGN_INT_TOGGLE( VOUT_FULLSCREEN_VAR,
"preferences_video_fullscreen_checkbutton" );
/* Grayscale display */
ASSIGN_INT_TOGGLE( VOUT_GRAYSCALE_VAR,
"preferences_video_grayscale_checkbutton" );
/* Default audio output */
ASSIGN_PSZ_ENTRY( AOUT_METHOD_VAR, "preferences_audio_output_entry" );
/* Default audio device */
ASSIGN_PSZ_ENTRY( AOUT_DSP_VAR, "preferences_audio_device_entry" );
/* XXX Default frequency */
/* XXX Default quality */
/* XXX Default number of channels */
/* Use spdif output ? */
ASSIGN_INT_TOGGLE( AOUT_SPDIF_VAR, "preferences_audio_spdif_checkbutton" );
/* Launch playlist on startup */
ASSIGN_INT_TOGGLE( PLAYLIST_STARTUP_VAR,
"preferences_playlist_launch_on_startup_checkbutton" );
/* Enqueue drag'n dropped item as default */
ASSIGN_INT_TOGGLE( PLAYLIST_ENQUEUE_VAR,
"preferences_playlist_enqueue_as_default_checkbutton" );
/* Loop on playlist end */
ASSIGN_INT_TOGGLE( PLAYLIST_LOOP_VAR,
"preferences_playlist_loop_checkbutton" );
/* Verbosity of warning messages */
ASSIGN_INT_VALUE( INTF_WARNING_VAR,
"preferences_misc_messages_spinbutton" );
#undef ASSIGN_PSZ_ENTRY
#undef ASSIGN_INT_VALUE
#undef ASSIGN_INT_TOGGLE
#endif
}
......
......@@ -512,7 +512,7 @@ create_intf_window (void)
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 (_("Playlist empty"));
label_status = gtk_label_new ("");
gtk_widget_ref (label_status);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_status", label_status,
(GtkDestroyNotify) gtk_widget_unref);
......@@ -988,6 +988,7 @@ 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",
......@@ -1049,6 +1050,7 @@ create_intf_fileopen (void)
gtk_object_set_data (GTK_OBJECT (intf_fileopen), "intf_fileopen", intf_fileopen);
gtk_container_set_border_width (GTK_CONTAINER (intf_fileopen), 10);
gtk_window_set_modal (GTK_WINDOW (intf_fileopen), TRUE);
gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (intf_fileopen));
fileopen_ok = GTK_FILE_SELECTION (intf_fileopen)->ok_button;
gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_ok", fileopen_ok);
......@@ -1841,6 +1843,7 @@ create_intf_jump (void)
GtkWidget *jump_vbox;
GtkWidget *jump_frame;
GtkWidget *jump_box;
GtkWidget *jump_label3;
GtkObject *jump_second_spinbutton_adj;
GtkWidget *jump_second_spinbutton;
GtkWidget *jump_label1;
......@@ -1861,7 +1864,7 @@ create_intf_jump (void)
gtk_object_set_data (GTK_OBJECT (intf_jump), "jump_vbox", jump_vbox);
gtk_widget_show (jump_vbox);
jump_frame = gtk_frame_new (_("Jump to:"));
jump_frame = gtk_frame_new (_("Jump to: "));
gtk_widget_ref (jump_frame);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_frame", jump_frame,
(GtkDestroyNotify) gtk_widget_unref);
......@@ -1876,6 +1879,13 @@ create_intf_jump (void)
gtk_widget_show (jump_box);
gtk_container_add (GTK_CONTAINER (jump_frame), jump_box);
jump_label3 = gtk_label_new (_("s."));
gtk_widget_ref (jump_label3);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_label3", jump_label3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump_label3);
gtk_box_pack_end (GTK_BOX (jump_box), jump_label3, FALSE, FALSE, 0);
jump_second_spinbutton_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
jump_second_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (jump_second_spinbutton_adj), 1, 0);
gtk_widget_ref (jump_second_spinbutton);
......@@ -1884,7 +1894,7 @@ create_intf_jump (void)
gtk_widget_show (jump_second_spinbutton);
gtk_box_pack_end (GTK_BOX (jump_box), jump_second_spinbutton, FALSE, FALSE, 5);
jump_label1 = gtk_label_new (_(":"));
jump_label1 = gtk_label_new (_("m:"));
gtk_widget_ref (jump_label1);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_label1", jump_label1,
(GtkDestroyNotify) gtk_widget_unref);
......@@ -1899,7 +1909,7 @@ create_intf_jump (void)
gtk_widget_show (jump_minute_spinbutton);
gtk_box_pack_end (GTK_BOX (jump_box), jump_minute_spinbutton, FALSE, FALSE, 5);
jump_label2 = gtk_label_new (_(":"));
jump_label2 = gtk_label_new (_("h:"));
gtk_widget_ref (jump_label2);
gtk_object_set_data_full (GTK_OBJECT (intf_jump), "jump_label2", jump_label2,
(GtkDestroyNotify) gtk_widget_unref);
......@@ -1976,7 +1986,7 @@ create_intf_preferences (void)
GtkWidget *preferences_network_server_entry;
GtkWidget *preferences_network_broadcast_combo;
GtkWidget *preferences_network_broadcast_entry;
GtkWidget *preferences_network_broadcast_check_button;
GtkWidget *preferences_network_broadcast_checkbutton;
GSList *preferences_network_protocol_group_group = NULL;
GtkWidget *preferences_network_ts_radiobutton;
GtkWidget *preferences_network_rtp_radiobutton;
......@@ -1985,8 +1995,8 @@ create_intf_preferences (void)
GtkWidget *preferences_network;
GtkWidget *preferences_network_interface_table;
GtkWidget *preferences_interface_label;
GtkWidget *preferences_network_interface_combo;
GtkWidget *preferences_network_interface_entry;
GtkWidget *preferences_interface_combo;
GtkWidget *preferences_interface_entry;
GtkWidget *preferences_interface;
GtkWidget *preferences_video_table;
GtkWidget *preferences_video_output_label;
......@@ -2025,15 +2035,23 @@ create_intf_preferences (void)
GtkWidget *preferences_audio_channels_label;
GtkWidget *preferences_audio_channels_optionmenu;
GtkWidget *preferences_audio_channels_optionmenu_menu;
GtkWidget *preferences_audio_device_label;
GtkWidget *preferences_audio_device_combo;
GtkWidget *preferences_audio_device_entry;
GtkWidget *preferences_audio;
GtkWidget *preference_playlist_table;
GtkWidget *preferences_playlist_launch_on_startup_checkbutton;
GtkWidget *preferences_playlist_loop_checkbutton;
GtkWidget *playlist_enqueue_as_default_checkbutton;
GtkWidget *preferences_playlist_enqueue_as_default_checkbutton;
GtkWidget *preferences_playlist;
GtkWidget *preferences_misc_table;
GtkWidget *preferences_misc_associated_filesframe;