[libwnck: 14/17] tasklist: Clarify difference between reset & stop glow in code



commit 80016110082b03efe9745f49099b131550c87f10
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jan 19 00:36:35 2011 +0100

    tasklist: Clarify difference between reset & stop glow in code

 libwnck/tasklist.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 740618a..705d548 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -504,11 +504,20 @@ wnck_task_queue_glow (WnckTask *task)
 static void
 wnck_task_stop_glow (WnckTask *task)
 {
+  /* We stop glowing, but we might still have the task colored,
+   * so we don't reset the glow factor */
   if (task->button_glow != 0)
     g_source_remove (task->button_glow);
 }
 
 static void
+wnck_task_reset_glow (WnckTask *task)
+{
+  wnck_task_stop_glow (task);
+  task->glow_factor = 0.0;
+}
+
+static void
 wnck_task_finalize (GObject *object)
 {
   WnckTask *task;
@@ -3249,8 +3258,7 @@ wnck_task_update_visible_state (WnckTask *task)
       else
         {
           _make_gtk_label_normal ((GTK_LABEL (task->label)));
-          wnck_task_stop_glow (task);
-          task->glow_factor = 0.0;
+          wnck_task_reset_glow (task);
         }
       g_free (text);
     }
@@ -3906,7 +3914,6 @@ wnck_task_draw (GtkWidget *widget,
   return FALSE;
 }
 
-
 static gint
 wnck_task_compare_alphabetically (gconstpointer a,
                                   gconstpointer b)



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