Custom indicator applet iconPosted: December 2, 2010
Recently, I have been helping out many, many people in #ubuntu-app-devel on Freenode with getting a their application indicator to use a custom icon. I recently went through a lot of hassle trying to figure this out, so I thought I would post about it.
So normally to initialize your application indicator, you would have something like this:
ind = appindicator.Indicator("MyApp", "my-app-icon", appindicator.CATEGORY_APPLICATION_STATUS)
But that will only allow you to use icons in the current icon theme, not your own, so to fix this you just need to specify the path like so:
ind = appindicator.Indicator("MyApp", "/usr/share/myapp/media/my-app-icon.png", appindicator.CATEGORY_APPLICATION_STATUS)
The above code assumes that your app is a Quickly application (/usr/share/myapp/ is where Quickly applications install themselves to). If your application is not a Quickly application then you just need to point the path where your icon is when the application is installed.