[Xfce4-commits] [apps/xfce4-taskmanager] 18/20: Rework the way model is iterated through (bug 14401)

noreply at xfce.org noreply at xfce.org
Wed May 30 22:00:32 CEST 2018


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-taskmanager.

commit f51c2b18f7462d9c258ad6b86cf0e02ee4a45d14
Author: rim <rozhuk.im at gmail.com>
Date:   Wed May 30 21:56:48 2018 +0200

    Rework the way model is iterated through (bug 14401)
---
 src/task-manager.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/task-manager.c b/src/task-manager.c
index 64d19bd..8c4ceaf 100644
--- a/src/task-manager.c
+++ b/src/task-manager.c
@@ -395,10 +395,10 @@ xtm_task_manager_update_model (XtmTaskManager *manager)
 		Task *task, *task_new;
 		GtkTreeIter cur_iter = iter;
 
-		gtk_tree_model_get (manager->model, &iter, XTM_PTV_COLUMN_CPU_STR, &cpu_str, XTM_PTV_COLUMN_TIMESTAMP, &old_timestamp, XTM_PTV_COLUMN_PID, &pid, -1);
+		valid = gtk_tree_model_iter_next (manager->model, &iter);
+		gtk_tree_model_get (manager->model, &cur_iter, XTM_PTV_COLUMN_CPU_STR, &cpu_str, XTM_PTV_COLUMN_TIMESTAMP, &old_timestamp, XTM_PTV_COLUMN_PID, &pid, -1);
 		found = (g_strcmp0 (cpu_str, "-") == 0);
 		g_free (cpu_str);
-		valid = gtk_tree_model_iter_next (manager->model, &iter);
 		if (found && (timestamp - old_timestamp) > TIMESTAMP_DELTA)
 		{
 			G_DEBUG_FMT ("Remove old task %d", pid);
@@ -446,7 +446,7 @@ xtm_task_manager_update_model (XtmTaskManager *manager)
 			}
 			g_free (color);
 		}
-		
+
 		if (need_update)
 		{
 			model_update_tree_iter (manager, &cur_iter, timestamp, update_cmd_line, task);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list