]> git.datanom.net - lensdatabase.git/blobdiff - lensdb.py
Initial version
[lensdatabase.git] / lensdb.py
index 9af58628650a5f82b7aebe6c625dc518ef57dddc..cdc9200fb441b9c5ef74a53de2491f19b8e4a67f 100644 (file)
--- a/lensdb.py
+++ b/lensdb.py
@@ -1,25 +1,20 @@
 #!/usr/bin/python
 
 #!/usr/bin/python
 
-import gi
+try:
+    import gi, os
+except ImportError as err:
+    print (err)
+    os._exit(1)
+
+from main import MainWindow
 
 gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk
 
 
 gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk
 
-dirty = False
-
-class Handler:
-       def onDestroy(self, *args):
-               Gtk.main_quit()
-       def onQuit(self, *args):
-               if dirty:
-                       """ show warning """
-               self.onDestroy(self, args)
-
-builder = Gtk.Builder()
-builder.add_from_file("lensdatabase.ui")
-builder.connect_signals(Handler())
-
-window = builder.get_object("main_window")
-window.show_all()
+def Main():
+    path = os.path.dirname(os.path.realpath(__file__))
+    MainWindow(path)
+    Gtk.main()
 
 
-Gtk.main()
+if __name__ == "__main__":
+    Main()
This page took 0.029078 seconds and 5 git commands to generate.