[accerciser/gtkbuilder] convert streamable content to gtkbuilder liststore
- From: Eitan Isaacson <eitani src gnome org>
- To: svn-commits-list gnome org
- Subject: [accerciser/gtkbuilder] convert streamable content to gtkbuilder liststore
- Date: Sun, 10 May 2009 11:31:45 -0400 (EDT)
commit c91b7148cb4aec71d52db0ec41bc78a2e086e072
Author: Eitan Isaacson <eitan ascender com>
Date: Sun May 10 14:43:13 2009 +0300
convert streamable content to gtkbuilder liststore
---
plugins/interface_view.py | 14 +-------------
plugins/interface_view.ui | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/plugins/interface_view.py b/plugins/interface_view.py
index 208fa24..60ac22f 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -976,19 +976,7 @@ class _SectionStreamableContent(_InterfaceSection):
@type ui_xml: gtk.glade.XML
'''
# configure streamable content tree view
- treeview = ui_xml.get_object('treeview_streams')
- self.streams_model = gtk.ListStore(str, str)
- treeview.set_model(self.streams_model)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn(_('Content type'))
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=0)
- treeview.append_column(tvc)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn(_('URI'))
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=1)
- treeview.append_column(tvc)
+ self.streams_model = ui_xml.get_object('streams_liststore')
def populateUI(self, acc):
'''
diff --git a/plugins/interface_view.ui b/plugins/interface_view.ui
index b4b1573..2b652ec 100644
--- a/plugins/interface_view.ui
+++ b/plugins/interface_view.ui
@@ -46,6 +46,14 @@
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkListStore" id="streams_liststore">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name gchararray2 -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
<object class="GtkFrame" id="iface_view_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
@@ -1508,6 +1516,29 @@
<object class="GtkTreeView" id="treeview_streams">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="model">streams_liststore</property>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn11">
+ <property name="title">Content type</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext12"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn12">
+ <property name="title">URI</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext13"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]