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 System;
  2. using Gtk;
  3. using Dizzy;
  4.  
  5. public partial class MainWindow : Gtk.Window
  6. {
  7.  
  8. Protocol protocol;
  9. FileTreeView files;
  10. TaskTreeView tasks;
  11. GlobalConfig config;
  12.  
  13. public MainWindow (ref GlobalConfig config) : base(Gtk.WindowType.Toplevel)
  14. {
  15.  
  16. Build ();
  17. this.config = config;
  18.  
  19. // Inizializziamo la vista dei file.
  20. files = new Dizzy.FileTreeView (filelist);
  21.  
  22. // .. e anche quella dei download
  23. tasks = new Dizzy.TaskTreeView (tasklist);
  24.  
  25. // Carichiamo qualche impostazione di default
  26. string downloadpath = config.GetValue("download_folder");
  27. if (downloadpath != "")
  28. downloadpathchooser.SetFilename(downloadpath);
  29.  
  30. this.protocol = new Protocol (ref config);
  31. }
  32.  
  33.  
  34. protected void OnDeleteEvent (object sender, DeleteEventArgs a)
  35. {
  36. protocol.Disconnect ();
  37. Application.Quit ();
  38.  
  39. // Questo è molto grezzo ma è effettivamente l'unico metodo per uscire
  40. // per il momento.
  41. this.Destroy ();
  42. a.RetVal = true;
  43. }
  44.  
  45. protected virtual void OnSearchRequested (object sender, System.EventArgs e)
  46. {
  47. this.protocol.Search(searchBox.Text, ref this.files);
  48. }
  49.  
  50. protected virtual void OnRowActivated (object o, Gtk.RowActivatedArgs args)
  51. {
  52. Console.WriteLine("row_activated called");
  53. File f = this.files.GetFileFromPath (args.Path);
  54. // this.tasks.AddTask (f.name, 24);
  55. string download_folder = this.downloadpathchooser.Filename;
  56. this.protocol.Download(f, ref tasks, download_folder);
  57.  
  58. }
  59.  
  60. protected virtual void OnDownloadPathSelectionChanged (object sender, System.EventArgs e)
  61. {
  62. config.InsertValue("download_folder", downloadpathchooser.Filename);
  63. }
  64.  
  65.  
  66. }