Commit 6d254dc9 authored by Loïc Minier's avatar Loïc Minier

* ./plugins/gtk/gnome.c, ./plugins/gtk/gtk.c, ./plugins/gtk/gtk_display.*:

    callbacks for the hide tooltips and toolbar text options
parent cf7a11cd
...@@ -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.19 2002/05/03 17:37:09 lool Exp $ * $Id: gnome.c,v 1.20 2002/05/04 02:05:03 lool Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -73,9 +73,9 @@ static gint GnomeManage ( gpointer p_data ); ...@@ -73,9 +73,9 @@ static gint GnomeManage ( gpointer p_data );
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_BOOL ( "gnome-notooltips", NULL, TOOLTIPS_TEXT, ADD_BOOL ( "gnome-notooltips", GtkHideTooltips, TOOLTIPS_TEXT,
TOOLTIPS_LONGTEXT ) TOOLTIPS_LONGTEXT )
ADD_BOOL ( "gnome-notoolbartext", NULL, TOOLBAR_TEXT, ADD_BOOL ( "gnome-notoolbartext", GtkHideToolbarText, TOOLBAR_TEXT,
TOOLBAR_LONGTEXT ) TOOLBAR_LONGTEXT )
ADD_INTEGER ( "gnome-prefs-maxh", 480, NULL, PREFS_MAXH_TEXT, ADD_INTEGER ( "gnome-prefs-maxh", 480, NULL, PREFS_MAXH_TEXT,
PREFS_MAXH_LONGTEXT ) PREFS_MAXH_LONGTEXT )
......
...@@ -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.20 2002/04/23 14:16:20 sam Exp $ * $Id: gtk.c,v 1.21 2002/05/04 02:05:03 lool Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -72,7 +72,8 @@ static gint GtkManage ( gpointer p_data ); ...@@ -72,7 +72,8 @@ static gint GtkManage ( gpointer p_data );
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_BOOL ( "gtk-notooltips", NULL, TOOLTIPS_TEXT, TOOLTIPS_LONGTEXT ) ADD_BOOL ( "gtk-notooltips", GtkHideTooltips, TOOLTIPS_TEXT,
TOOLTIPS_LONGTEXT )
ADD_INTEGER ( "gtk-prefs-maxh", 480, NULL, PREFS_MAXH_TEXT, ADD_INTEGER ( "gtk-prefs-maxh", 480, NULL, PREFS_MAXH_TEXT,
PREFS_MAXH_LONGTEXT ) PREFS_MAXH_LONGTEXT )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_display.c: Gtk+ tools for main interface * gtk_display.c: Gtk+ tools for main interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_display.c,v 1.20 2002/04/23 14:16:20 sam Exp $ * $Id: gtk_display.c,v 1.21 2002/05/04 02:05:03 lool 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>
...@@ -241,3 +241,39 @@ gint GtkModeManage( intf_thread_t * p_intf ) ...@@ -241,3 +241,39 @@ gint GtkModeManage( intf_thread_t * p_intf )
#undef GETWIDGET #undef GETWIDGET
return TRUE; return TRUE;
} }
/*****************************************************************************
* GtkHideTooltips: show or hide the tooltips depending on the configuration
* option gnome-notooltips
*****************************************************************************
* FIXME: we should get the intf as parameter
*****************************************************************************/
void GtkHideTooltips( void )
{
if( config_GetIntVariable( "gnome-notooltips" ) )
gtk_tooltips_disable( p_main->p_intf->p_sys->p_tooltips );
else gtk_tooltips_enable( p_main->p_intf->p_sys->p_tooltips );
}
#ifdef MODULE_NAME_IS_gnome
/*****************************************************************************
* GtkHideToolbartext: show or hide the tooltips depending on the
* configuration option gnome-notoolbartext
*****************************************************************************
* FIXME: we should get the intf as parameter
* FIXME: GNOME only because of missing icons in gtk interface
*****************************************************************************/
void GtkHideToolbarText( void )
{
GtkToolbarStyle style;
GtkToolbar * p_toolbar;
style = config_GetIntVariable( "gnome-notoolbartext" )
? GTK_TOOLBAR_ICONS
: GTK_TOOLBAR_BOTH;
p_toolbar = GTK_TOOLBAR(lookup_widget( p_main->p_intf->p_sys->p_window,
"toolbar" ));
gtk_toolbar_set_style( p_toolbar, style );
}
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_dsiplay.h: Gtk+ tools for main interface. * gtk_dsiplay.h: Gtk+ tools for main interface.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_display.h,v 1.1 2001/05/23 23:08:20 stef Exp $ * $Id: gtk_display.h,v 1.2 2002/05/04 02:05:03 lool Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr> * Stéphane Borel <stef@via.ecp.fr>
...@@ -28,5 +28,6 @@ ...@@ -28,5 +28,6 @@
gint GtkModeManage ( intf_thread_t * p_intf ); gint GtkModeManage ( intf_thread_t * p_intf );
void GtkDisplayDate ( GtkAdjustment *p_adj ); void GtkDisplayDate ( GtkAdjustment *p_adj );
void GtkHideTooltips ( void );
void GtkHideToolbarText ( void );
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