summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-04-24 19:58:22 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-04-24 19:58:22 -0400
commitaf49dd33cfd0be2ea29620d8ceafd7004be1de99 (patch)
tree4dfdce1e71f7fa2a8aaf82bc364201d77e77d458 /gtk/gtknotebook.c
parent06c8e8fa436a851a4f1ac35ec29c92096a345dcb (diff)
downloadgtk+-af49dd33cfd0be2ea29620d8ceafd7004be1de99.tar.gz
GtkNotebook: Consistent boolean handling
Normalize boolean parameters in gtk_notebook_set_tab_reorderable and gtk_notebook_set_tab_detachable before comparing them. Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=697196
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 2ac7936af3..8e968657fc 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -8176,9 +8176,11 @@ gtk_notebook_set_tab_reorderable (GtkNotebook *notebook,
if (!list)
return;
+ reorderable = reorderable != FALSE;
+
if (GTK_NOTEBOOK_PAGE (list)->reorderable != reorderable)
{
- GTK_NOTEBOOK_PAGE (list)->reorderable = (reorderable == TRUE);
+ GTK_NOTEBOOK_PAGE (list)->reorderable = reorderable;
gtk_widget_child_notify (child, "reorderable");
}
}
@@ -8269,9 +8271,11 @@ gtk_notebook_set_tab_detachable (GtkNotebook *notebook,
if (!list)
return;
+ detachable = detachable != FALSE;
+
if (GTK_NOTEBOOK_PAGE (list)->detachable != detachable)
{
- GTK_NOTEBOOK_PAGE (list)->detachable = (detachable == TRUE);
+ GTK_NOTEBOOK_PAGE (list)->detachable = detachable;
gtk_widget_child_notify (child, "detachable");
}
}