[banshee] [Podcasting] Add indicator to grid
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Podcasting] Add indicator to grid
- Date: Thu, 28 Oct 2010 02:14:36 +0000 (UTC)
commit 05fd690e8a1f6617a76c0def22d7699c45c072b9
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Oct 27 21:14:05 2010 -0500
[Podcasting] Add indicator to grid
.../Banshee.Podcasting.Gui/Grid.cs | 10 +++++++++-
.../Banshee.Podcasting.Gui/HeaderWidget.cs | 17 +++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/Grid.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/Grid.cs
index c5384a3..a5aac1d 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/Grid.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/Grid.cs
@@ -58,7 +58,15 @@ namespace Banshee.Podcasting.Gui
Height = 150,
Spacing = 5,
Children = {
- img,
+ new StackPanel () {
+ Orientation = Orientation.Vertical,
+ Width = 90,
+ Spacing = 5,
+ Children = {
+ img,
+ new ColumnCellPodcastStatusIndicator (null)
+ }
+ },
new TextBlock () {
UseMarkup = true,
TextWrap = TextWrap.WordChar,
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/HeaderWidget.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/HeaderWidget.cs
index a85dd0b..56cfa81 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/HeaderWidget.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/HeaderWidget.cs
@@ -43,7 +43,7 @@ using Banshee.Widgets;
namespace Banshee.Podcasting.Gui
{
- public class ModelComboBox<T> : DictionaryComboBox<T>
+ public class ModelComboBox<T> : DictionaryComboBox<T> where T : class
{
private IListModel<T> model;
private Func<T, string> text_func;
@@ -53,13 +53,18 @@ namespace Banshee.Podcasting.Gui
this.model = model;
this.text_func = text_func;
- Changed += delegate {
- model.Selection.Clear (false);
- model.Selection.Select (Active);
- };
-
model.Reloaded += delegate { ThreadAssist.ProxyToMain (Reload); };
Reload ();
+
+ var last_active = ActiveValue;
+
+ Changed += delegate {
+ if (last_active != ActiveValue) {
+ model.Selection.Clear (false);
+ model.Selection.Select (Active);
+ last_active = ActiveValue;
+ }
+ };
}
private void Reload ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]