forked from NDLUG/bazaar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·32 lines (24 loc) · 899 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class MyWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="The Bazaar")
self.box = Gtk.Box(spacing = 10)
self.button1 = Gtk.Button(label="Notre Dame Specific")
self.button1.connect("clicked", self.on_button1_clicked)
self.box.pack_start(self.button1, True, True, 0)
self.button2 = Gtk.Button(label="Other Software")
self.button2.connect("clicked", self.on_button2_clicked)
self.box.pack_start(self.button2, True, True, 0)
self.add(self.box)
self.set_default_size(800,600)
def on_button1_clicked(self, widget):
print("Button 1")
def on_button2_clicked(self, widget):
print("Button 2")
win = MyWindow()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()