widget: remove check on whether the controller was already added

Multiple calls are supposedly allowed to change the phase (although
unlikely to happen), so remove the g_return_if_fail() checking whether
the controller was already added.
This commit is contained in:
Carlos Garnacho 2014-05-16 18:34:15 +02:00
parent bd68db4b25
commit 57eca4f445

View File

@ -16833,7 +16833,6 @@ _gtk_widget_add_controller (GtkWidget *widget,
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_IS_EVENT_CONTROLLER (controller));
g_return_if_fail (widget == gtk_event_controller_get_widget (controller));
g_return_if_fail (!_gtk_widget_has_controller (widget, controller));
g_return_if_fail (phase >= GTK_PHASE_NONE && phase <= GTK_PHASE_TARGET);
priv = widget->priv;