From fa59a16884c4c3c8da543edf4c5710397031132a Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 29 Oct 2008 15:08:49 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20558397=20=E2=80=93=20gtk=5Fwidget=5Ferror?= =?UTF-8?q?=5Fbell=20undefined=20without=20a=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings instance and return silently if unset svn path=/trunk/; revision=21725 --- ChangeLog | 7 +++++++ gtk/gtkwidget.c | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ca8d2b9c69..9da24dd9a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-29 Christian Dywan + + 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 * gdk/keyname-table.h: fix small typo. diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index df3e73ec2f..d6dcc12c3e 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -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);