Commit cf2590d6 authored by Allison Karlitskaya's avatar Allison Karlitskaya

GtkButton: do not allow both types of actions

Only allow one of 'action-name' or 'related-action' to be set.

https://bugzilla.gnome.org/show_bug.cgi?id=667394
parent 4dbd12b1
......@@ -732,6 +732,7 @@ gtk_button_set_action_name (GtkActionable *actionable,
GtkButton *button = GTK_BUTTON (actionable);
g_return_if_fail (GTK_IS_BUTTON (button));
g_return_if_fail (button->priv->action == NULL);
if (g_strcmp0 (action_name, button->priv->action_name) != 0)
{
......@@ -1041,6 +1042,8 @@ gtk_button_set_related_action (GtkButton *button,
{
GtkButtonPrivate *priv = button->priv;
g_return_if_fail (button->priv->action_name == NULL);
if (priv->action == action)
return;
......
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