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. // Aggiungo i valori effettivi nel liststore.
  62. fileListStore.AppendValues(file.name,
  63. file.user,
  64. file.path);
  65. }
  66.  
  67. public void Clear ()
  68. {
  69. fileListStore.Clear ();
  70. }
  71.  
  72. public File GetFileFromPath (TreePath path)
  73. {
  74. TreeIter iter = new TreeIter ();
  75. fileListStore.GetIter(out iter, path);
  76. File f = new File((string) fileListStore.GetValue(iter, 2),
  77. (string) fileListStore.GetValue(iter, 1));
  78. return f;
  79. }
  80.  
  81. }
  82. }