Commit b1e4fd1c authored by Loïc Minier's avatar Loïc Minier

The "we love gibalou" commit :

  * plugins/gtk/gnome.c, plugins/gtk/gtk.c, plugins/gtk/gtk_common.h :
      . new Tooltips structure
  * plugins/gtk/gtk_preferences.c:
      . modifications of some widgets, the structure, cosmetic changes
  * src/interface/main.c:
      . typos
      . a couple new descriptions
parent 2feb20f8
......@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.13 2002/03/25 02:06:24 jobi Exp $
* $Id: gnome.c,v 1.14 2002/03/25 20:37:00 lool Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -250,6 +250,7 @@ static void intf_Run( intf_thread_t *p_intf )
p_intf->p_sys->p_network = NULL;
p_intf->p_sys->p_sat = NULL;
p_intf->p_sys->p_jump = NULL;
p_intf->p_sys->p_tooltips = gtk_tooltips_new();
/* Store p_intf to keep an eye on it */
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
......@@ -280,6 +281,9 @@ static void intf_Run( intf_thread_t *p_intf )
/* Remove the timeout */
gtk_timeout_remove( i_dummy );
/* Destroy the Tooltips structure */
gtk_object_destroy( GTK_OBJECT(p_intf->p_sys->p_tooltips) );
/* Get rid of stored callbacks so we can unload the plugin */
for( i_dummy = 0;
i_dummy < MAX_ATEXIT && p_intf->p_sys->pf_callback[i_dummy] != NULL;
......
......@@ -2,10 +2,10 @@
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.15 2002/03/25 02:06:24 jobi Exp $
* $Id: gtk.c,v 1.16 2002/03/25 20:37:00 lool Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
......@@ -198,11 +198,12 @@ static void intf_Run( intf_thread_t *p_intf )
gtk_init( &i_args, &pp_args );
/* 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_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_messages = create_intf_messages();
p_intf->p_sys->p_tooltips = gtk_tooltips_new();
/* Set the title of the main window */
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
VOUT_TITLE " (Gtk+ interface)");
......@@ -220,7 +221,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* Get the slider object */
p_intf->p_sys->p_slider_frame = GTK_FRAME( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "slider_frame" ) );
GTK_OBJECT( p_intf->p_sys->p_window ), "slider_frame" ) );
/* Configure the log window */
p_intf->p_sys->p_messages_text = GTK_TEXT( gtk_object_get_data(
......@@ -283,6 +284,9 @@ static void intf_Run( intf_thread_t *p_intf )
/* Remove the timeout */
gtk_timeout_remove( i_dummy );
/* Destroy the Tooltips structure */
gtk_object_destroy( GTK_OBJECT(p_intf->p_sys->p_tooltips) );
/* Launch stored callbacks */
for( i_dummy = 0;
i_dummy < MAX_ATEXIT && p_intf->p_sys->pf_callback[i_dummy] != NULL;
......@@ -311,7 +315,7 @@ static gint GtkManage( gpointer p_data )
int i_start, i_stop;
vlc_mutex_lock( &p_intf->change_lock );
/* If the "display popup" flag has changed */
if( p_intf->b_menu_change )
{
......@@ -387,7 +391,7 @@ static gint GtkManage( gpointer p_data )
p_intf->p_sys->b_playing )
{
float newvalue = p_intf->p_sys->p_adj->value;
#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
/* If the user hasn't touched the slider since the last time,
* then the input can safely change it */
......@@ -396,7 +400,7 @@ static gint GtkManage( gpointer p_data )
/* Update the value */
p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue =
( 100. * p_area->i_tell ) / p_area->i_size;
gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
"value_changed" );
}
......@@ -405,18 +409,18 @@ static gint GtkManage( gpointer p_data )
else if( p_intf->p_sys->b_slider_free )
{
off_t i_seek = ( newvalue * p_area->i_size ) / 100;
/* release the lock to be able to seek */
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
input_Seek( p_input_bank->pp_input[0], i_seek );
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
/* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue;
}
# undef p_area
}
if( p_intf->p_sys->i_part !=
p_input_bank->pp_input[0]->stream.p_selected_area->i_part )
{
......
......@@ -2,7 +2,7 @@
* gtk_common.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_common.h,v 1.6 2002/03/25 02:06:24 jobi Exp $
* $Id: gtk_common.h,v 1.7 2002/03/25 20:37:00 lool Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -72,6 +72,8 @@ typedef struct intf_sys_s
GtkWidget * p_network; /* network stream window */
GtkWidget * p_jump; /* jump window */
GtkTooltips * p_tooltips; /* tooltips */
/* The slider */
GtkFrame * p_slider_frame;
GtkAdjustment * p_adj; /* slider adjustment object */
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.169 2002/03/25 19:16:20 gbazin Exp $
* $Id: main.c,v 1.170 2002/03/25 20:37:00 lool Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -89,7 +89,7 @@
* define its own configuration options.
* Look into configuration.h if you need to know more about the following
* macros.
*
*
*****************************************************************************/
#define BUILTIN
#define MODULE_NAME main
......@@ -112,7 +112,7 @@
#define INTF_PATH_TEXT "interface default search path"
#define INTF_PATH_LONGTEXT "This option allows you to set the default path" \
"that the interface will open when looking for a" \
" that the interface will open when looking for a" \
" file"
#define AOUT_TEXT "audio output method"
......@@ -144,36 +144,39 @@
"6 -> 16 bits unsigned big endian\n" \
"7 -> mpeg2 audio (unsupported)\n" \
"8 -> ac3 pass-through"
#define RATE_TEXT "audio output frequency (Hz)"
#define RATE_LONGTEXT "You can force the audio output frequency here.\n" \
"Common values are 48000, 44100, 32000, 22050," \
" 16000, 11025, 8000"
#define DESYNC_TEXT "Compensate desynchronization of audio (in ms)"
#define DESYNC_LONGTEXT "This option allows you to delay the audio output." \
"This can be handy if you notice a lag between the" \
#define DESYNC_LONGTEXT "This option allows you to delay the audio output." \
" This can be handy if you notice a lag between the" \
" video and the audio"
#define VOUT_TEXT "video output method"
#define VOUT_LONGTEXT "This option allows you to select the video output" \
"method used by vlc.\nNote that the default behaviour" \
"is to automatically select the best method available"
#define VOUT_LONGTEXT "This option allows you to select the video output" \
" method used by vlc.\nNote that the default behaviour" \
" is to automatically select the best method available"
#define NOVIDEO_TEXT "disable video"
#define NOVIDEO_LONGTEXT "This will completely disable the video output. The" \
"video decoding stage shouldn't even be done, so it" \
"can allow you to save some processing power"
" video decoding stage shouldn't even be done, so" \
" it can allow you to save some processing power"
#define DISPLAY_TEXT "display identifier"
#define DISPLAY_LONGTEXT NULL
#define WIDTH_TEXT "video width"
#define WIDTH_LONGTEXT "You can enforce the video width here.\nNote" \
"that by default vlc will adapt to the video " \
"characteristics"
#define WIDTH_LONGTEXT "You can enforce the video width here.\nNote" \
" that by default vlc will adapt to the video" \
" characteristics"
#define HEIGHT_TEXT "video height"
#define HEIGHT_LONGTEXT "You can enforce the video height here.\nNote" \
"that by default vlc will adapt to the video " \
"characteristics"
#define HEIGHT_LONGTEXT "You can enforce the video height here.\nNote" \
" that by default vlc will adapt to the video " \
" characteristics"
#define GRAYSCALE_TEXT "grayscale video output"
#define GRAYSCALE_LONGTEXT "Using this option, vlc will not decode the color "\
......@@ -235,7 +238,7 @@
#define SAT_SRATE_TEXT "Satellite transponder symbol rate"
#define SAT_SRATE_LONGTEXT NULL
#define IPV6_TEXT "force IPv6"
#define IPV6_LONGTEXT NULL
......@@ -272,7 +275,7 @@
#define PLAYLIST_LAUNCH_TEXT "launch playlist on startup"
#define PLAYLIST_LAUNCH_LONGTEXT NULL
#define PLAYLIST_ENQUEUE_TEXT "enqeue playlist as default"
#define PLAYLIST_ENQUEUE_TEXT "enqueue playlist as default"
#define PLAYLIST_ENQUEUE_LONGTEXT NULL
#define PLAYLIST_LOOP_TEXT "loop playlist on end"
......@@ -343,7 +346,7 @@ ADD_STRING ( "vcd_device", "/dev/cdrom", NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT )
#ifdef HAVE_SATELLITE
ADD_INTEGER ( "sat_frequency", 12553, NULL, SAT_FREQ_TEXT, SAT_FREQ_LONGTEXT )
ADD_INTEGER ( "sat_polarization", 0, NULL, SAT_POL_TEXT, SAT_POL_LONGTEXT )
ADD_INTEGER ( "sat_symbol_rate", 27500, NULL, SAT_SRATE_TEXT,
ADD_INTEGER ( "sat_symbol_rate", 27500, NULL, SAT_SRATE_TEXT,
SAT_SRATE_LONGTEXT )
#endif
......@@ -735,7 +738,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
network_ChannelCreate() )
{
/* On error during Channels initialization, switch off channels */
intf_ErrMsg( "intf error: channels initialization failed, "
intf_ErrMsg( "intf error: channels initialization failed, "
"deactivating channels" );
config_PutIntVariable( "network_channel", 0 );
}
......
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