[banshee/podcast-ng] [podcast-ng] Minor changes to get the basic podcast-ng plugin to building with master.
- From: Michael C. Urbanski <murbanski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/podcast-ng] [podcast-ng] Minor changes to get the basic podcast-ng plugin to building with master.
- Date: Tue, 30 Mar 2010 06:07:31 +0000 (UTC)
commit 623a13c9d8ec9a5eefb519dfdd4df9262947a60c
Author: Mike Urbanski <michael c urbanski gmail com>
Date: Tue Mar 30 01:06:17 2010 -0500
[podcast-ng] Minor changes to get the basic podcast-ng plugin to building with master.
.../DownloadListView.cs | 7 ++-
.../DownloadSource.cs | 1 +
.../Banshee.Paas.Gui/ColumnCellChannel.cs | 1 +
.../Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs | 50 +++++++++-----------
.../Banshee.Paas.Gui/PaasChannelView.cs | 9 +++-
.../MiroGuideChannelListView.cs | 2 +-
.../Sources/BrowseChannelsSource.cs | 1 +
.../Sources/ChannelSource.cs | 2 +
.../Banshee.Paas.MiroGuide/Sources/SearchSource.cs | 2 +
.../Banshee.Paas/Banshee.Paas/PaasService.cs | 7 ++-
src/Libraries/Migo2/Makefile.am | 4 --
11 files changed, 48 insertions(+), 38 deletions(-)
---
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadListView.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadListView.cs
index c624dca..7599ea6 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadListView.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadListView.cs
@@ -44,11 +44,11 @@ namespace Banshee.Paas.DownloadManager.Gui
{
public class DownloadListView : ListView<HttpFileDownloadTask>
{
- private PaasDownloadManager manager;
+ //private PaasDownloadManager manager;
public DownloadListView (PaasDownloadManager manager)
{
- this.manager = manager;
+ //this.manager = manager;
IsReorderable = true;
IsEverReorderable = true;
@@ -93,6 +93,7 @@ namespace Banshee.Paas.DownloadManager.Gui
protected override bool OnDragDrop (Gdk.DragContext context, int x, int y, uint time_)
{
+/*
y = TranslateToListY (y);
if (Gtk.Drag.GetSourceWidget (context) == this) {
@@ -119,6 +120,8 @@ namespace Banshee.Paas.DownloadManager.Gui
}
return false;
+*/
+ return false;
}
#endregion
}
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadSource.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadSource.cs
index 53aee1e..20191ff 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadSource.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.DownloadManager.Gui/DownloadSource.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
using Mono.Unix;
+using Hyena;
using Hyena.Data;
using Hyena.Collections;
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/ColumnCellChannel.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/ColumnCellChannel.cs
index 72ac206..3fe0967 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/ColumnCellChannel.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/ColumnCellChannel.cs
@@ -189,6 +189,7 @@ namespace Banshee.Paas.Gui
layout.GetPixelSize (out text_w, out text_h);
height += text_h;
+ layout.FontDescription.Dispose ();
layout.Dispose ();
return (height < image_size ? image_size : height) + 6;
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs
index 91b1619..def4142 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasActions.cs
@@ -362,36 +362,32 @@ namespace Banshee.Paas.Gui
private void RunSubscribeDialog ()
{
- string url = null;
- Uri feedUri = null;
- FeedAutoDownload syncPreference;
-
- PodcastSubscribeDialog subscribeDialog = new PodcastSubscribeDialog ();
- ResponseType response = (ResponseType) subscribeDialog.Run ();
-
- syncPreference = subscribeDialog.SyncPreference;
+ SubscribeDialog dialog = new SubscribeDialog ();
+ ResponseType response = (ResponseType) dialog.Run ();
+ dialog.Destroy ();
if (response == ResponseType.Ok) {
- url = subscribeDialog.Url.Trim ().Trim ('/');
- }
-
- subscribeDialog.Destroy ();
-
- if (String.IsNullOrEmpty (url)) {
- return;
- }
+ if (String.IsNullOrEmpty (dialog.Url)) {
+ return;
+ }
- if (!TryParseUrl (url, out feedUri)) {
- HigMessageDialog.RunHigMessageDialog (
- null,
- DialogFlags.Modal,
- MessageType.Warning,
- ButtonsType.Ok,
- Catalog.GetString ("Invalid URL"),
- Catalog.GetString ("Podcast URL is invalid.")
- );
- } else {
- SubscribeToPodcast (feedUri, syncPreference);
+ string url = dialog.Url.Trim ().Trim ('/');
+ DownloadPreference download_pref = dialog.DownloadPreference;;
+
+ try {
+ service.SyndicationClient.SubscribeToChannel (url, download_pref);
+ } catch (Exception e) {
+ Hyena.Log.Exception (e);
+
+ HigMessageDialog.RunHigMessageDialog (
+ null,
+ DialogFlags.Modal,
+ MessageType.Warning,
+ ButtonsType.Ok,
+ Catalog.GetString ("Invalid URL"),
+ Catalog.GetString ("Podcast URL is invalid.")
+ );
+ }
}
}
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasChannelView.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasChannelView.cs
index ead8fce..b9f5d95 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasChannelView.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.Gui/PaasChannelView.cs
@@ -54,7 +54,7 @@ namespace Banshee.Paas.Gui
column_controller.Add (new Column ("Channels", renderer, 1.0));
ColumnController = column_controller;
- RowHeightProvider = renderer.ComputeRowHeight;
+ //RowHeightProvider = renderer.ComputeRowHeight;
}
public void SetChannelDataHelper (ColumnCellDataHelper dataHelper)
@@ -74,5 +74,12 @@ namespace Banshee.Paas.Gui
return true;
}
+
+ protected override Gdk.Size OnMeasureChild ()
+ {
+ return ViewLayout != null
+ ? base.OnMeasureChild ()
+ : new Gdk.Size (0, renderer.ComputeRowHeight (this));
+ }
}
}
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide.Gui/MiroGuideChannelListView.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide.Gui/MiroGuideChannelListView.cs
index cb64f85..de4f21c 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide.Gui/MiroGuideChannelListView.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide.Gui/MiroGuideChannelListView.cs
@@ -48,7 +48,7 @@ namespace Banshee.Paas.MiroGuide.Gui
column_controller.Add (new Column ("Channels", renderer, 1.0));
ColumnController = column_controller;
- RowHeightProvider = renderer.ComputeRowHeight;
+// RowHeightProvider = renderer.ComputeRowHeight;
}
protected override bool OnPopupMenu ()
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/BrowseChannelsSource.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/BrowseChannelsSource.cs
index a34a521..961ecd3 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/BrowseChannelsSource.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/BrowseChannelsSource.cs
@@ -31,6 +31,7 @@ using Mono.Unix;
using Gtk;
+using Hyena;
using Banshee.Base;
using Banshee.Paas.Data;
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/ChannelSource.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/ChannelSource.cs
index 7d95cfa..750373d 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/ChannelSource.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/ChannelSource.cs
@@ -34,6 +34,8 @@ using Gtk;
using Mono.Unix;
+using Hyena;
+
using Banshee.Gui;
using Banshee.Base;
using Banshee.Sources;
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/SearchSource.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/SearchSource.cs
index a606f7a..e88bf6b 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/SearchSource.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas.MiroGuide/Sources/SearchSource.cs
@@ -30,6 +30,8 @@ using Mono.Unix;
using Gtk;
+using Hyena;
+
using Banshee.Base;
using Banshee.Widgets;
diff --git a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas/PaasService.cs b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas/PaasService.cs
index a47dcd4..49e8b4a 100644
--- a/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas/PaasService.cs
+++ b/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas/PaasService.cs
@@ -467,10 +467,10 @@ namespace Banshee.Paas
private void InitializeInterface ()
{
ServiceManager.SourceManager.AddSource (source);
-
+/*
mg_interface_manager = new MiroGuideInterfaceManager ();
mg_interface_manager.Initialize (mg_client);
-
+*/
download_manager_interface = new DownloadManagerInterface (source, download_manager);
}
@@ -811,7 +811,8 @@ namespace Banshee.Paas
public static string ArtworkIdFor (string id)
{
- return String.Format ("paas-{0}", Banshee.Base.CoverArtSpec.EscapePart (id));
+ string digest = Banshee.Base.CoverArtSpec.Digest (id);
+ return digest == null ? null : String.Format ("podcast-ng-{0}", digest);
}
public static readonly SchemaEntry<string> MiroGuideUsername = new SchemaEntry<string> (
diff --git a/src/Libraries/Migo2/Makefile.am b/src/Libraries/Migo2/Makefile.am
index 5eada46..20d5119 100644
--- a/src/Libraries/Migo2/Makefile.am
+++ b/src/Libraries/Migo2/Makefile.am
@@ -47,9 +47,5 @@ SOURCES = \
Migo2.Utils/UnitUtils.cs \
Migo2.Utils/XmlUtils.cs
-if ENABLE_PODCAST_NG
include $(top_srcdir)/build/build.mk
-else
-EXTRA_DIST = $(SOURCES) $(RESOURCES)
-endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]