"on_button9_clicked" : self.keypad_clicked,
"on_button10_clicked" : self.keypad_clicked,
"on_button11_clicked" : self.keypad_clicked,
+ "on_button11_clicked" : self.keypad_clicked,
+ "on_door_toggled" : self.door_changed,
"on_vvend_destroy_event" : self.quit,
"on_vvend_delete_event" : self.quit }
self.wTree.signal_autoconnect (dic)
display = self.wTree.get_widget("label1")
label_font = pango.FontDescription('monospace 28')
display.modify_font(label_font)
+
+ label_style = display.get_style().copy()
+ fg_color = display.get_colormap().alloc_color('lightgreen')
+ label_style.fg[gtk.STATE_NORMAL] = fg_color
+ display.set_style(label_style)
+
+ w = self.wTree.get_widget("eventbox1")
+ wstyle = w.get_style().copy()
+ bg_color = w.get_colormap().alloc_color('black')
+ wstyle.bg[gtk.STATE_NORMAL] = bg_color
+ w.set_style(wstyle)
+
display.set_text("*5N4CK0RZ*")
# vending machine password set here
key = '0'+key
self.do_send('2'+key+' keypress\n')
+ def door_changed(self, widget):
+ print 'Door changed to', widget.pressed()
+ pass
+
def handleNewConnection(self,source,condition):
#source is a socket in GTK v 1 and a fd in version 2
conn, addr = source.accept()