[gdm/multi-stack: 19/35] task list fix



commit 0ab0df98418eba43fef7e743aec063bd6a3889d5
Author: Ray Strode <rstrode redhat com>
Date:   Fri Aug 6 11:13:10 2010 -0400

    task list fix

 gui/simple-greeter/gdm-task-list.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-task-list.c b/gui/simple-greeter/gdm-task-list.c
index 5fdc2b8..3e49fb7 100644
--- a/gui/simple-greeter/gdm-task-list.c
+++ b/gui/simple-greeter/gdm-task-list.c
@@ -68,7 +68,6 @@ on_task_toggled (GdmTaskList    *widget,
         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) {
 
                 GList     *task_node;
-
                 /* Sort the list such that the tasks the user clicks last end
                  * up first.  This doesn't change the order in which the tasks
                  * appear in the UI, but will affect which tasks we implicitly
@@ -135,7 +134,6 @@ activate_first_available_task (GdmTaskList *task_list)
 
                 node = node->next;
         }
-
 }
 
 static void
@@ -218,8 +216,15 @@ gdm_task_list_remove_task (GdmTaskList *task_list,
                            GdmTask     *task)
 {
         GtkWidget *button;
+        GList     *node;
+
+        node = g_list_find (task_list->priv->tasks, task);
+
+        if (node == NULL) {
+                return;
+        }
 
-        task_list->priv->tasks = g_list_remove (task_list->priv->tasks, task);
+        task_list->priv->tasks = g_list_delete_link (task_list->priv->tasks, node);
 
         button = g_object_get_data (G_OBJECT (task), "gdm-task-list-button");
 



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