[pitivi] ui/common: add conveience function to create gtk.TreeModels from python lists
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui/common: add conveience function to create gtk.TreeModels from python lists
- Date: Fri, 10 Dec 2010 17:49:05 +0000 (UTC)
commit 969dcf6608372f6e44260a9ff88d8f6a5dba86a5
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Fri Nov 19 17:56:54 2010 +0000
ui/common: add conveience function to create gtk.TreeModels from python lists
pitivi/ui/common.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/common.py b/pitivi/ui/common.py
index f949258..11a3d40 100644
--- a/pitivi/ui/common.py
+++ b/pitivi/ui/common.py
@@ -173,3 +173,9 @@ def roundedrec(context,x,y,w,h,r = 10):
context.curve_to(x,y,x,y,x+r,y) # Curve to A
return
+def model(columns, data):
+ ret = gtk.ListStore(*columns)
+ for datum in data:
+ ret.append(datum)
+ return ret
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]