From 3043f1a21469b6f985df3ae40b4e50b2f97220d0 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Sat, 13 Feb 2010 17:41:25 +0100 Subject: [PATCH] Corretto il comportamento in assenza di lista dei file. --- Dizzy/MainWindow.cs | 1 - Dizzy/Protocol.cs | 19 +++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) 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; -- 2.1.4