[gtk+/list-selection] list box: Avoid excessive signals



commit c34a550514df169e30bac9c06401bcf7e0675057
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 29 01:03:06 2014 -0400

    list box: Avoid excessive signals
    
    We were emitting the a11y ::selection-changed signal much more
    often than ::selected-rows-changed. Thats not necessary.

 gtk/gtklistbox.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 7ad0923..36abbda 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1323,14 +1323,9 @@ static gboolean
 gtk_list_box_row_set_selected (GtkListBoxRow *row,
                                gboolean       selected)
 {
-  GtkListBox *box;
-  GtkListBoxRowPrivate *priv;
-
-  priv = gtk_list_box_row_get_instance_private (row);
-
-  if (priv->selected != selected)
+  if (ROW_PRIV (row)->selected != selected)
     {
-      priv->selected = selected;
+      ROW_PRIV (row)->selected = selected;
       if (selected)
         gtk_widget_set_state_flags (GTK_WIDGET (row),
                                     GTK_STATE_FLAG_SELECTED, FALSE);
@@ -1338,9 +1333,6 @@ gtk_list_box_row_set_selected (GtkListBoxRow *row,
         gtk_widget_unset_state_flags (GTK_WIDGET (row),
                                       GTK_STATE_FLAG_SELECTED);
 
-      box = gtk_list_box_row_get_box (row);
-      _gtk_list_box_accessible_selection_changed (box);
-
       gtk_widget_queue_draw (GTK_WIDGET (row));
 
       return TRUE;


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