[banshee/podcast-ng] [SearchEntry] Added 'Cleared' event



commit 960d47bb546e78b52d43b8bb2ccdcf1d08f1b3b1
Author: Mike Urbanski <michael c urbanski gmail com>
Date:   Mon Mar 29 22:56:35 2010 -0500

    [SearchEntry] Added 'Cleared' event

 .../Banshee.Widgets/Banshee.Widgets/SearchEntry.cs |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
index 70eebb4..671fbc2 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
@@ -50,6 +50,8 @@ namespace Banshee.Widgets
         private event EventHandler filter_changed;
         private event EventHandler entry_changed;
 
+        public event EventHandler<EventArgs> Cleared;
+
         public event EventHandler Changed {
             add { entry_changed += value; }
             remove { entry_changed -= value; }
@@ -238,6 +240,12 @@ namespace Banshee.Widgets
         {
             active_filter_id = 0;
             entry.Text = String.Empty;
+
+            EventHandler<EventArgs> handler = Cleared;
+
+            if (handler != null) {
+                handler (this, EventArgs.Empty);
+            }
         }
 
         protected override bool OnKeyPressEvent (Gdk.EventKey evnt)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]