[latexila] Structure: add some comments



commit f433af7395a639c77c25deaaea2f556eecb02144
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Fri Jun 8 21:19:55 2012 +0200

    Structure: add some comments

 src/document_structure.vala |    6 +++++-
 src/structure.vala          |   18 +++++++++++++++++-
 src/structure_model.vala    |   10 +++++++---
 3 files changed, 29 insertions(+), 5 deletions(-)
---
diff --git a/src/document_structure.vala b/src/document_structure.vala
index 2dfe16c..20e1cbd 100644
--- a/src/document_structure.vala
+++ b/src/document_structure.vala
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright  2011 SÃbastien Wilmet
+ * Copyright  2011-2012 SÃbastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,10 @@
 
 using Gtk;
 
+// Model: structure_model.vala
+// View: structure.vala
+// Controller: document_structure.vala
+
 public class DocumentStructure : GLib.Object
 {
     private enum LowLevelType
diff --git a/src/structure.vala b/src/structure.vala
index 74c0dab..d80bba2 100644
--- a/src/structure.vala
+++ b/src/structure.vala
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright  2011 SÃbastien Wilmet
+ * Copyright  2011-2012 SÃbastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,22 @@
 
 using Gtk;
 
+// Model: structure_model.vala
+// View: structure.vala
+// Controller: document_structure.vala
+
+// Little overview:
+//
+// The complete structure of a file is displayed in a tree.
+// There are also "simple lists" that displays only one or several types of items.
+// When an element in the simple list is selected, the corresponding element in the tree
+// is also selected, and inversely.
+// When an item is selected, the cursor in the file is moved to the item.
+// Some actions are possible on the items. These actions are located in the Structure
+// menu, or simply by a right click on the item.
+// There is a mini-toolbar, with buttons to choose the simple list, and some other
+// actions like refresh the data.
+
 public enum StructType
 {
     // First part: must be exactly the same as the first part of LowLevelType
diff --git a/src/structure_model.vala b/src/structure_model.vala
index c721b5f..a680953 100644
--- a/src/structure_model.vala
+++ b/src/structure_model.vala
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright  2011 SÃbastien Wilmet
+ * Copyright  2011-2012 SÃbastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,10 @@
 
 using Gtk;
 
+// Model: structure_model.vala
+// View: structure.vala
+// Controller: document_structure.vala
+
 public struct StructData
 {
     StructType type;
@@ -740,8 +744,8 @@ public class StructureModel : TreeModel, GLib.Object
             store.set (iter,
                 StructListColumn.PIXBUF, Structure.get_icon_from_type (data.type),
                 StructListColumn.TEXT, data.text,
-                StructListColumn.TOOLTIP, Structure.get_type_name (data.type),
-                -1);
+                StructListColumn.TOOLTIP, Structure.get_type_name (data.type)
+            );
         }
     }
 



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