summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yelavich <[email protected]>2017-01-27 16:32:02 +1100
committermonsta <[email protected]>2017-02-16 16:50:33 +0300
commitf2c26527f2c8b66b86becfebb81dd85cd3976d5b (patch)
tree172d1b8433d132d7948c4c0347c6d867c9b3b2a9
parent4981de2a26e95a11e2fcb22f8d9b39bd538dd6c0 (diff)
downloadcaja-f2c26527f2c8b66b86becfebb81dd85cd3976d5b.tar.bz2
caja-f2c26527f2c8b66b86becfebb81dd85cd3976d5b.tar.xz
Use ATK_STATE_SELECTED and ATK_STATE_FOCUSED appropriately for highlight property changes
-rw-r--r--libcaja-private/caja-icon-canvas-item.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
index 14bd2db3..f5e40cd2 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -377,9 +377,11 @@ caja_icon_canvas_item_set_property (GObject *object,
{
CajaIconCanvasItem *item;
CajaIconCanvasItemDetails *details;
+ AtkObject *accessible;
item = CAJA_ICON_CANVAS_ITEM (object);
details = item->details;
+ accessible = atk_gobject_accessible_for_object (G_OBJECT (item));
switch (property_id)
{
@@ -395,11 +397,8 @@ caja_icon_canvas_item_set_property (GObject *object,
details->editable_text = g_strdup (g_value_get_string (value));
if (details->text_util)
{
- AtkObject *accessible;
-
gail_text_util_text_setup (details->text_util,
details->editable_text);
- accessible = atk_gobject_accessible_for_object (G_OBJECT (item));
g_object_notify (G_OBJECT(accessible), "accessible-name");
}
@@ -436,6 +435,9 @@ caja_icon_canvas_item_set_property (GObject *object,
}
details->is_highlighted_for_selection = g_value_get_boolean (value);
caja_icon_canvas_item_invalidate_label_size (item);
+
+ atk_object_notify_state_change (accessible, ATK_STATE_SELECTED,
+ details->is_highlighted_for_selection);
break;
case PROP_HIGHLIGHTED_AS_KEYBOARD_FOCUS:
@@ -444,12 +446,8 @@ caja_icon_canvas_item_set_property (GObject *object,
return;
}
details->is_highlighted_as_keyboard_focus = g_value_get_boolean (value);
-
- if (details->is_highlighted_as_keyboard_focus)
- {
- AtkObject *atk_object = atk_gobject_accessible_for_object (object);
- atk_focus_tracker_notify (atk_object);
- }
+ atk_object_notify_state_change (accessible, ATK_STATE_FOCUSED,
+ details->is_highlighted_as_keyboard_focus);
break;
case PROP_HIGHLIGHTED_FOR_DROP: