[gtk+/quartz-integration: 430/563] GtkLabelAccessible: some selection handling fixes



commit e90e14f034888bd6f0b063e15509910d4b7f50e8
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 25 22:43:02 2011 -0400

    GtkLabelAccessible: some selection handling fixes
    
    Don't move the cursor to 0 when removing the selection,
    and don't overlook growing selections.

 gtk/a11y/gtklabelaccessible.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/a11y/gtklabelaccessible.c b/gtk/a11y/gtklabelaccessible.c
index 7686cfc..a770112 100644
--- a/gtk/a11y/gtklabelaccessible.c
+++ b/gtk/a11y/gtklabelaccessible.c
@@ -115,6 +115,10 @@ gtk_label_accessible_notify_gtk (GObject    *obj,
                              _gtk_label_get_cursor_position (GTK_LABEL (widget)));
       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
     GAIL_WIDGET_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec);
 }
@@ -479,7 +483,7 @@ gtk_label_accessible_remove_selection (AtkText *text,
 
   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;
     }
   else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]