Commit 80dbbdef authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/gui/gtk/display.c: changed the configuration callbacks so that

    all instances of a module get changed when options such as gtk-tooltips
    or gnome-toolbartext are toggled.
parent a3412c81
...@@ -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.2 2002/08/08 22:28:22 sam Exp $ * $Id: display.c,v 1.3 2002/08/20 21:10:48 sam 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>
...@@ -237,24 +237,32 @@ gint GtkModeManage( intf_thread_t * p_intf ) ...@@ -237,24 +237,32 @@ gint GtkModeManage( intf_thread_t * p_intf )
*****************************************************************************/ *****************************************************************************/
void GtkHideTooltips( vlc_object_t *p_this ) void GtkHideTooltips( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = vlc_object_find( p_this, VLC_OBJECT_INTF, intf_thread_t **pp_intf;
FIND_ANYWHERE ); vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
FIND_ANYWHERE );
if( !p_intf ) vlc_bool_t b_enable = config_GetInt( p_this, "gnome-tooltips" );
{
return;
}
if( config_GetInt( p_this, "gnome-tooltips" ) ) for( pp_intf = (intf_thread_t **)p_list->pp_objects ;
{ *pp_intf ;
gtk_tooltips_enable( p_intf->p_sys->p_tooltips ); pp_intf++ )
}
else
{ {
gtk_tooltips_disable( p_intf->p_sys->p_tooltips ); if( strcmp( MODULE_STRING, (*pp_intf)->p_module->psz_object_name ) )
{
continue;
}
if( b_enable )
{
gtk_tooltips_enable( (*pp_intf)->p_sys->p_tooltips );
}
else
{
gtk_tooltips_disable( (*pp_intf)->p_sys->p_tooltips );
}
} }
vlc_object_release( p_intf ); vlc_list_release( p_list );
} }
#ifdef MODULE_NAME_IS_gnome #ifdef MODULE_NAME_IS_gnome
...@@ -268,23 +276,28 @@ void GtkHideToolbarText( vlc_object_t *p_this ) ...@@ -268,23 +276,28 @@ void GtkHideToolbarText( vlc_object_t *p_this )
{ {
GtkToolbarStyle style; GtkToolbarStyle style;
GtkToolbar * p_toolbar; GtkToolbar * p_toolbar;
intf_thread_t **pp_intf;
intf_thread_t *p_intf = vlc_object_find( p_this, VLC_OBJECT_INTF, vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( !p_intf )
{
return;
}
style = config_GetInt( p_this, "gnome-toolbartext" ) style = config_GetInt( p_this, "gnome-toolbartext" )
? GTK_TOOLBAR_BOTH ? GTK_TOOLBAR_BOTH
: GTK_TOOLBAR_ICONS; : GTK_TOOLBAR_ICONS;
p_toolbar = GTK_TOOLBAR(lookup_widget( p_intf->p_sys->p_window, for( pp_intf = (intf_thread_t **)p_list->pp_objects ;
"toolbar" )); *pp_intf ;
gtk_toolbar_set_style( p_toolbar, style ); pp_intf++ )
{
if( strcmp( MODULE_STRING, (*pp_intf)->p_module->psz_object_name ) )
{
continue;
}
p_toolbar = GTK_TOOLBAR(lookup_widget( (*pp_intf)->p_sys->p_window,
"toolbar" ));
gtk_toolbar_set_style( p_toolbar, style );
}
vlc_object_release( p_intf ); vlc_list_release( p_list );
} }
#endif #endif
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