|
|
2010-07-15
, 19:42
|
|
Posts: 56 |
Thanked: 31 times |
Joined on Jul 2008
@ Austria
|
#2
|
| The Following User Says Thank You to dannym For This Useful Post: | ||
|
|
2010-07-15
, 20:25
|
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#3
|
import gtk
import hildon
def enable_zoom_cb(window):
window.window.property_change(gtk.gdk.atom_intern("_HILDON_ZOOM_KEY_ATOM"), gtk.gdk.atom_intern("INTEGER"), 32, gtk.gdk.PROP_MODE_REPLACE, [1]);
def enable_zoom_keys(window):
if window.flags() & gtk.REALIZED:
enable_zoom_cb(window)
else:
window.connect("realize", enable_zoom_cb)
def key_press_handler(widget, event):
if event.keyval in [hildon.KEY_DECREASE, hildon.KEY_INCREASE]:
hildon.hildon_banner_show_information(widget, "None", "A zoom key hit")
return True
return False
window = hildon.Window()
enable_zoom_keys(window)
window.connect("key-press-event", key_press_handler)
window.show_all()
gtk.main()
Help greatly appreciated