[banshee] DaapService: use ProxyToMain for a gtk call
- From: AndrÃs Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] DaapService: use ProxyToMain for a gtk call
- Date: Fri, 21 Sep 2012 21:29:41 +0000 (UTC)
commit b3b2c9eeffd6a88083cd4ab8db4935b071b06fb4
Author: Andres G. Aragoneses <knocte gmail com>
Date: Fri Sep 21 21:55:48 2012 +0100
DaapService: use ProxyToMain for a gtk call
Detected by the gui-thread-check profiler module:
*** GTK CALL NOT IN GUI THREAD: ActionGroup.gtk_action_group_add_action
ActionGroup.Add
ActionGroup.Add
HyenaActionGroup.AddImportant
HyenaActionGroup.Add
DaapService.ThreadedInitialize
Thread.StartInternal
.../Banshee.Daap/Banshee.Daap/DaapService.cs | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs b/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
index 32c8cc4..3e3e72d 100644
--- a/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
+++ b/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
@@ -180,11 +180,13 @@ namespace Banshee.Daap
var uia_service = ServiceManager.Get<InterfaceActionService> ();
if (uia_service != null) {
- uia_service.GlobalActions.Add (
- new ActionEntry ("AddRemoteDaapServerAction", Stock.Add,
- Catalog.GetString ("Add Remote DAAP Server"), null,
- Catalog.GetString ("Add a new remote DAAP server"),
- OnAddRemoteServer)
+ ThreadAssist.ProxyToMain ( () =>
+ uia_service.GlobalActions.Add (
+ new ActionEntry ("AddRemoteDaapServerAction", Stock.Add,
+ Catalog.GetString ("Add Remote DAAP Server"), null,
+ Catalog.GetString ("Add a new remote DAAP server"),
+ OnAddRemoteServer)
+ )
);
actions_id = uia_service.UIManager.AddUiFromResource ("GlobalUI.xml");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]