Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Python Desktop Applets In OS2008 ?

    Reply
    Page 4 of 4 | Prev |   2     3   4 |
    zeez | # 31 | 2008-02-13, 13:47 | Report

    Are there any examples for the official bindings available ?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    SpiritGeek | # 32 | 2008-02-14, 14:47 | Report

    Originally Posted by TA-t3 View Post
    Whatever it did, it didn't brick twice.. it can't. After the first bricking you would have had to send it back to the vendor to fix it.
    Sorry, my terminology may not be very precise just yet. I meant that it would no longer boot and I had to re-flash the rootfs to restore it.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    seiichiro0185 | # 33 | 2008-02-18, 13:05 | Report

    Originally Posted by zeez View Post
    Are there any examples for the official bindings available ?
    I would be interested in this as well!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    SpiritGeek | # 34 | 2008-02-18, 21:45 | Report

    Here's a sample; a desktop button to launch X Terminal:

    /usr/share/applications/hildon-home/desktop-applet.desktop
    Code:
    [Desktop Entry]
    Name=Demo Desktop Applet
    Type=python
    X-Path=desktop-applet
    /usr/lib/hildon-desktop/desktop-applet.py
    Code:
    import gtk
    import hildondesktop
    import os
    
    class DesktopApplet(hildondesktop.HomeItem):
    
    	def Button_clicked(self, Widget, Data = None):
    
    		os.spawnlp(os.P_NOWAIT, "maemo-invoker", "maemo-invoker", "osso-xterm.launch")
    
    	def __init__(self):
    
    		hildondesktop.HomeItem.__init__(self)
    
    		Button = gtk.Button()
    		Image = gtk.image_new_from_file("/usr/share/icons/hicolor/64x64/apps/terminal.png")
    		Button.set_image(Image)
    		Button.connect("clicked", self.Button_clicked)
    		Button.show()
    
    		self.add(Button)
    
    
    def hd_plugin_get_objects():
    	plugin = DesktopApplet()
    	return [plugin]
    Make sure you have the required libraries installed:
    hildon-desktop-python-loader_0.0.2-1_armel.deb
    python2.5-hildondesktop_0.0.2-1_armel.deb
    (For some reason those wouldn't install for me just by clicking. I had to download them locally and install with dpgk -i.)

    I also posted a similar sample task navigator panel, if you're interested.

    Happy coding!

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by SpiritGeek; 2008-02-18 at 21:51.

     
    McLightning | # 35 | 2009-08-15, 12:20 | Report

    it says incompatible application package for those libraries

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 4 of 4 | Prev |   2     3   4 |
vBulletin® Version 3.8.8
Normal Logout