From 2f94002e7722e3bfc8a404d684600e2774195763 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Wed, 10 Feb 2010 14:53:12 +0100 Subject: [PATCH] =?UTF-8?q?Cerchiamo=20di=20gestire=20gli=20aggiornamenti?= =?UTF-8?q?=20in=20maniera=20pi=C3=B9=20sono.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dizzy/MainWindow.cs | 4 +++- Dizzy/Protocol.cs | 10 +++++----- gtk-gui/gui.stetic | 40 ++-------------------------------------- 3 files changed, 10 insertions(+), 44 deletions(-) diff --git a/Dizzy/MainWindow.cs b/Dizzy/MainWindow.cs index 59fffae..7a65bb4 100644 --- a/Dizzy/MainWindow.cs +++ b/Dizzy/MainWindow.cs @@ -19,9 +19,11 @@ public partial class MainWindow : Gtk.Window // Inizializziamo la vista dei file. files = new Dizzy.FileTreeView (filelist); + EventManager.RegisterFileTreeView (ref files); // .. e anche quella dei download tasks = new Dizzy.TaskTreeView (tasklist); + EventManager.RegisterTaskTreeView (ref tasks); // Carichiamo qualche impostazione di default string downloadpath = config.GetValue("download_folder"); @@ -70,7 +72,7 @@ public partial class MainWindow : Gtk.Window { this.files.Clear (); EventManager.SearchStarted (); - this.protocol.Search (searchBox.Text, ref this.files); + this.protocol.Search (searchBox.Text); } protected virtual void OnRowActivated (object o, Gtk.RowActivatedArgs args) diff --git a/Dizzy/Protocol.cs b/Dizzy/Protocol.cs index 4d2c812..53ef0b9 100644 --- a/Dizzy/Protocol.cs +++ b/Dizzy/Protocol.cs @@ -35,7 +35,6 @@ namespace Dizzy // Dati letti dal thread che cerca per capire cosa cercare string keyword; - FileTreeView fileTreeView; GlobalConfig config; @@ -52,7 +51,7 @@ namespace Dizzy this.UpdateFileList (); } - public void Search(string keyword, ref FileTreeView f) + public void Search(string keyword) { if (this.finder != null && this.finder.IsAlive) { @@ -69,7 +68,6 @@ namespace Dizzy { Log.Info ("Avvio la ricerca nel database"); this.keyword = keyword; - this.fileTreeView = f; this.finder = new Thread(new ThreadStart (this._Search)); this.finder.Start (); } @@ -100,11 +98,13 @@ namespace Dizzy files = new ArrayList (); } - this.fileTreeView.Clear (); + // this.fileTreeView.Clear (); + EventManager.FileTreeViewClear (); foreach(File f in files) { - this.fileTreeView.AddFile (f); + // this.fileTreeView.AddFile (f); + EventManager.FileTreeViewAddFile (f); } EventManager.SearchFinished (); if (files.Count == 0) diff --git a/gtk-gui/gui.stetic b/gtk-gui/gui.stetic index b969804..71809dc 100644 --- a/gtk-gui/gui.stetic +++ b/gtk-gui/gui.stetic @@ -640,7 +640,7 @@ Libro - + CenterOnParent 2 @@ -650,43 +650,7 @@ Libro 2 - - - 6 - - - - 64 - 64 - stock:gtk-dialog-error Menu - - - 0 - True - False - False - - - - - - label4 - True - - - 1 - True - False - False - - - - - 0 - True - False - False - + -- 2.1.4