Support Application Indicators

Bug #518171 reported by Sense Egbert Hofstede
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Banshee
Fix Released
Wishlist
banshee (Ubuntu)
Fix Released
Wishlist
Sense Egbert Hofstede

Bug Description

Binary package hint: banshee

This application should be investigated to be ported to use Application
Indicators for Lucid - https://edge.launchpad.net/indicator-application

Examples for the C#/Mono bindings of libappindicator can be found at <http://bazaar.launchpad.net/~indicator-applet-developers/indicator-application/trunk/files/head%3A/bindings/mono/examples/>.

Changed in banshee (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
tags: added: indicator-application
Changed in banshee (Ubuntu):
assignee: nobody → Sense Hofstede (qense)
status: Triaged → In Progress
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Here a patch generated against the latest git.

tags: added: patch
Revision history for this message
Jorge Castro (jorge) wrote :

Thanks for working on this Sense. Applied it to git head and it's working. Something is up with the horizontal seperators though (see attachment)

Revision history for this message
Jorge Castro (jorge) wrote :
Revision history for this message
Jorge Castro (jorge) wrote :
Download full text (10.2 KiB)

Also crashes when notifications are enabled:

An unhandled exception was thrown: Object reference not set to an instance of an object

at Hyena.Gui.Theming.GtkTheme.GetCairoTextMidColor (Gtk.Widget) [0x00000] in /home/jorge/src/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs:46
at Banshee.NotificationArea.NotificationAreaService.get_TextLightColor () [0x00000] in /home/jorge/src/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs:519
at Banshee.NotificationArea.NotificationAreaService.MarkupFormat (string,string[]) [0x00000] in /home/jorge/src/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs:525
at Banshee.NotificationArea.NotificationAreaService.GetByFrom (string,string,string,string) [0x00022] in /home/jorge/src/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs:547
at Banshee.NotificationArea.NotificationAreaService.ShowTrackNotification () [0x000fd] in /home/jorge/src/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs:477
at Banshee.NotificationArea.NotificationAreaService.OnPlayerEvent (Banshee.MediaEngine.PlayerEventArgs) [0x0003b] in /home/jorge/src/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs:407
at Banshee.MediaEngine.PlayerEngineService.RaiseEvent (Banshee.MediaEngine.PlayerEventArgs) [0x00061] in /home/jorge/src/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs:728
at Banshee.MediaEngine.PlayerEngineService.OnEngineEventChanged (Banshee.MediaEngine.PlayerEventArgs) [0x00061] in /home/jorge/src/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs:232
at Banshee.MediaEngine.PlayerEngine.RaiseEventChanged (Banshee.MediaEngine.PlayerEventArgs) [0x0000d] in /home/jorge/src/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs:179
at Banshee.MediaEngine.PlayerEngine.OnEventChanged (Banshee.MediaEngine.PlayerEventArgs) [0x0001e] in /home/jorge/src/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs:167
at Banshee.MediaEngine.PlayerEngine.OnEventChanged (Banshee.MediaEngine.PlayerEvent) [0x00000] in /home/jorge/src/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngine.cs:161
at Banshee.GStreamer.PlayerEngine.OnStateChange (intptr,Banshee.GStreamer.GstState,Banshee.GStreamer.GstState,Banshee.GStreamer.GstState) [0x0003f] in /home/jorge/src/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs:252
at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnStateChange (intptr,Banshee.GStreamer.GstState,Banshee.GStreamer.GstState,Banshee.GStreamer.GstState) <0x0007e>
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00052>
at Gtk.Application.Run () <0x0000b>
at Banshee.Gui.GtkBaseClient.Run () [0x00000] in /home/jorge/src/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:177
at Banshee.Gui.GtkBaseClient.Startup () [0x00000] in /home/jorge/src/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:77
at Hyena.Gui.CleanRoomSt...

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

After some changes here the latest version of the patch, generated against upstream HEAD.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Work on the patch seems to be blocked by bug #527082 and bug #526620.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I was wrong, it depends on bug #528097. I've almost got that done, though.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

All my work on the previous bugs has turned out to be for nothing. Although the 'fallback' and 'unfallback' methods are detected as virtual members they're not handled as virtual member support won't arrive in GAPI until GTK#3.0, even though it was already added in September 2009.

The consequence of this is that the Fallback and Unfallback functions cannot be overridden in C#.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I just attached the latest patch upstream. If nothing's wrong with it it's the final patch until GAPI gets better.
I've added two insensitive menu items to the top of the tray menu. However, they show the artist and title of the track that's currently being
played. However, due to a bug in libappindicator the MenuItem labels aren't
updated. Therefore both labels always read "Not playing". Someone is working on
this.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I forgot to mention that you now have to build Banshee with the --enable-appindicator option, 'no' has replaced 'auto' as the default.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

In conflict with the FeatureFreeze, the UserInterfaceFreeze and the Beta1Freeze here is a Quilt patch for Banshee to add AppIndicator support to the Ubuntu package in case it won't be accepted into

Issues: the menu isn't properly reset when you toggle the preference checkbox for using AppIndicator, resulting in an increasingly longer menu unless you restart Banshee. However, this isn't likely to occur very often.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I've uploaded a package to <https://launchpad.net/~qense/+archive/ppa>.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Adding patch-needwork based on upstream comments

tags: added: patch-needswork
removed: patch
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

A comment I posted upstream:
"During a discussion at the #banshee IRC channel it was decided to not continue
with adapting the Banshee.NotificationArea code, but instead go for a separate
plugin in the Banshee Community Extensions.

I've pushed a working plugin to
<http://gitorious.org/~qense/banshee-community-extensions/banshee-community-extensions-appindicator>.

The only issue I want to look at before requesting a merge is whether Mono
Addins support conflicts just like they support dependencies.
Banshee.AppIndicator has got an action group that conflicts with an identical
action group in Banshee.NotificationArea and it provides almost the same
functionality; no one needs two status icons.
Any help would be appreciated."

Revision history for this message
Curtis Hovey (sinzui) wrote :

I have installed the banshee-application-indicator in Lucid. It fails because of a missing assembly: appindicator-sharp

banshee
[Info 11:05:08.992] Running Banshee 1.6.0: [Ubuntu lucid (development branch) (linux-gnu, i486) @ 2010-04-04 14:18:33 UTC]

** (Banshee:3340): WARNING **: The following assembly referenced from /usr/lib/banshee-1/Extensions/Banshee.AppIndicator.dll could not be loaded:
     Assembly: appindicator-sharp (assemblyref_index=8)
     Version: 0.0.0.0
     Public Key: bcae265d1c7ab4c2
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/usr/lib/banshee-1/Extensions/).

Revision history for this message
Curtis Hovey (sinzui) wrote :

Sorry, I did not complete my remark. Installing libappindicator0-cil fixes the issue. I think the dependancies for the package need updating.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

I'm marking this bug as Fix Released since AppIndicator landed in Lucid in the package 'banshee-extension-appindicator'.

Curtis: I can confirm that the package doesn't depend on libappindicator0-cil, whereas it really should. I'll file a bug against the banshee-community-extensions source package. Thank you for bringing this issue to my attention.

Changed in banshee (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Alvaro Aleman (alvaroaleman) wrote :

Shouldn't Banshee itself depend on "banshee-extension-appindicator"?

By the way: "banshee-extension-appindicator" doesn't disable the tray icon extension please change this, too

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

We've decided to not make the AppIndicator the default tray icon because it we considered it to be too late in the cycle -- and it now certainly is -- and to spare the interface documenters. Otherwise we'd have a late change to the interface, which would have upset some people.

The fact that Banshee.AppIndicator doesn't disable Banshee.NotificationArea when you enable it is a know fact, but not something that was fixable in a nice way. I'm sorry, but I'm afraid you'll have to put up with this inconvenience until Mono.Addins support something like conflicts.

Revision history for this message
Wolter HV (wolterh) wrote :

I installed the banshee-extension-appindicator and the libappindicator0-cil, but the plugin won't show up in the list.

Revision history for this message
Wolter HV (wolterh) wrote :

Well.. it now works on banshee, but not on banshee-1

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 518171] Re: Support Application Indicators

On Sunday 11,April,2010 01:13 PM, Wolter Hellmund wrote:
> I installed the banshee-extension-appindicator and the
> libappindicator0-cil, but the plugin won't show up in the list.
>
Can you run "banshee --debug" and see what it says?

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Developer

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Sunday 11,April,2010 01:18 PM, Wolter Hellmund wrote:
> Well.. it now works on banshee, but not on banshee-1
>

They're the same thing. /usr/bin/banshee is a symbolic link to
/usr/bin/banshee-1, and they are treated exactly the same. You probably saw a
transient error somewhere.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Developer

Revision history for this message
ukblacknight (tom-blacknight) wrote :

Ubuntu 10.04 Beta 2
Banshee 1.6.0

I can't get this to work. I get the following output on "banshee --debug"

The applet doesn't appear in the panel, but the applet can be ticked in the preferences, and no graphical error is produced.

** (Banshee:4295): WARNING **: The following assembly referenced from /usr/lib/banshee-1/Extensions/Banshee.AppIndicator.dll could not be loaded:
     Assembly: appindicator-sharp (assemblyref_index=8)
     Version: 0.0.0.0
     Public Key: bcae265d1c7ab4c2
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/usr/lib/banshee-1/Extensions/).

** (Banshee:4295): WARNING **: Could not load file or assembly 'appindicator-sharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=bcae265d1c7ab4c2' or one of its dependencies.
[1 Warn 18:41:31.608] Caught an exception - System.TypeLoadException: Could not load type 'Banshee.AppIndicator.AppIndicatorService' from assembly 'Banshee.AppIndicator, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null'. (in `mscorlib')
  at (wrapper managed-to-native) System.MonoType:GetConstructors_internal (System.Reflection.BindingFlags,System.Type)
  at System.MonoType.GetConstructors (BindingFlags bindingAttr) [0x00000]
  at System.MonoType.GetConstructorImpl (BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000]
  at System.Type.GetConstructor (BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000]
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000]
  at System.Activator.CreateInstance (System.Type type) [0x00000]
  at Mono.Addins.TypeExtensionNode.CreateInstance () [0x00000]
  at Mono.Addins.InstanceExtensionNode.CreateInstance (System.Type expectedType) [0x00000]
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00000]
[1 Warn 18:41:31.608] Extension `/Banshee/ServiceManager/Service/__nid_34' not started: Could not load type 'Banshee.AppIndicator.AppIndicatorService' from assembly 'Banshee.AppIndicator, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null'.

Revision history for this message
Sense Egbert Hofstede (sense) wrote :

It seems that the tries to fix a packaging issue last week completely broke this plugin. Please follow bug #564506 to get updates on the status of the issue.

Changed in banshee:
status: Unknown → Fix Released
Kenny Meyer (knny-myer)
tags: added: patch
removed: patch-needswork
Changed in banshee:
importance: Unknown → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.