[banshee] [MeeGo] MeeGo panel is created via Mono Addins
- From: Aaron Bockover <abock src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [MeeGo] MeeGo panel is created via Mono Addins
- Date: Wed, 31 Mar 2010 17:41:37 +0000 (UTC)
commit e84c6b02ba57c96d5da005422cd7921a1929d9e8
Author: Aaron Bockover <abockover novell com>
Date: Mon Mar 29 15:05:11 2010 -0400
[MeeGo] MeeGo panel is created via Mono Addins
The MeeGoPanel object is instantiated via the PostInitializeGtk
hook through Mono.Addins plumbing. This ensure we can respond to
Mutter Moblin's toolbar DBus activation request. We can populate
it later when the rest of the MeeGo service has started up.
.../Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs | 10 ++++++++++
.../Banshee.MeeGo/Banshee.MeeGo/MeeGoService.cs | 3 ++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs
index 7e40b68..4647f21 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs
@@ -36,6 +36,8 @@ namespace Banshee.MeeGo
{
public class MeeGoPanel : IDisposable
{
+ public static MeeGoPanel Instance { get; private set; }
+
private bool waiting_for_embedded;
private PanelGtk embedded_panel;
private Window window_panel;
@@ -44,13 +46,21 @@ namespace Banshee.MeeGo
public MeeGoPanel ()
{
+ if (Instance != null) {
+ throw new InvalidOperationException ("Only one MeeGoPanel instance should exist");
+ }
+
+ Instance = this;
+
var timer = Log.DebugTimerStart ();
try {
+ Log.Debug ("Attempting to create MeeGo toolbar panel");
waiting_for_embedded = true;
embedded_panel = new PanelGtk ("banshee", "media", null, "media-button", true);
embedded_panel.ReadyEvent += (o, e) => {
lock (this) {
+ Log.Debug ("MeeGo toolbar panel ready");
waiting_for_embedded = false;
BuildContents ();
}
diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoService.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoService.cs
index a281fb6..8194c58 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoService.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoService.cs
@@ -57,7 +57,7 @@ namespace Banshee.MeeGo
// to keep mutter-moblin's toolbar from thinking we crashed (timing out).
// The contents of the panel will be constructed later on.
if (ApplicationContext.CommandLine.Contains ("mutter-panel")) {
- panel = new MeeGoPanel ();
+ panel = MeeGoPanel.Instance;
}
elements_service = ServiceManager.Get<GtkElementsService> ();
@@ -113,6 +113,7 @@ namespace Banshee.MeeGo
ServiceManager.PlayerEngine.Volume = 100;
if (panel == null) {
+ Log.Warning ("MeeGo extension initialized without a panel");
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]