Hi Matthias,

Minor problem picking: I thought it might be a good idea if we use g_return_val_if_fail(GTK_IS_FLOW_BOX_CHILD (child), FALSE) instead of g_return_if_fail(GTK_IS_FLOW_BOX_CHILD (child)) in gtk_flow_box_child_is_selected() when an invalid GtkFlowBoxChild* is passed in to that function, as compilers expect a gboolean to be returned to go without a warning/error for that.

Here's my simple fix for this, please let me know if this is OK to push.

With blessings, thank you!
>From 284287fdf9df81c826fcb91e1fccd245d9e547fc Mon Sep 17 00:00:00 2001
From: Chun-wei Fan <fanchun...@src.gnome.org>
Date: Mon, 7 Oct 2013 12:00:30 +0800
Subject: [PATCH] gtk/gtkflowbox: Fix build warning/error

The newly-added gtk_flow_box_child_is_selected() needed to return a
gboolean, so use g_return_val_if_fail() to return FALSE when an invalid
GtkFlowBoxChild* is passed in.
---
 gtk/gtkflowbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 34a99a3..96d57f2 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -680,7 +680,7 @@ gtk_flow_box_child_get_index (GtkFlowBoxChild *child)
 gboolean
 gtk_flow_box_child_is_selected (GtkFlowBoxChild *child)
 {
-  g_return_if_fail (GTK_IS_FLOW_BOX_CHILD (child));
+  g_return_val_if_fail (GTK_IS_FLOW_BOX_CHILD (child), FALSE);
 
   return CHILD_PRIV (child)->selected;
 }
-- 
1.8.3.msysgit.0

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to