![]() |
Python Statusbar applet possible?
I've seen it done for the home area, but I can't find a hello-world applet and my attempts at modifying the python code for the home example hasn't worked so far.
Is it even possible to create a python statusbar applet, and if so, is there an example source/desktop file? |
Re: Python Statusbar applet possible?
as far as I know it is not possible, because python bindings are missing. But I would be happy to be wrong :)
|
Re: Python Statusbar applet possible?
I am happy to prove myself wrong. This should give you green statusbar button which opens "Hello World" dialog.
Code:
import gtk |
Re: Python Statusbar applet possible?
THANKYOU!!!
Two other little things I had to do. 1. I named the unaltered code pystatbar.py and put it in /usr/lib/hildon-desktop/ though there is a statusbar directory, it works from desktop. I also did "chmod +x" which may or may not have been necessary. I didn't have the #!/usr/bin/python... header 2. I also needed the desktop file: In /usr/share/applications/hildon-status-bar/ I created the file pysb.desktop: Code:
[Desktop Entry] I could add a category, Icon, etc, but I let it default. But it works!!! I don't know what I missed since I tried calling it statusbar item, but if everything isn't perfect it fails without error messages and I probably had something else wrong. THANKS! |
Re: Python Statusbar applet possible?
Wow, this is pretty cool. Mikkov: Can you give a link to where you found that example code? Is there any more documentation, such as opening a menu?
[edit]Hmmm... I spoke too soon... I can't get this working at all... I enable the Python SBar item, but the Display applet shows up instead! Any ideas? |
Re: Python Statusbar applet possible?
I wrote that code myself, partially converting from C in http://maemo.org/maemo_release_docum..._maemo_4.1.pdf
From there on it is pretty much normal python and gtk, see http://www.pygtk.org You need to have python2.5-hildondesktop and hildon-desktop-python-loader installed before python statusbar plugins work |
Re: Python Statusbar applet possible?
Alright, thanks for the links! I have both python2.5-hildondesktop and hildon-desktop-python-loader installed, but like I said, when I enable the python statusbar item I made (following tz1's instructions), I just get the Display item. If I have the display item enabled, then nothing new shows up...
Unfortunately, like tz1 said, there are NO error messages when something fails... |
Re: Python Statusbar applet possible?
Notice: There was an error in the example code. Now it should be correct and icon has transparent background
|
Re: Python Statusbar applet possible?
Quote:
|
Re: Python Statusbar applet possible?
I just deleted all the files I had created, and redid all of them, following the instructions again, and still no luck. This time, the display icon doesn't even show up instead...
I suppose it's worth noting that I'm running diablo (latest update), and I have python version 2.5.2-1osso3 with python-launcher installed. |
All times are GMT. The time now is 02:16. |
vBulletin® Version 3.8.8