[blam] Item: Create update delegate/event properly
- From: Carlos Martín Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam] Item: Create update delegate/event properly
- Date: Wed, 15 Sep 2010 03:32:56 +0000 (UTC)
commit 1cea316e69795f35fa952c47a70c8a849318e0c4
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date: Wed Sep 15 04:30:58 2010 +0100
Item: Create update delegate/event properly
src/Item.cs | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/Item.cs b/src/Item.cs
index 332e221..d981df4 100644
--- a/src/Item.cs
+++ b/src/Item.cs
@@ -18,7 +18,8 @@ namespace Imendio.Blam {
public SyndicationContent exposed_text;
- public delegate void Updated(Item item);
+ public delegate void UpdateHandler(Item item);
+ public event UpdateHandler Updated;
public string Keywords {
get {
@@ -67,11 +68,12 @@ namespace Imendio.Blam {
{
if (Unread != unread) {
Unread = unread;
- Updated(this);
+ if(Updated != null){
+ Updated(this);
+ }
/* FIXME: Re-implement this */
Application.TheApp.ItemList.Update (this);
- }
- }
- }
- }
+ }
+ }
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]