[blam/gtk-builder] ItemList: refresh the list when the channel updates
- From: Carlos Martín Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam/gtk-builder] ItemList: refresh the list when the channel updates
- Date: Sat, 12 Oct 2013 15:48:41 +0000 (UTC)
commit faa47d4a36970f3e49e425243664f3650f3865bf
Author: Carlos Martín Nieto <cmn dwim me>
Date: Sat Oct 12 14:10:51 2013 +0200
ItemList: refresh the list when the channel updates
src/ItemList.cs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/ItemList.cs b/src/ItemList.cs
index 1625676..d622ee7 100644
--- a/src/ItemList.cs
+++ b/src/ItemList.cs
@@ -37,12 +37,21 @@ namespace Blam
return current;
}
set {
+ if (current != null)
+ current.PropertyChanged -= ChannelPropertyChanged;
+
current = value;
+ current.PropertyChanged += ChannelPropertyChanged;
UpdateList();
NotifyPropertyChanged();
}
}
+ void ChannelPropertyChanged(object sender, PropertyChangedEventArgs args)
+ {
+ UpdateList();
+ }
+
void NotifyPropertyChanged([CallerMemberName] string name = "")
{
if (PropertyChanged != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]