[longomatch] Add some documentation and remove useless event from RemoveProjects.



commit b7822e701fc344763419dc0aae3604ae389c48e6
Author: Julien Moutte <julien fluendo com>
Date:   Mon Mar 16 12:55:22 2015 +0100

    Add some documentation and remove useless event from RemoveProjects.
    
    When refilling the model with our updated list the first item will be selected and event will be sent.

 LongoMatch.GUI/Gui/Component/ProjectListWidget.cs |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs 
b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
index 83c217a..a083d5a 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
@@ -125,17 +125,23 @@ namespace LongoMatch.Gui.Component
                        treeview.SetCursor (new TreePath ("0"), null, false);
                }
 
+               /// <summary>
+               /// Removes the provided projects from the list. Matching is done using the project 
description instance, not the project ID.
+               /// </summary>
+               /// <param name="projects">List of project description to remove.</param>
                public void RemoveProjects (List<ProjectDescription> projects)
                {
                        foreach (ProjectDescription project in projects) {
                                this.projects.Remove (project);
                        }
+                       // Regenerate our list, this will trigger selected event for the first item.
                        Fill (this.projects);
-                       if (ProjectsSelected != null) {
-                               ProjectsSelected (new List<ProjectDescription> ());
-                       }
                }
 
+               /// <summary>
+               /// Updates the project description with a matching ID to the new description.
+               /// </summary>
+               /// <param name="description">Project Description.</param>
                public void UpdateProject (ProjectDescription description)
                {
                        TreeIter first;


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