Commit 0e4d9b77 authored by Jehan's avatar Jehan

gtkdialog - more informative warning when ordering unexisting response_id

parent c177fd23
......@@ -1219,7 +1219,11 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog,
{
/* reorder child with response_id to position */
child = dialog_find_button (dialog, response_id);
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
if (child != NULL)
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
else
g_warning ("%s : no child button with response id %d.", G_STRFUNC,
response_id);
response_id = va_arg (args, gint);
position++;
......@@ -1330,7 +1334,11 @@ gtk_dialog_set_alternative_button_order_from_array (GtkDialog *dialog,
{
/* reorder child with response_id to position */
child = dialog_find_button (dialog, new_order[position]);
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
if (child != NULL)
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
else
g_warning ("%s : no child button with response id %d.", G_STRFUNC,
new_order[position]);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment