[pitivi] dynamic.py: update widget test suites
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] dynamic.py: update widget test suites
- Date: Tue, 17 Aug 2010 07:07:42 +0000 (UTC)
commit 332a557790ea18b95f1c770091e7c7a583d64e50
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Thu Apr 1 12:57:34 2010 -0700
dynamic.py: update widget test suites
pitivi/ui/dynamic.py | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/ui/dynamic.py b/pitivi/ui/dynamic.py
index a5334b3..bccaa78 100644
--- a/pitivi/ui/dynamic.py
+++ b/pitivi/ui/dynamic.py
@@ -561,6 +561,8 @@ if __name__ == '__main__':
(PathWidget, "file:///home/", ()),
(TextWidget, "banana", ()),
(TextWidget, "words only", ("^([a-zA-Z]+\s*)+$",)),
+ (TextWidget, "numbers only", ("^\d+$",
+ ("12", "14"))),
(NumericWidget, 42, (100, 1)),
(ToggleWidget, True, ()),
(ChoiceWidget, "banana", ((
@@ -569,13 +571,22 @@ if __name__ == '__main__':
("pear", "pear")),)),
(ColorWidget, 0x336699FF, (int,)),
(FontWidget, "Sans 9", ()),
- (FractionWidget, gst.Fraction(25000, 10001),
+ (FractionWidget, "30M",
(gst.FractionRange(gst.Fraction(1, 1),
gst.Fraction(30000, 1001)),)),
- (FractionWidget, gst.Fraction(25000, 10001),
- (gst.FractionRange(gst.Fraction(1, 1),
- gst.Fraction(30000, 1001)),
- (gst.Fraction(25,1), gst.Fraction(30,1))))
+ (FractionWidget, gst.Fraction(25000, 1001),
+ (
+ gst.FractionRange(
+ gst.Fraction(1, 1),
+ gst.Fraction(30000, 1001)
+ ),
+ (
+ "25:1",
+ gst.Fraction(30,1),
+ "30M",
+ ),
+ )
+ ),
)
W = gtk.Window()
@@ -584,8 +595,8 @@ if __name__ == '__main__':
for y, (klass, default, args) in enumerate(widgets):
w = klass(*args)
- l = gtk.Label(str(default))
w.setWidgetValue(default)
+ l = gtk.Label(str(w.getWidgetValue()))
w.connectValueChanged(valueChanged, w, l)
w.show()
l.show()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]