cally/actor: Remove no longer useful notify_clutter vfunc
As ClutterText is the only one using that, so move the notify call there Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
This commit is contained in:
parent
d8fbaf4533
commit
fb02197b4f
3 changed files with 5 additions and 49 deletions
|
@ -110,10 +110,6 @@ static void cally_actor_get_extents (AtkComponent *component,
|
|||
static gint cally_actor_get_mdi_zorder (AtkComponent *component);
|
||||
static gboolean cally_actor_grab_focus (AtkComponent *component);
|
||||
|
||||
/* Misc functions */
|
||||
static void cally_actor_notify_clutter (GObject *obj,
|
||||
GParamSpec *pspec);
|
||||
|
||||
struct _CallyActorPrivate
|
||||
{
|
||||
GList *children;
|
||||
|
@ -165,11 +161,6 @@ cally_actor_initialize (AtkObject *obj,
|
|||
priv = cally_actor_get_instance_private (self);
|
||||
actor = CLUTTER_ACTOR (data);
|
||||
|
||||
g_signal_connect (actor,
|
||||
"notify",
|
||||
G_CALLBACK (cally_actor_notify_clutter),
|
||||
NULL);
|
||||
|
||||
g_object_set_data (G_OBJECT (obj), "atk-component-layer",
|
||||
GINT_TO_POINTER (ATK_LAYER_MDI));
|
||||
|
||||
|
@ -593,25 +584,3 @@ cally_actor_grab_focus (AtkComponent *component)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Misc functions */
|
||||
|
||||
/*
|
||||
* This function is a signal handler for notify signal which gets emitted
|
||||
* when a property changes value on the ClutterActor associated with the object.
|
||||
*
|
||||
* It calls a function for the CallyActor type
|
||||
*/
|
||||
static void
|
||||
cally_actor_notify_clutter (GObject *obj,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
CallyActor *cally_actor = NULL;
|
||||
CallyActorClass *klass = NULL;
|
||||
|
||||
cally_actor = CALLY_ACTOR (clutter_actor_get_accessible (CLUTTER_ACTOR (obj)));
|
||||
klass = CALLY_ACTOR_GET_CLASS (cally_actor);
|
||||
|
||||
if (klass->notify_clutter)
|
||||
klass->notify_clutter (obj, pspec);
|
||||
}
|
||||
|
|
|
@ -47,19 +47,10 @@ typedef struct _CallyActor CallyActor;
|
|||
typedef struct _CallyActorClass CallyActorClass;
|
||||
typedef struct _CallyActorPrivate CallyActorPrivate;
|
||||
|
||||
|
||||
/**
|
||||
* CallyActorClass:
|
||||
* @notify_clutter: Signal handler for notify signal on Clutter actor
|
||||
*/
|
||||
struct _CallyActorClass
|
||||
{
|
||||
/*< private >*/
|
||||
AtkGObjectAccessibleClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
void (*notify_clutter) (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
|
|
|
@ -141,7 +141,6 @@ static void cally_text_delete_text (AtkEditable
|
|||
gint start_pos,
|
||||
gint end_pos);
|
||||
|
||||
/* CallyActor */
|
||||
static void cally_text_notify_clutter (GObject *obj,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
@ -242,14 +241,11 @@ cally_text_class_init (CallyTextClass *klass)
|
|||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
CallyActorClass *cally_class = CALLY_ACTOR_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = cally_text_finalize;
|
||||
|
||||
class->initialize = cally_text_real_initialize;
|
||||
class->ref_state_set = cally_text_ref_state_set;
|
||||
|
||||
cally_class->notify_clutter = cally_text_notify_clutter;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -331,6 +327,11 @@ cally_text_real_initialize(AtkObject *obj,
|
|||
priv->cursor_position = clutter_text_get_cursor_position (clutter_text);
|
||||
priv->selection_bound = clutter_text_get_selection_bound (clutter_text);
|
||||
|
||||
g_signal_connect (clutter_text,
|
||||
"notify",
|
||||
G_CALLBACK (cally_text_notify_clutter),
|
||||
NULL);
|
||||
|
||||
g_signal_connect (clutter_text, "insert-text",
|
||||
G_CALLBACK (_cally_text_insert_text_cb),
|
||||
cally_text);
|
||||
|
@ -1714,7 +1715,6 @@ static void cally_text_delete_text (AtkEditableText *text,
|
|||
start_pos, end_pos);
|
||||
}
|
||||
|
||||
/* CallyActor */
|
||||
static void
|
||||
cally_text_notify_clutter (GObject *obj,
|
||||
GParamSpec *pspec)
|
||||
|
@ -1745,10 +1745,6 @@ cally_text_notify_clutter (GObject *obj,
|
|||
{
|
||||
_check_activate_action (cally_text, clutter_text);
|
||||
}
|
||||
else
|
||||
{
|
||||
CALLY_ACTOR_CLASS (cally_text_parent_class)->notify_clutter (obj, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue