Thursday, June 30, 2005

systray 0.2.1

The topic says it all. And as usual... i had to stay up... this time i think i just stayed till 1.00am... i'm getting lazy i guess :)

I have built up systray-0.2.1, and its looking good.

Here's the changelog so far.

1. Make Menu() and MenuItem() have default values for 'title' in constructor, so they can be blank.

1. Add MenuItem.add_submenu
2. implement the _App class inheriting from SysTrayIcon.SysTrayIcon
3. Added text and icon property to _App class which call refresh_icon, automatically
4. Modify App.start() to use _App() instead of SysTrayIcon.SysTrayIcon
5. Change App.start() to correctly set window_class_name of _App class
6. Refactor out MenuBase.
7. Reimplement MenuItem as a child of MenuBase, removing irrelevant attributes
8. Implement Menu as a chile of MenuBase, seperate from MenuItem.
9. Extend App to support both App.add_menu() and App.add_menuitem(), for unambigous usability
10. Modify App to have a default on_quit handler that does nothing, so it now always exits properly.
11. Rename default_onclick(s) to default_handler(s).
12. Create a module object DEFAULT_HANDLER to be the default_handler accessor object
13. Make App and MenuBase use DEFAULT_HANDLER as their default handlers for on_quit() and onclick() respecively
14. Added doc strings for _App and App, MenuBase, Menu, MenuItem.
15. Extend Menu to support SubMenus and MenuItems explicitly
16. Incoporate distutils framework for installation.

1. Initial Release
2. Create systray module
3. Build App class
4. Build MenuItem class

The source comes with a sample application, here is the code:

#--------- systray sample ---------------
from systray import *
import time

mitem_txtchg = systray.MenuItem('Change Text')

def txtchg_onclick(s):
s.text = 'systray sample - ' + str(time.clock())

mitem_txtchg.onclick = txtchg_onclick

menuitem_published = systray.MenuItem()
menuitem_published.icon = 'published.ico'

def menuitem_published_onclick(s):
s.icon = 'published.ico'

menuitem_published.onclick = menuitem_published_onclick

menuitem_default = systray.MenuItem()
menuitem_default.icon = 'default.ico'

def menuitem_default_onclick(s):
s.icon = 'default.ico'

menuitem_default.onclick = menuitem_default_onclick

menu_icon = systray.Menu('Icon')

st_sample = systray.App('systray sample', 'default.ico')




at this stage, i think i've side tracked enough from 'phiba'. What is phiba? phiba was why i got looking for the module in the first place... its supposed to be a home brewed blogger butt... ooopss.. blogger bot :)

I'll start work on this sometime tonite i guess... i have the blogger API docs, and now i have 'systray'. I think that was the last missing piece. i think i should have something exciting soon :)


At Wednesday, August 10, 2005 2:08:00 PM, Blogger Pedro Ribeiro said...

Nice dude, but... where is the systray-0.2.1 code? :)

At Wednesday, August 10, 2005 8:30:00 PM, Blogger Essien Ita Essien said...

my bad.

I'm putting it on SourceForge now. It has moved up to version 1.0 currently. i'll put a link up to it this nite.

At Wednesday, August 10, 2005 10:35:00 PM, Blogger Essien Ita Essien said...

ok... i've submitted the project to sourceforge... i'm just waiting to have it approved. I guess in the next too days i'll have a link to it. If you really want it bad bad ( :) ), i can mail it to you. Send me a mail to essiene | at | datavibe | dot | net.

At Monday, August 22, 2005 12:26:00 PM, Blogger Essien Ita Essien said...


Post a Comment

<< Home