[pitivi] validate: Add a way to inspect action types from pitivi
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] validate: Add a way to inspect action types from pitivi
- Date: Thu, 11 Jun 2015 09:15:37 +0000 (UTC)
commit 57754466da05ecbfba6b9e32f976a829f3b7fa61
Author: Thibault Saunier <tsaunier gnome org>
Date: Sat Apr 18 11:53:36 2015 +0200
validate: Add a way to inspect action types from pitivi
We can not use GOption from the introspection so bypass the command
line management interface of GApplication and get it done.
pitivi/check.py | 10 +++++++++-
pitivi/utils/validate.py | 4 ++--
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/check.py b/pitivi/check.py
index 0a29639..203de5b 100644
--- a/pitivi/check.py
+++ b/pitivi/check.py
@@ -260,7 +260,15 @@ def initialize_modules():
res, sys.argv = GES.init_check(sys.argv)
from pitivi.utils import validate
- validate.init()
+ if validate.init() and "--inspect-action-type" in sys.argv:
+ try:
+ action_type = [sys.argv[1 + sys.argv.index("--inspect-action-type")]]
+ except IndexError:
+ action_type = []
+ if validate.GstValidate.print_action_types(action_type):
+ exit(0)
+ else:
+ exit(1)
"""
diff --git a/pitivi/utils/validate.py b/pitivi/utils/validate.py
index b69657a..b6ae0c5 100644
--- a/pitivi/utils/validate.py
+++ b/pitivi/utils/validate.py
@@ -492,7 +492,6 @@ def init():
remove_clip, None,
"Remove clip",
GstValidate.ActionTypeFlags.NONE)
-
GstValidate.register_action_type("select-clips", "pitivi",
select_clips, [Parametter("clip-name",
"The name of the clip to select",
@@ -513,6 +512,7 @@ def init():
"All sink should display their images in an embedded "
"widget and thus not create a new window",
GstValidate.ReportLevel.CRITICAL))
-
+ return True
except ImportError:
has_validate = False
+ return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]