[banshee] [ThickClient] Prevent SourceView DnD NREs just introduced
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [ThickClient] Prevent SourceView DnD NREs just introduced
- Date: Thu, 14 Oct 2010 18:28:40 +0000 (UTC)
commit 0017e6cb41ca7973bb9c15ea31dc9a655230e5ee
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Oct 14 13:26:54 2010 -0500
[ThickClient] Prevent SourceView DnD NREs just introduced
.../Banshee.Sources.Gui/SourceRowRenderer.cs | 2 +-
.../Banshee.Sources.Gui/SourceView_DragAndDrop.cs | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
index 3faeb3b..6e96ee0 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
@@ -178,7 +178,7 @@ namespace Banshee.Sources.Gui
// Draw the expander if the source has children
double exp_h = (cell_area.Height - 2.0*Ypad) / 3.2;
double exp_w = exp_h * 1.6;
- if (view != null && view.Cr != null && source.Children.Count > 0) {
+ if (view != null && view.Cr != null && source.Children != null && source.Children.Count > 0) {
var r = new Gdk.Rectangle (x, cell_area.Y + (int)((cell_area.Height - exp_h) / 2.0), (int)exp_w, (int)exp_h);
view.Theme.DrawArrow (view.Cr, r, source.Expanded ? Math.PI/2.0 : 0.0);
}
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView_DragAndDrop.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView_DragAndDrop.cs
index e36149d..a5a9a31 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView_DragAndDrop.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView_DragAndDrop.cs
@@ -137,6 +137,7 @@ namespace Banshee.Sources.Gui
store.SetValue (new_playlist_iter, 0, NewPlaylistSource);
store.SetValue (new_playlist_iter, 1, 999);
+ store.SetValue (new_playlist_iter, 2, SourceModel.EntryType.Source);
new_playlist_visible = true;
UpdateView ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]