GNOME Bugzilla – Bug 654317
Provide an indicator for Unity
Last modified: 2012-10-06 20:29:12 UTC
I'd like Hamster to be usable again in Ubuntu by providing an appindicator for Unity.
I've already worked on an indicator which works with the version of hamster that we have in Ubuntu 11.04 (2.32.1) and it should be trivial to get it to work with whatever is available in trunk.
My code is hosted here:
If possible, I'd like to see my work in the upstream code (as I imagine the gnome 3 applet is going to be). Of course I'm available to make changes to improve the indicator.
Here's a link to a blog post of mine which shows how the indicator looks:
There are also other branches forked from mine which change user experience a bit:
appreciate your work!
your linked post helps a lot too. can you comment on the changes in fork?
from the looks of it i think the menu could be also tricked to get there the good ol' popup back. would you perhaps like to try doing that?
awful lots of questions but that's all because it's late and my head is packed with jam or something :)
Both forks the put back the label with the current activity beside the hamster icon so that it looks more like the gnome applet. They made this change so as to know when there's an activity in progress by simply looking at the applet.
Note: another option, tough, would be to change the icon colour (e.g. to blue), perhaps being more compliant with the indicators spec, when there's an activity and to switch back to monochrome when hamster is idle. We would also have to add a monochrome icon but this would be easy.
JHSaunders' fork made the new activity dialog an undecorated window while in my implementation the window has a decoration because of some weird mouse interactions (i.e. the popup doesn't go away when you click outside of its area). See the following screenshot:
I can probably fix the popup issue and remove the window decoration (if this is what you were asking about) but I guess I'll have to modify your code a bit.
Also now my indicator works well with your master branch.
I don't think I can get the old popup to work properly because we don't get an event when the indicator's icon is clicked, therefore we don't know when to hide the popup. In applet.py we had the events that we got from the main "self.button". The indicator, however, doesn't expose these events and doesn't act as a button.
If we want to put the popup back we need an easy way to hide the popup after a certain event. Right now, you have to enter an text input field with your mouse and then press the Escape button on your keyboard (which is not too intuitive) (this is done in on_window_key_pressed in edit_activity.py).
Toms: here's the current status of the indicator (which is now nicely integrated with Ubuntu's themes and has more features as in the original applet):
All the code is here:
The only thing I wasn't able to fix was the behaviour of the popup, therefore I had to keep it a decorated window instead.
If you agree, I'd like to integrate my code with yours in your git repository so that hamster works with both the Gnome shell and with Unity without any additional apps.
Alberto's code has been updated and is now being merged into the Ubuntu 12.04 "Precise" release:
It is also available for Oneiric and Natty in an Ubuntu PPA:
What is necessary to get it into the hamster upstream also?
hmm, this bug somehow had slipped through the webs. hamster has moved to github.
i'll be glad to add the indicator to the projects and give appropriate access to the maintainers