[gtk/abolish-size-allocate: 4/10] a11y: Avoid a gratitious use of ::size-allocate
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/abolish-size-allocate: 4/10] a11y: Avoid a gratitious use of ::size-allocate
- Date: Tue, 5 May 2020 16:44:12 +0000 (UTC)
commit 2e14fe5b848f8e54fab8032fc03e4db3babf25f3
Author: Matthias Clasen <mclasen redhat com>
Date: Tue May 5 12:11:05 2020 -0400
a11y: Avoid a gratitious use of ::size-allocate
The paned widget has a position property, just
use it.
gtk/a11y/gtkpanedaccessible.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtkpanedaccessible.c b/gtk/a11y/gtkpanedaccessible.c
index 48dc9e454a..de657ef217 100644
--- a/gtk/a11y/gtkpanedaccessible.c
+++ b/gtk/a11y/gtkpanedaccessible.c
@@ -27,8 +27,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkPanedAccessible, gtk_paned_accessible, GTK_TYPE_CONT
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
static void
-gtk_paned_accessible_size_allocate_gtk (GtkWidget *widget,
- GtkAllocation *allocation)
+gtk_paned_accessible_position_changed (GtkWidget *widget)
{
AtkObject *obj = gtk_widget_get_accessible (widget);
@@ -41,8 +40,8 @@ gtk_paned_accessible_initialize (AtkObject *obj,
{
ATK_OBJECT_CLASS (gtk_paned_accessible_parent_class)->initialize (obj, data);
- g_signal_connect (data, "size-allocate",
- G_CALLBACK (gtk_paned_accessible_size_allocate_gtk), NULL);
+ g_signal_connect (data, "notify::position",
+ G_CALLBACK (gtk_paned_accessible_position_changed), NULL);
obj->role = ATK_ROLE_SPLIT_PANE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]