Commit ba0c772b authored by Laurent Aimar's avatar Laurent Aimar

* all: begin to up to date the gtk/gnome interface. All comments are

welcome, and please reports bugs :)
parent bd5872fb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_common.h: private Gtk+ interface description * gtk_common.h: private Gtk+ interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: common.h,v 1.5 2003/01/03 14:44:46 sam Exp $ * $Id: common.h,v 1.6 2003/01/20 20:07:06 fenrir Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -44,8 +44,12 @@ struct intf_sys_t ...@@ -44,8 +44,12 @@ struct intf_sys_t
vlc_bool_t b_window_changed; /* window display toggled ? */ vlc_bool_t b_window_changed; /* window display toggled ? */
vlc_bool_t b_playlist_changed; /* playlist display toggled ? */ vlc_bool_t b_playlist_changed; /* playlist display toggled ? */
vlc_bool_t b_slider_free; /* slider status */ vlc_bool_t b_slider_free; /* slider status */
vlc_bool_t b_deinterlace_update;
/* menus handlers */ /* menus handlers */
vlc_bool_t b_aout_update;
vlc_bool_t b_vout_update;
vlc_bool_t b_program_update; /* do we need to update programs vlc_bool_t b_program_update; /* do we need to update programs
menu */ menu */
vlc_bool_t b_title_update; /* do we need to update title menus */ vlc_bool_t b_title_update; /* do we need to update title menus */
...@@ -85,6 +89,9 @@ struct intf_sys_t ...@@ -85,6 +89,9 @@ struct intf_sys_t
GtkLabel * p_label_title; GtkLabel * p_label_title;
GtkLabel * p_label_chapter; GtkLabel * p_label_chapter;
guint i_part; /* current chapter */ guint i_part; /* current chapter */
/* audio part */
vlc_bool_t b_mute;
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* display.c: Gtk+ tools for main interface * display.c: Gtk+ tools for main interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: display.c,v 1.6 2002/12/18 14:17:11 sam Exp $ * $Id: display.c,v 1.7 2003/01/20 20:07:06 fenrir 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>
...@@ -177,7 +177,10 @@ gint E_(GtkModeManage)( intf_thread_t * p_intf ) ...@@ -177,7 +177,10 @@ gint E_(GtkModeManage)( intf_thread_t * p_intf )
p_intf->p_sys->b_audio_update = 1; p_intf->p_sys->b_audio_update = 1;
p_intf->p_sys->b_spu_update = 1; p_intf->p_sys->b_spu_update = 1;
p_intf->p_sys->i_part = 0; p_intf->p_sys->i_part = 0;
#if 0
p_intf->p_sys->b_aout_update = 1;
p_intf->p_sys->b_vout_update = 1;
#endif
p_intf->p_sys->p_input->stream.b_changed = 0; p_intf->p_sys->p_input->stream.b_changed = 0;
msg_Dbg( p_intf, "stream has changed, refreshing interface" ); msg_Dbg( p_intf, "stream has changed, refreshing interface" );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc * gnome.c : Gnome plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.5 2003/01/03 14:44:46 sam Exp $ * $Id: gnome.c,v 1.6 2003/01/20 20:07:06 fenrir Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -111,6 +111,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -111,6 +111,11 @@ static int Open( vlc_object_t *p_this )
/* Initialize Gnome thread */ /* Initialize Gnome thread */
p_intf->p_sys->b_playing = 0; p_intf->p_sys->b_playing = 0;
p_intf->p_sys->b_deinterlace_update = 0;
p_intf->p_sys->b_aout_update = 0;
p_intf->p_sys->b_vout_update = 0;
p_intf->p_sys->b_popup_changed = 0; p_intf->p_sys->b_popup_changed = 0;
p_intf->p_sys->b_window_changed = 0; p_intf->p_sys->b_window_changed = 0;
p_intf->p_sys->b_playlist_changed = 0; p_intf->p_sys->b_playlist_changed = 0;
...@@ -120,6 +125,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -120,6 +125,7 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->b_slider_free = 1; p_intf->p_sys->b_slider_free = 1;
p_intf->p_sys->i_part = 0; p_intf->p_sys->i_part = 0;
p_intf->p_sys->b_mute = 0;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -367,6 +373,9 @@ static void Manage( intf_thread_t *p_intf ) ...@@ -367,6 +373,9 @@ static void Manage( intf_thread_t *p_intf )
if( p_intf->p_sys->p_input ) if( p_intf->p_sys->p_input )
{ {
input_thread_t *p_input = p_intf->p_sys->p_input; input_thread_t *p_input = p_intf->p_sys->p_input;
aout_instance_t *p_aout = NULL;
vout_thread_t *p_vout = NULL;
vlc_bool_t b_need_menus = VLC_FALSE;
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -421,6 +430,44 @@ static void Manage( intf_thread_t *p_intf ) ...@@ -421,6 +430,44 @@ static void Manage( intf_thread_t *p_intf )
p_input->stream.p_selected_area->i_part ) p_input->stream.p_selected_area->i_part )
{ {
p_intf->p_sys->b_chapter_update = 1; p_intf->p_sys->b_chapter_update = 1;
b_need_menus = VLC_TRUE;
}
/* Does the audio output require to update the menus ? */
p_aout = (aout_instance_t *)vlc_object_find( p_intf, VLC_OBJECT_AOUT,
FIND_ANYWHERE );
if( p_aout != NULL )
{
vlc_value_t val;
if( var_Get( (vlc_object_t *)p_aout, "intf-change", &val ) >= 0
&& val.b_bool )
{
p_intf->p_sys->b_aout_update = 1;
b_need_menus = 1;
}
vlc_object_release( (vlc_object_t *)p_aout );
}
/* Does the video output require to update the menus ? */
p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( p_vout != NULL )
{
vlc_value_t val;
if( var_Get( (vlc_object_t *)p_vout, "intf-change", &val ) >= 0
&& val.b_bool )
{
p_intf->p_sys->b_vout_update = 1;
b_need_menus = 1;
}
vlc_object_release( (vlc_object_t *)p_vout );
}
if( b_need_menus )
{
GtkSetupMenus( p_intf ); GtkSetupMenus( p_intf );
} }
} }
......
...@@ -338,6 +338,100 @@ ...@@ -338,6 +338,100 @@
</widget> </widget>
</widget> </widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_config_audio</name>
<label>_Audio</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>menubar_config_audio_menu</name>
<widget>
<class>GtkMenuItem</class>
<name>menubar_volume_up</name>
<signal>
<name>activate</name>
<handler>GtkVolumeUp</handler>
<last_modification_time>Mon, 20 Jan 2003 16:30:55 GMT</last_modification_time>
</signal>
<label>Volume Up</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_volume_down</name>
<signal>
<name>activate</name>
<handler>GtkVolumeDown</handler>
<last_modification_time>Mon, 20 Jan 2003 16:30:55 GMT</last_modification_time>
</signal>
<label>Volume Down</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_volume_mute</name>
<signal>
<name>activate</name>
<handler>GtkVolumeMute</handler>
<last_modification_time>Mon, 20 Jan 2003 16:30:55 GMT</last_modification_time>
</signal>
<label>Mute</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator16</name>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_audio_channels</name>
<label>Channels</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_audio_device</name>
<label>Device</label>
<right_justify>False</right_justify>
</widget>
</widget>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_config_video_menu</name>
<label>_Video</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>menubar_config_video_menu_menu</name>
<widget>
<class>GtkMenuItem</class>
<name>menubar_video_device</name>
<label>Screen</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_deinterlace</name>
<label>Deinterlace</label>
<right_justify>False</right_justify>
</widget>
</widget>
</widget>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>menubar_help</name> <name>menubar_help</name>
...@@ -1113,12 +1207,82 @@ ...@@ -1113,12 +1207,82 @@
<right_justify>False</right_justify> <right_justify>False</right_justify>
</widget> </widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_video_device</name>
<label>Screen</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_deinterlace</name>
<label>Deinterlace</label>
<right_justify>False</right_justify>
</widget>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>separator8</name> <name>separator8</name>
<right_justify>False</right_justify> <right_justify>False</right_justify>
</widget> </widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_volume_up</name>
<signal>
<name>activate</name>
<handler>GtkVolumeUp</handler>
<last_modification_time>Mon, 20 Jan 2003 16:33:43 GMT</last_modification_time>
</signal>
<label>Volume Up</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_volume_down</name>
<signal>
<name>activate</name>
<handler>GtkVolumeDown</handler>
<last_modification_time>Mon, 20 Jan 2003 16:33:43 GMT</last_modification_time>
</signal>
<label>Volume Down</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_volume_mute</name>
<signal>
<name>activate</name>
<handler>GtkVolumeMute</handler>
<last_modification_time>Mon, 20 Jan 2003 16:33:43 GMT</last_modification_time>
</signal>
<label>Mute</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_audio_channels</name>
<label>Channels</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_audio_device</name>
<label>Device</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator17</name>
<right_justify>False</right_justify>
</widget>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>popup_next</name> <name>popup_next</name>
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc * gtk.c : Gtk+ plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.10 2003/01/03 14:44:46 sam Exp $ * $Id: gtk.c,v 1.11 2003/01/20 20:07:06 fenrir Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -111,6 +111,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -111,6 +111,11 @@ static int Open( vlc_object_t *p_this )
/* Initialize Gtk+ thread */ /* Initialize Gtk+ thread */
p_intf->p_sys->b_playing = 0; p_intf->p_sys->b_playing = 0;
p_intf->p_sys->b_deinterlace_update = 0;
p_intf->p_sys->b_aout_update = 0;
p_intf->p_sys->b_vout_update = 0;
p_intf->p_sys->b_popup_changed = 0; p_intf->p_sys->b_popup_changed = 0;
p_intf->p_sys->b_window_changed = 0; p_intf->p_sys->b_window_changed = 0;
p_intf->p_sys->b_playlist_changed = 0; p_intf->p_sys->b_playlist_changed = 0;
...@@ -126,6 +131,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -126,6 +131,7 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->i_part = 0; p_intf->p_sys->i_part = 0;
p_intf->p_sys->b_mute = 0;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -384,6 +390,9 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -384,6 +390,9 @@ static int Manage( intf_thread_t *p_intf )
if( p_intf->p_sys->p_input ) if( p_intf->p_sys->p_input )
{ {
input_thread_t *p_input = p_intf->p_sys->p_input; input_thread_t *p_input = p_intf->p_sys->p_input;
aout_instance_t *p_aout = NULL;
vout_thread_t *p_vout = NULL;
vlc_bool_t b_need_menus = VLC_FALSE;
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -436,6 +445,42 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -436,6 +445,42 @@ static int Manage( intf_thread_t *p_intf )
p_input->stream.p_selected_area->i_part ) p_input->stream.p_selected_area->i_part )
{ {
p_intf->p_sys->b_chapter_update = 1; p_intf->p_sys->b_chapter_update = 1;
b_need_menus = VLC_TRUE;
}
/* Does the audio output require to update the menus ? */
p_aout = (aout_instance_t *)vlc_object_find( p_intf, VLC_OBJECT_AOUT,
FIND_ANYWHERE );
if( p_aout != NULL )
{
vlc_value_t val;
if( var_Get( (vlc_object_t *)p_aout, "intf-change", &val ) >= 0
&& val.b_bool )
{
p_intf->p_sys->b_aout_update = 1;
b_need_menus = 1;
}
vlc_object_release( (vlc_object_t *)p_aout );
}
/* Does the video output require to update the menus ? */
p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( p_vout != NULL )
{
vlc_value_t val;
if( var_Get( (vlc_object_t *)p_vout, "intf-change", &val ) >= 0
&& val.b_bool )
{
p_intf->p_sys->b_vout_update = 1;
b_need_menus = 1;
}
vlc_object_release( (vlc_object_t *)p_vout );
}
if( b_need_menus )
{
GtkSetupMenus( p_intf ); GtkSetupMenus( p_intf );
} }
} }
......
...@@ -356,6 +356,100 @@ ...@@ -356,6 +356,100 @@
</widget> </widget>
</widget> </widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_config_audio</name>
<label>_Audio</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>menubar_config_audio_menu</name>
<widget>
<class>GtkMenuItem</class>
<name>menubar_volume_up</name>
<signal>
<name>activate</name>
<handler>GtkVolumeUp</handler>
<last_modification_time>Mon, 20 Jan 2003 10:11:53 GMT</last_modification_time>
</signal>
<label>Volume Up</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_volume_down</name>
<signal>
<name>activate</name>
<handler>GtkVolumeDown</handler>
<last_modification_time>Mon, 20 Jan 2003 10:11:53 GMT</last_modification_time>
</signal>
<label>Volume Down</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_volume_mute</name>
<signal>
<name>activate</name>
<handler>GtkVolumeMute</handler>
<last_modification_time>Mon, 20 Jan 2003 10:11:53 GMT</last_modification_time>
</signal>
<label>Mute</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator15</name>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_audio_channels</name>
<label>Channels</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_audio_device</name>
<label>Device</label>
<right_justify>False</right_justify>
</widget>
</widget>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_config_video</name>
<label>_Video</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>menubar_config_video_menu</name>
<widget>
<class>GtkMenuItem</class>
<name>menubar_video_device</name>
<label>Screen</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_deinterlace</name>
<label>Deinterlace</label>
<right_justify>False</right_justify>
</widget>
</widget>
</widget>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>menubar_help</name> <name>menubar_help</name>
...@@ -1107,12 +1201,82 @@ ...@@ -1107,12 +1201,82 @@
<right_justify>False</right_justify> <right_justify>False</right_justify>
</widget> </widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_video_device</name>
<label>Screen</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_deinterlace</name>
<label>Deinterlace</label>
<right_justify>False</right_justify>
</widget>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>separator5</name> <name>separator5</name>
<right_justify>False</right_justify> <right_justify>False</right_justify>
</widget> </widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_volume_up</name>
<signal>
<name>activate</name>
<handler>GtkVolumeUp</handler>
<last_modification_time>Mon, 20 Jan 2003 10:16:02 GMT</last_modification_time>
</signal>
<label>Volume Up</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_volume_down</name>
<signal>
<name>activate</name>
<handler>GtkVolumeDown</handler>
<last_modification_time>Mon, 20 Jan 2003 10:18:25 GMT</last_modification_time>
</signal>
<label>Volume Down</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_volume_mute</name>
<signal>
<name>activate</name>
<handler>GtkVolumeMute</handler>
<last_modification_time>Mon, 20 Jan 2003 10:18:25 GMT</last_modification_time>
</signal>
<label>Mute</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_audio_channels</name>
<label>Channels</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>popup_audio_device</name>
<label>Device</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator16</name>
<right_justify>False</right_justify>
</widget>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>popup_next</name> <name>popup_next</name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin. * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.7 2003/01/17 19:17:09 sam Exp $ * $Id: gtk_callbacks.c,v 1.8 2003/01/20 20:07:06 fenrir 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>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/intf.h> #include <vlc/intf.h>
#include <vlc/vout.h> #include <vlc/vout.h>
#include <vlc/aout.h>
#include <unistd.h> #include <unistd.h>
...@@ -568,7 +569,6 @@ gboolean GtkMessagesShow( GtkWidget *widget, ...@@ -568,7 +569,6 @@ gboolean GtkMessagesShow( GtkWidget *widget,
return TRUE; return TRUE;
} }
void void
GtkMessagesOk (GtkButton *button, GtkMessagesOk (GtkButton *button,
gpointer user_data) gpointer user_data)
...@@ -598,3 +598,95 @@ GtkOpenNotebookChanged (GtkNotebook *notebook, ...@@ -598,3 +598,95 @@ GtkOpenNotebookChanged (GtkNotebook *notebook,
GtkOpenChanged( GTK_WIDGET( notebook ), user_data ); GtkOpenChanged( GTK_WIDGET( notebook ), user_data );
} }
/****************************************************************************
* Audio management
****************************************************************************/
void GtkVolumeUp ( GtkMenuItem *menuitem,
gpointer user_data )
{
intf_thread_t *p_intf = GtkGetIntf( menuitem );
aout_instance_t *p_aout;
p_aout = vlc_object_find( p_intf, VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_aout != NULL )
{
if( p_intf->p_sys->b_mute )
{
audio_volume_t i_volume;
aout_VolumeMute( p_aout, &i_volume );
p_intf->p_sys->b_mute = ( i_volume == 0 ) ? 1 : 0;
}
aout_VolumeUp( p_aout, 1, NULL );
vlc_object_release( (vlc_object_t *)p_aout );
}
}
void GtkVolumeDown ( GtkMenuItem *menuitem,
gpointer user_data )
{
intf_thread_t *p_intf = GtkGetIntf( menuitem );
aout_instance_t *p_aout;
p_aout = vlc_object_find( p_intf, VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_aout != NULL )
{
if( p_intf->p_sys->b_mute )
{
audio_volume_t i_volume;
aout_VolumeMute( p_aout, &i_volume );
p_intf->p_sys->b_mute = ( i_volume == 0 ) ? 1 : 0;
}
aout_VolumeDown( p_aout, 1, NULL );
vlc_object_release( (vlc_object_t *)p_aout );
}
}
void GtkVolumeMute ( GtkMenuItem *menuitem,
gpointer user_data )
{
intf_thread_t *p_intf = GtkGetIntf( menuitem );
aout_instance_t *p_aout;
audio_volume_t i_volume;
p_aout = vlc_object_find( p_intf, VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( p_aout != NULL )
{
aout_VolumeMute( p_aout, &i_volume );
p_intf->p_sys->b_mute = ( i_volume == 0 ) ? 1 : 0;
vlc_object_release( (vlc_object_t *)p_aout );
}
}
void
GtkMenubarDeinterlace ( GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( menuitem );
if( p_intf )
msg_Dbg( p_intf, "GtkMenubarDeinterlace" );
}
void
GtkPopupDeinterlace (GtkRadioMenuItem *radiomenuitem,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( radiomenuitem );
if( p_intf )
msg_Dbg( p_intf, "GtkPopupDeinterlace" );
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_callbacks.h : Callbacks for the gtk plugin. * gtk_callbacks.h : Callbacks for the gtk plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.h,v 1.2 2002/09/30 11:05:39 sam Exp $ * $Id: gtk_callbacks.h,v 1.3 2003/01/20 20:07:06 fenrir 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>
...@@ -153,3 +153,24 @@ GtkFileCancel (GtkButton *button, ...@@ -153,3 +153,24 @@ GtkFileCancel (GtkButton *button,
void void
GtkClose (GtkMenuItem *menuitem, GtkClose (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
GtkVolumeUp (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkVolumeDown (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkVolumeMute (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkMenubarDeinterlace (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkPopupDeinterlace (GtkRadioMenuItem *radiomenuitem,
gpointer user_data);
This diff is collapsed.
/* /*
* This file was created automatically by glade and fixed by bootstrap.sh * This file was created automatically by glade and fixed by bootstrap
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
......
This diff is collapsed.
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