Corretto il comportamento in assenza di lista dei file.
Leonardo Robol [2010-02-13 16:41]
Corretto il comportamento in assenza di lista dei file.
diff --git a/Dizzy/MainWindow.cs b/Dizzy/MainWindow.cs
index 983f89f..593e42a 100644
--- a/Dizzy/MainWindow.cs
+++ b/Dizzy/MainWindow.cs
@@ -77,7 +77,6 @@ public partial class MainWindow : Gtk.Window
protected virtual void OnSearchRequested (object sender, System.EventArgs e)
{
this.files.Clear ();
- EventManager.SearchStarted ();
this.protocol.Search (searchBox.Text, searchUserBox.Text, typeBox.ActiveText);
}
diff --git a/Dizzy/Protocol.cs b/Dizzy/Protocol.cs
index b3175df..2b944bf 100644
--- a/Dizzy/Protocol.cs
+++ b/Dizzy/Protocol.cs
@@ -62,17 +62,15 @@ namespace Dizzy
{
// Dovremmo notificare l'utente che non c'è la lista
Log.Warning ("La lista non è presente, chiedo di scaricarla");
- this.UpdateFileList ();
- }
- else
- {
- Log.Info ("Avvio la ricerca nel database");
- this.keyword = keyword;
- this.user = user;
- this.type = type;
- this.finder = new Thread(new ThreadStart (this._Search));
- this.finder.Start ();
+ this.UpdateFileList ();
}
+
+ Log.Info ("Avvio la ricerca nel database");
+ this.keyword = keyword;
+ this.user = user;
+ this.type = type;
+ this.finder = new Thread(new ThreadStart (this._Search));
+ this.finder.Start ();
}
@@ -89,6 +87,7 @@ namespace Dizzy
// Questa funzione viene chiamata quando qualcuno richiede
// una ricerca. Inoltre abbiamo la quasi certezza che ne venga
// chiamata solo un'istanza nello stesso momento.
+ EventManager.SearchStarted ();
FileList list = new FileList (ref this.config);
ArrayList files;