This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Introduce entry point for gui

  • Loading branch information...
1 parent 25982ad commit c3cd5180ae19c844579a8474b035b7bad4c0f455 @bkabrda bkabrda committed Aug 28, 2013
Showing with 16 additions and 13 deletions.
  1. +2 −13 da-gui.py
  2. +13 −0 devassistant/gui/__init__.py
  3. +1 −0 setup.py
View
@@ -21,17 +21,6 @@
#
# Authors:
# Petr Hracek <phracek@redhat.com>
+from devassistant.gui import run_gui
-import logging
-import sys
-from devassistant.gui import mainWindow
-
-
-try:
- from gi.repository import Gtk
-except RuntimeError, e:
- print _("devel-assistant requires a currently running X server.")
- print "%s: %r" % (e.__class__.__name__, str(e))
- sys.exit(1)
-
-mainWindow.mainWindow()
+run_gui()
@@ -0,0 +1,13 @@
+import sys
+
+from devassistant.gui import mainWindow
+
+def run_gui():
+ try:
+ from gi.repository import Gtk
+ except RuntimeError, e:
+ print _("Developer Assistant GUI requires a running X server.")
+ print "%s: %r" % (e.__class__.__name__, str(e))
+ sys.exit(1)
+
+ mainWindow.mainWindow()
View
@@ -64,6 +64,7 @@ def run(self):
entry_points = {'console_scripts':['da=devassistant.bin:CreatorAssistant.main',
'da-mod=devassistant.bin:ModifierAssistant.main',
'da-prep=devassistant.bin:PreparerAssistant.main',
+ 'da-gui=devassistant.gui:run_gui',
'devassistant=devassistant.bin:CreatorAssistant.main',
'devassistant-modify=devassistant.bin:ModifierAssistant.main',
'devassistant-prepare=devassistant.bin:PreparerAssistant.main']},

0 comments on commit c3cd518

Please sign in to comment.