summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yelavich <[email protected]>2017-01-27 16:32:02 +1100
committerLuke Yelavich <[email protected]>2017-01-27 16:32:02 +1100
commitdc5804d64a1f811decab45dabe6867d20d59c577 (patch)
treed13f210fde184f1467d2fa4ae33f369d300e90fa
parent236546c7b27634831f8724cf05c353ee1500da75 (diff)
downloadcaja-dc5804d64a1f811decab45dabe6867d20d59c577.tar.bz2
caja-dc5804d64a1f811decab45dabe6867d20d59c577.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 4eb7f1c0..fa80001f 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -357,9 +357,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)
{
@@ -375,11 +377,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");
}
@@ -416,6 +415,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:
@@ -424,12 +426,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: