[banshee] [Podcasts] Do most of the init off the GUI thread
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [Podcasts] Do most of the init off the GUI thread
- Date: Sat, 28 Nov 2009 00:26:05 +0000 (UTC)
commit 839462c2347c969a007436c619e7d45ea565a312
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Nov 27 16:21:59 2009 -0800
[Podcasts] Do most of the init off the GUI thread
.../Banshee.Podcasting/PodcastService.cs | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
index 2092f22..157ff72 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
@@ -52,7 +52,7 @@ using Banshee.Configuration;
namespace Banshee.Podcasting
{
- public partial class PodcastService : IExtensionService, IDisposable, IDelayedInitializeService
+ public partial class PodcastService : IExtensionService, IDisposable, IInitializeService
{
private readonly string tmp_download_path = Paths.Combine (Paths.ExtensionCacheRoot, "podcasting", "partial-downloads");
private uint refresh_timeout_id = 0;
@@ -211,13 +211,16 @@ namespace Banshee.Podcasting
public void Initialize ()
{
+ ThreadAssist.SpawnFromMain (ThreadedInitialize);
}
- public void DelayedInitialize ()
+ private void ThreadedInitialize ()
{
download_manager = new DownloadManager (2, tmp_download_path);
- download_manager_iface = new DownloadManagerInterface (download_manager);
- download_manager_iface.Initialize ();
+ ThreadAssist.BlockingProxyToMain (delegate {
+ download_manager_iface = new DownloadManagerInterface (download_manager);
+ download_manager_iface.Initialize ();
+ });
feeds_manager = new FeedsManager (ServiceManager.DbConnection, download_manager, null);
@@ -231,7 +234,8 @@ namespace Banshee.Podcasting
Hyena.Log.Exception ("Couldn't migrate podcast download cache", e);
}
- InitializeInterface ();
+ ThreadAssist.BlockingProxyToMain (InitializeInterface);
+
feeds_manager.PodcastStorageDirectory = source.BaseDirectory;
feeds_manager.FeedManager.ItemAdded += OnItemAdded;
feeds_manager.FeedManager.ItemChanged += OnItemChanged;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]