[gdm] Load visible items after growing the chooser



commit 03371ff2a6cdef37ace5f90721173285a0cc4112
Author: William Jon McCann <jmccann redhat com>
Date:   Tue Jun 22 20:00:38 2010 -0400

    Load visible items after growing the chooser
    
    This fixes icons not being loaded for users if the login window
    is initially in the automatic login mode.
    (cherry picked from commit 63e9a8caa1d02beab4d21eda07dee1d9f821e0ec)

 gui/simple-greeter/gdm-chooser-widget.c |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index e25cf07..113fa88 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -923,12 +923,24 @@ _grab_focus (GtkWidget *widget)
 }
 
 static void
+queue_update_visible_items (GdmChooserWidget *widget)
+{
+        if (widget->priv->update_items_idle_id != 0) {
+                g_source_remove (widget->priv->update_items_idle_id);
+        }
+
+        widget->priv->update_items_idle_id =
+                g_timeout_add (100, (GSourceFunc) update_visible_items, widget);
+}
+
+static void
 on_grow_animation_complete (GdmScrollableWidget *scrollable_widget,
                             GdmChooserWidget    *widget)
 {
         g_assert (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWING);
         widget->priv->state = GDM_CHOOSER_WIDGET_STATE_GROWN;
         gtk_tree_view_set_enable_search (GTK_TREE_VIEW (widget->priv->items_view), TRUE);
+        queue_update_visible_items (widget);
 
         _grab_focus (GTK_WIDGET (widget));
 }
@@ -1151,6 +1163,8 @@ deactivate (GdmChooserWidget *widget)
 
         if (widget->priv->state != GDM_CHOOSER_WIDGET_STATE_GROWN) {
                 gdm_chooser_widget_grow (widget);
+        } else {
+                queue_update_visible_items (widget);
         }
 
         g_signal_emit (widget, signals[DEACTIVATED], 0);
@@ -1946,17 +1960,6 @@ on_selection_changed (GtkTreeSelection *selection,
 }
 
 static void
-queue_update_visible_items (GdmChooserWidget *widget)
-{
-        if (widget->priv->update_items_idle_id != 0) {
-                g_source_remove (widget->priv->update_items_idle_id);
-        }
-
-        widget->priv->update_items_idle_id =
-                g_timeout_add (100, (GSourceFunc) update_visible_items, widget);
-}
-
-static void
 on_adjustment_value_changed (GtkAdjustment    *adjustment,
                              GdmChooserWidget *widget)
 {



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