[pitivi] application.py: add a --no-ui option which will not show a gui
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] application.py: add a --no-ui option which will not show a gui
- Date: Wed, 4 Nov 2009 15:44:28 +0000 (UTC)
commit 88fb9f3521f21fa8f9c12a0dc5269a81d4e6b99f
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Mon Oct 26 13:06:53 2009 -0700
application.py: add a --no-ui option which will not show a gui
pitivi/application.py | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index f382c34..d3594a8 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -230,16 +230,17 @@ class InteractivePitivi(Pitivi):
add_help = _("""Add each MEDIA_FILE to timeline after importing.""")
debug_help = _("""Run pitivi in the Python Debugger""")
+ no_ui_help = _("""Run pitivi with no gui""")
+
+ def __init__(self):
+ Pitivi.__init__(self)
+ self.mainloop = gobject.MainLoop()
+
def run(self, argv):
# check for dependencies
if not self._checkDependencies():
return
- # create the ui
- self.mainloop = gobject.MainLoop()
- self.gui = PitiviMainWindow(self)
- self.gui.show()
-
# parse cmdline options
parser = self._createOptionParser()
options, args = parser.parse_args(argv)
@@ -248,6 +249,12 @@ class InteractivePitivi(Pitivi):
sys.excepthook = self._excepthook
# validate options
+
+ if not options.no_ui:
+ # create the ui
+ self.gui = PitiviMainWindow(self)
+ self.gui.show()
+
if not options.import_sources and options.add_to_timeline:
parser.error("-a requires -i")
return
@@ -289,6 +296,8 @@ class InteractivePitivi(Pitivi):
action="store_true", default=False)
parser.add_option("-d", "--debug", help=self.debug_help,
action="store_true", default=False)
+ parser.add_option("-n", "--no-ui", help=self.no_ui_help,
+ action="store_true", default=False)
return parser
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]