[Xfce4-commits] [apps/xfce4-taskmanager] 14/21: Try to fix selection for identified windows in tree

noreply at xfce.org noreply at xfce.org
Thu Jan 26 22:59:18 CET 2017


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

ochosi pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 774a8bd8b4ed4f65f4f3170dd2a934d516e3d7c2
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu Jan 26 01:14:29 2017 +0100

    Try to fix selection for identified windows in tree
---
 src/process-tree-view.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/src/process-tree-view.c b/src/process-tree-view.c
index 0687048..e8745c0 100644
--- a/src/process-tree-view.c
+++ b/src/process-tree-view.c
@@ -799,6 +799,28 @@ xtm_process_tree_view_highlight_pid (XtmProcessTreeView *treeview, guint pid) {
 			gtk_tree_path_free (path);
 			break;
 		}
-		valid = gtk_tree_model_iter_next (model, &iter);
+
+		if (tree && gtk_tree_model_iter_has_child (model, &iter))
+		{
+			GtkTreeIter	parent_iter = iter;
+
+			valid = gtk_tree_model_iter_children (model, &iter, &parent_iter);
+		}
+		else if (tree && !gtk_tree_model_iter_has_child (model, &iter))
+		{
+			GtkTreeIter	child_iter = iter;
+
+			if (!gtk_tree_model_iter_next (model, &iter))
+			{
+				gtk_tree_model_iter_parent (model, &iter, &child_iter);
+				gtk_tree_model_iter_next (model, &iter);
+			}
+			else
+				valid = TRUE;
+		}
+		else
+		{
+			valid = gtk_tree_model_iter_next (model, &iter);
+		}
 	}
 }

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


More information about the Xfce4-commits mailing list