mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
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
This commit is contained in:
parent
06c8e8fa43
commit
af49dd33cf
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user