Merge branch 'ebassi/for-master' into 'master'

Ebassi/for master

Closes #3404 and #3403

See merge request GNOME/gtk!2890
This commit is contained in:
Emmanuele Bassi 2020-11-25 18:43:53 +00:00
commit 3a5f8b6192
2 changed files with 12 additions and 0 deletions

View File

@ -1132,6 +1132,8 @@ gtk_atspi_disconnect_selection_signals (GtkAccessible *accessible)
SelectionChanged *changed;
changed = g_object_get_data (G_OBJECT (accessible), "accessible-selection-data");
if (changed == NULL)
return;
g_signal_handlers_disconnect_by_func (accessible, changed->changed, changed->data);
@ -1143,6 +1145,8 @@ gtk_atspi_disconnect_selection_signals (GtkAccessible *accessible)
SelectionChanged *changed;
changed = g_object_get_data (G_OBJECT (accessible), "accessible-selection-data");
if (changed == NULL)
return;
g_signal_handlers_disconnect_by_func (notebook, changed->changed, changed->data);

View File

@ -1526,9 +1526,15 @@ gtk_atspi_connect_text_signals (GtkAccessible *accessible,
void
gtk_atspi_disconnect_text_signals (GtkAccessible *accessible)
{
if (!GTK_IS_EDITABLE (accessible) &&
!GTK_IS_TEXT_VIEW (accessible))
return;
TextChanged *changed;
changed = g_object_get_data (G_OBJECT (accessible), "accessible-text-data");
if (changed == NULL)
return;
if (GTK_IS_EDITABLE (accessible))
{
@ -1544,6 +1550,7 @@ gtk_atspi_disconnect_text_signals (GtkAccessible *accessible)
else if (GTK_IS_TEXT_VIEW (accessible))
{
g_signal_handlers_disconnect_by_func (accessible, buffer_changed, changed);
if (changed->buffer)
{
g_signal_handlers_disconnect_by_func (changed->buffer, insert_range_cb, changed);
@ -1551,6 +1558,7 @@ gtk_atspi_disconnect_text_signals (GtkAccessible *accessible)
g_signal_handlers_disconnect_by_func (changed->buffer, delete_range_after_cb, changed);
g_signal_handlers_disconnect_by_func (changed->buffer, mark_set_cb, changed);
}
g_clear_object (&changed->buffer);
}