34 lines
950 B
Python
34 lines
950 B
Python
|
|
import gtk
|
|
import gobject
|
|
|
|
class AboutWindow:
|
|
def __init__(self):
|
|
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
|
self.window.set_title('About')
|
|
self.window.connect("key-press-event", self.window_key_press_event)
|
|
|
|
vbox = gtk.VBox()
|
|
vbox.pack_start(gtk.Label('''Experimental DornerWorks Time Tracker
|
|
|
|
Authors:
|
|
Josh Holtrop
|
|
Andrew Buter'''))
|
|
close = gtk.Button('Close')
|
|
close.connect("clicked", self.close_clicked)
|
|
hbox = gtk.HBox()
|
|
hbox.pack_start(gtk.Label())
|
|
hbox.pack_start(close, expand = False)
|
|
hbox.pack_start(gtk.Label())
|
|
vbox.pack_end(hbox)
|
|
|
|
self.window.add(vbox)
|
|
self.window.show_all()
|
|
|
|
def window_key_press_event(self, widget, event, data=None):
|
|
if event.keyval == gtk.gdk.keyval_from_name("Escape"):
|
|
self.window.destroy()
|
|
|
|
def close_clicked(self, widget, data=None):
|
|
self.window.destroy()
|