mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
label: Stop overriding accessible label
There's no need to, the accessible name computation picks the content up where it is allowed (and not overridden by explicit attributes).
This commit is contained in:
parent
4449344fad
commit
7df9cc1b47
@ -797,11 +797,6 @@ gtk_inscription_set_text (GtkInscription *self,
|
||||
g_free (self->text);
|
||||
self->text = g_strdup (text);
|
||||
|
||||
gtk_accessible_update_property (GTK_ACCESSIBLE (self),
|
||||
GTK_ACCESSIBLE_PROPERTY_LABEL, self->text,
|
||||
-1);
|
||||
|
||||
|
||||
pango_layout_set_text (self->layout,
|
||||
self->text ? self->text : "",
|
||||
-1);
|
||||
|
@ -3067,10 +3067,6 @@ gtk_label_set_text_internal (GtkLabel *self,
|
||||
g_free (self->text);
|
||||
self->text = str;
|
||||
|
||||
gtk_accessible_update_property (GTK_ACCESSIBLE (self),
|
||||
GTK_ACCESSIBLE_PROPERTY_LABEL, self->text,
|
||||
-1);
|
||||
|
||||
gtk_label_select_region_index (self, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -45,11 +45,13 @@ label_properties (void)
|
||||
|
||||
g_object_ref_sink (label);
|
||||
|
||||
gtk_test_accessible_assert_property (label, GTK_ACCESSIBLE_PROPERTY_LABEL, "a");
|
||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||
|
||||
gtk_label_set_label (GTK_LABEL (label), "b");
|
||||
gtk_test_accessible_assert_property (GTK_ACCESSIBLE (label), GTK_ACCESSIBLE_PROPERTY_HAS_POPUP, TRUE);
|
||||
|
||||
gtk_test_accessible_assert_property (label, GTK_ACCESSIBLE_PROPERTY_LABEL, "b");
|
||||
gtk_label_set_selectable (GTK_LABEL (label), FALSE);
|
||||
|
||||
g_assert_false (gtk_test_accessible_has_property (GTK_ACCESSIBLE (label), GTK_ACCESSIBLE_PROPERTY_HAS_POPUP));
|
||||
|
||||
g_object_unref (label);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user