Aggiunti metodi per provare a gestire intelligentemente
Leonardo Robol [2010-02-10 13:05]
Aggiunti metodi per provare a gestire intelligentemente
i widget.
diff --git a/Dizzy/EventManager.cs b/Dizzy/EventManager.cs
index d9c0888..324087c 100644
--- a/Dizzy/EventManager.cs
+++ b/Dizzy/EventManager.cs
@@ -22,7 +22,14 @@ namespace Dizzy
{
public static MessageDialog searchInProgress = null;
-
+
+ // Gestione dei file e dei task. Questi devono essere inizializzati
+ // Appena sono creati.
+ public static FileTreeView fileTreeView = null;
+ public static TaskTreeView taskTreeView = null;
+ public static void RegisterFileTreeView (ref FileTreeView f) { fileTreeView = f; }
+ public static void RegisterTaskTreeView (ref TaskTreeView t) { taskTreeView = t; }
+
public EventManager () {}
// Metodo generico per segnalare un'errore dell'applicazione.
@@ -73,5 +80,22 @@ namespace Dizzy
});
}
}
+
+ public static void FileTreeViewAddFile(File f)
+ {
+ if (fileTreeView == null) { return; }
+ GLib.Idle.Add(delegate {
+ fileTreeView.AddFile (f);
+ return false;
+ });
+ }
+
+ public static void FileTreeViewClear() {
+ if (fileTreeView == null) { return; }
+ GLib.Idle.Add(delegate {
+ fileTreeView.Clear ();
+ return false;
+ });
+ }
}
}