humus
July 25th, 2007, 03:09 PM
Hello, I just noticed today I was running an outdated screenlets version, maybe a link in official web page to these forums would be nice. Anyway, since I'veupgraded to the latest version some widgets were missing the "Quit" option in their menu, this was annoying since state of widgets was not saved. Fixing this is really simple:
Since this new version, screenlets need to create a session (I'm guessing here, haven't read any documentation, is there any?) in order to keep their state and other features, this was needed since there's no more daemon to control this (guessing again), ok, to the fix:
Open the widget you'll like to update in an editor, and at the end of it you'll find code similar to this:
if __name__ == "__main__":
sl = screenlets.create_new_instance('NowPlayingScreenle t')
sl.main()
just change it with this code:
if __name__ == "__main__":
import screenlets.session
screenlets.session.create_session(NowPlayingScreen let)
I hope this information was useful for you, and I only ask for a link in the "official" (is it?) screenlets homepage to these forums.
Since this new version, screenlets need to create a session (I'm guessing here, haven't read any documentation, is there any?) in order to keep their state and other features, this was needed since there's no more daemon to control this (guessing again), ok, to the fix:
Open the widget you'll like to update in an editor, and at the end of it you'll find code similar to this:
if __name__ == "__main__":
sl = screenlets.create_new_instance('NowPlayingScreenle t')
sl.main()
just change it with this code:
if __name__ == "__main__":
import screenlets.session
screenlets.session.create_session(NowPlayingScreen let)
I hope this information was useful for you, and I only ask for a link in the "official" (is it?) screenlets homepage to these forums.