viewgit/index.php:465 Only variables should be passed by reference [2048]

viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]

  1. using Gtk;
  2. using System;
  3.  
  4. namespace Dizzy
  5. {
  6.  
  7.  
  8. public class FileTreeView
  9. {
  10.  
  11. // La treeview passataci dalla grafica
  12. Gtk.TreeView tree;
  13.  
  14. // Le colonne che ci servono
  15. Gtk.TreeViewColumn filenameColumn;
  16. Gtk.TreeViewColumn userColumn;
  17.  
  18. // La listStore per memorizzare i file
  19. // che troviamo.
  20. Gtk.ListStore fileListStore;
  21.  
  22. public FileTreeView (Gtk.TreeView tree)
  23. {
  24. // Costruisco la ListStore e popolo di colonne
  25. // la TreeView
  26. this.tree = tree;
  27. this.filenameColumn = new Gtk.TreeViewColumn ();
  28. filenameColumn.Title = "Nome del file";
  29.  
  30.  
  31. this.userColumn = new Gtk.TreeViewColumn ();
  32. userColumn.Title = "Utente";
  33.  
  34. this.tree.AppendColumn (filenameColumn);
  35. this.tree.AppendColumn (userColumn);
  36.  
  37. this.fileListStore = new Gtk.ListStore (typeof(string), // Nome del file
  38. typeof(string), // Utente
  39. typeof(string));// Path del file.
  40.  
  41. this.tree.Model = fileListStore;
  42. CellSetup ();
  43.  
  44. }
  45.  
  46. protected void CellSetup()
  47. {
  48. // Filename
  49. Gtk.CellRendererText filenameRenderer = new Gtk.CellRendererText ();
  50. filenameColumn.PackStart (filenameRenderer, true);
  51. filenameColumn.AddAttribute (filenameRenderer, "text", 0);
  52.  
  53.  
  54. // Utente
  55. Gtk.CellRendererText userRenderer = new Gtk.CellRendererText ();
  56. userColumn.PackStart (userRenderer, true);
  57. userColumn.AddAttribute (userRenderer, "text", 1);
  58. }
  59.  
  60. public void AddFile(Dizzy.File file)
  61. {
  62. // Aggiungo i valori effettivi nel liststore.
  63. fileListStore.AppendValues(file.name,
  64. file.user,
  65. file.path);
  66. }
  67.  
  68. public void Clear ()
  69. {
  70. fileListStore.Clear ();
  71. }
  72.  
  73. public File GetFileFromPath (TreePath path)
  74. {
  75. TreeIter iter = new TreeIter ();
  76. fileListStore.GetIter(out iter, path);
  77. File f = new File((string) fileListStore.GetValue(iter, 2),
  78. (string) fileListStore.GetValue(iter, 1));
  79. return f;
  80. }
  81.  
  82. }
  83. }