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. // Utente
  54. Gtk.CellRendererText userRenderer = new Gtk.CellRendererText ();
  55. userColumn.PackStart (userRenderer, true);
  56. userColumn.AddAttribute (userRenderer, "text", 1);
  57. }
  58.  
  59. public void AddFile(Dizzy.File file)
  60. {
  61. lock (this) {
  62. // Aggiungo i valori effettivi nel liststore.
  63. fileListStore.AppendValues(file.name,
  64. file.user,
  65. file.path);
  66. }
  67. }
  68.  
  69. public void Clear ()
  70. {
  71. lock (this) {
  72. fileListStore.Clear ();
  73. }
  74. }
  75.  
  76. public void SearchInProgress ()
  77. {
  78. this.Clear ();
  79. this.AddFile (new File("Ricerca in corso...", "..."));
  80. }
  81.  
  82. public File GetFileFromPath (TreePath path)
  83. {
  84. TreeIter iter = new TreeIter ();
  85. fileListStore.GetIter(out iter, path);
  86. File f = new File((string) fileListStore.GetValue(iter, 2),
  87. (string) fileListStore.GetValue(iter, 1));
  88. return f;
  89. }
  90.  
  91. }
  92. }