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.  
  10. public MainWindow () : base(Gtk.WindowType.Toplevel)
  11. {
  12.  
  13. Build ();
  14. GlobalConfig.authenticated = false;
  15.  
  16. // Inizializziamo la vista dei file.
  17. /* files = new Dizzy.FileTreeView (filelist);
  18. EventManager.RegisterFileTreeView (files); */
  19. EventManager.fileTreeView = new Dizzy.FileTreeView (filelist);
  20.  
  21. // .. e anche quella dei download
  22. /* tasks = new Dizzy.TaskTreeView (tasklist);
  23. EventManager.RegisterTaskTreeView (tasks); */
  24. EventManager.taskTreeView = new Dizzy.TaskTreeView (tasklist);
  25.  
  26.  
  27. // Carichiamo qualche impostazione di default
  28. string downloadpath = GlobalConfig.GetValue("download_folder");
  29. if (downloadpath != "")
  30. downloadpathchooser.SetFilename(downloadpath);
  31.  
  32.  
  33.  
  34. this.protocol = new Protocol ();
  35.  
  36. Log.StatusBarUpdate += this.OnStatusBarUpdate;
  37.  
  38. }
  39.  
  40. public void OnStatusBarUpdate (string message)
  41. {
  42. dizzystatus.Push(0, message);
  43. }
  44.  
  45. protected void OnDeleteEvent (object sender, DeleteEventArgs a)
  46. {
  47. if (protocol != null)
  48. {
  49. Log.Info ("Calling Protocol.Disconnect ()");
  50. protocol.Disconnect ();
  51. }
  52.  
  53. Application.Quit ();
  54.  
  55. // Questo è molto grezzo ma è effettivamente l'unico metodo per uscire
  56. // per il momento.
  57. this.Destroy ();
  58. a.RetVal = true;
  59. }
  60.  
  61. protected virtual void OnSearchRequested (object sender, System.EventArgs e)
  62. {
  63. Search ();
  64. }
  65.  
  66. protected void Search ()
  67. {
  68. EventManager.FileTreeViewClear ();
  69. this.protocol.Search (searchBox.Text, searchUserBox.Text, typeBox.ActiveText);
  70. }
  71.  
  72. protected virtual void OnRowActivated (object o, Gtk.RowActivatedArgs args)
  73. {
  74.  
  75. File f = EventManager.fileTreeView.GetFileFromPath (args.Path);
  76.  
  77. string download_folder = this.downloadpathchooser.Filename;
  78.  
  79. this.protocol.Download(f, download_folder);
  80.  
  81. }
  82.  
  83. protected virtual void OnDownloadPathSelectionChanged (object sender, System.EventArgs e)
  84. {
  85. GlobalConfig.InsertValue("download_folder", downloadpathchooser.Filename);
  86. }
  87.  
  88. protected virtual void OnListUpdateRequired (object sender, System.EventArgs e)
  89. {
  90. this.protocol.UpdateFileList ();
  91. }
  92.  
  93. protected virtual void OnDisconnectionRequested (object sender, System.EventArgs e)
  94. {
  95. GlobalConfig.authenticated = false;
  96. }
  97.  
  98. protected virtual void OnUploadRequested (object sender, System.EventArgs e)
  99. {
  100. // Come prima cosa otteniamo il file che il povero utente desidera
  101. // caricare sul server.
  102.  
  103. this.protocol.Upload(uploadChooserButton.Filename);
  104.  
  105. }
  106.  
  107.  
  108. protected virtual void OnTasklistCursorChanged (object sender, System.EventArgs e)
  109. {
  110. if (tasklist.Selection != null)
  111. blockTransfer.Sensitive = true;
  112. else
  113. blockTransfer.Sensitive = false;
  114. }
  115.  
  116. protected virtual void OnBlockTransferClicked (object sender, System.EventArgs e)
  117. {
  118. // Dobbiamo determinare che trasferimento bloccare
  119. TreePath path;
  120. path = EventManager.taskTreeView.GetActivePath ();
  121. string GUID = EventManager.GetGUID (path);
  122. this.protocol.DisconnectPath (GUID);
  123. }
  124.  
  125. protected virtual void OnSearchBoxActivated (object sender, System.EventArgs e)
  126. {
  127. Search ();
  128. }
  129.  
  130. protected virtual void OnSearchUserBoxActivated (object sender, System.EventArgs e)
  131. {
  132. Search ();
  133. }
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. }