Commit 262e5986 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

GtkLabelAccessible: some selection handling fixes

Don't move the cursor to 0 when removing the selection,
and don't overlook growing selections.
parent 3e84cc9b
...@@ -115,6 +115,10 @@ gtk_label_accessible_notify_gtk (GObject *obj, ...@@ -115,6 +115,10 @@ gtk_label_accessible_notify_gtk (GObject *obj,
_gtk_label_get_cursor_position (GTK_LABEL (widget))); _gtk_label_get_cursor_position (GTK_LABEL (widget)));
g_signal_emit_by_name (atk_obj, "text_selection_changed"); g_signal_emit_by_name (atk_obj, "text_selection_changed");
} }
else if (strcmp (pspec->name, "selection-bound") == 0)
{
g_signal_emit_by_name (atk_obj, "text_selection_changed");
}
else else
GAIL_WIDGET_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec); GAIL_WIDGET_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec);
} }
...@@ -479,7 +483,7 @@ gtk_label_accessible_remove_selection (AtkText *text, ...@@ -479,7 +483,7 @@ gtk_label_accessible_remove_selection (AtkText *text,
if (gtk_label_get_selection_bounds (label, &start, &end)) if (gtk_label_get_selection_bounds (label, &start, &end))
{ {
gtk_label_select_region (label, 0, 0); gtk_label_select_region (label, end, end);
return TRUE; return TRUE;
} }
else else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment