View Single Post
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#46
Originally Posted by ossipena View Post

and I have a vision that there should be multiple layouts for the keypad. and if that is doable, qwerty keys will be there too as an option.
It's doable. I'd suggests a seperate module for it though. Some pseudo code:


vertsms.py
Code:
import keypad
...
# uncomment which ever layout you would like to use
window.add(keypad.standard)
#window.add(keypad.qwerty)
#window.add(keypad.bb) # mimicks blackberry pearl
...
keypad.py
Code:
import gtk
import hildon
...
def standard():
    table = gtk.Table(9, 3, True)
    # code defining the layout would go here
    return table

def qwerty(): pass

def bbpearl(): pass
If you glance at my repository, you'll see that I make use of SafeConfigParser, which would allow the user to change this option by changing a config file or eventually a preferences ui.

BTW, any way you can package the raw .py file instead of the binary pyc? It's probably easier for people to help contribute without having to go to the gitorious page just to have a peak at the code. Plus, using a binary file prevents the above snippet from being practical :-P
__________________
aspidites | blog | aspidites@inbox.com