Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..2903809
--- /dev/null
+++ b/main.py
@@ -0,0 +1,33 @@
+'''
+Created on 11 Jan 2013
+
+@author: cgueret
+'''
+from gi.repository import Gtk, Gio
+from Application import Main
+
+class QuizApplication(Gtk.Application):
+ def __init__(self):
+ Gtk.Application.__init__(self, application_id="nl.vu.quiz", flags=Gio.ApplicationFlags.FLAGS_NONE)
+ self.connect("activate", self.on_activate)
+
+ def on_activate(self, data=None):
+ # Create the main part of the application
+ main = Main()
+ main_box = main.get_widget()
+
+ # Create the window
+ window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL)
+ window.set_default_size(600,450)
+ window.set_title("Quiz activity")
+ window.set_border_width(2)
+ window.set_position(Gtk.WindowPosition.CENTER)
+ window.add(main_box)
+
+ # Show the window and add it to the application
+ window.show_all()
+ self.add_window(window)
+
+if __name__ == "__main__":
+ app = QuizApplication()
+ app.run(None)