[gtk/gtk-3-24: 1/2] menu: Fix accel-group property reset
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] menu: Fix accel-group property reset
- Date: Sat, 23 Feb 2019 12:11:05 +0000 (UTC)
commit d6840ad3dd2df317731b13f6b55a75866a4c71ab
Author: Martin Blanchard <tchaik gmx com>
Date: Sat Feb 9 16:16:01 2019 +0000
menu: Fix accel-group property reset
GtkMenu's "accel-group" property setter, gtk_menu_set_accel_group(),
currently returns in failure if the caller passes it a NULL `accel_group`
argument. This argument is annotated with `(allow-none)`. This patch
add support for the NULL case.
gtk/gtkmenu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 772e6a9662..f12deb52ff 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2681,7 +2681,7 @@ gtk_menu_set_accel_group (GtkMenu *menu,
GtkMenuPrivate *priv;
g_return_if_fail (GTK_IS_MENU (menu));
- g_return_if_fail (GTK_IS_ACCEL_GROUP (accel_group));
+ g_return_if_fail (!accel_group || GTK_IS_ACCEL_GROUP (accel_group));
priv = menu->priv;
@@ -2822,7 +2822,7 @@ _gtk_menu_refresh_accel_paths (GtkMenu *menu,
{
GtkMenuPrivate *priv = menu->priv;
- if (priv->accel_path && priv->accel_group)
+ if (priv->accel_path)
{
AccelPropagation prop;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]