[gtk/gtk-3-24: 1/2] flowbox: children per line may not be 0
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] flowbox: children per line may not be 0
- Date: Sat, 30 Mar 2019 12:27:35 +0000 (UTC)
commit cd4b6a77a4a6c1f3bc0df8dc7354dcc13e238f5a
Author: Benjamin Otte <otte redhat com>
Date: Sat Nov 12 22:57:31 2016 +0100
flowbox: children per line may not be 0
gtk/gtkflowbox.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index e5414d4c2e..6aa3380652 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -3880,7 +3880,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("Maximum Children Per Line"),
P_("The maximum amount of children to request space for "
"consecutively in the given orientation."),
- 0, G_MAXUINT, DEFAULT_MAX_CHILDREN_PER_LINE,
+ 1, G_MAXUINT, DEFAULT_MAX_CHILDREN_PER_LINE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
@@ -4715,6 +4715,7 @@ gtk_flow_box_set_max_children_per_line (GtkFlowBox *box,
guint n_children)
{
g_return_if_fail (GTK_IS_FLOW_BOX (box));
+ g_return_if_fail (n_children > 0);
if (BOX_PRIV (box)->max_children_per_line != n_children)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]