Bug 558397 – gtk_widget_error_bell undefined without a screen

* gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings
instance and return silently if unset

svn path=/trunk/; revision=21725
This commit is contained in:
Christian Dywan 2008-10-29 15:08:49 +00:00
parent 1e28e51c38
commit fa59a16884
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-10-29 Christian Dywan <christian@imendio.com>
Bug 558397 gtk_widget_error_bell undefined without a screen
* gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings
instance and return silently if unset
2008-10-28 Michael Natterer <mitch@imendio.com>
* gdk/keyname-table.h: fix small typo.

View File

@ -6943,11 +6943,16 @@ gtk_widget_keynav_failed (GtkWidget *widget,
void
gtk_widget_error_bell (GtkWidget *widget)
{
GtkSettings* settings;
gboolean beep;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_object_get (gtk_widget_get_settings (widget),
settings = gtk_widget_get_settings (widget);
if (!settings)
return;
g_object_get (settings,
"gtk-error-bell", &beep,
NULL);