[accerciser/gtkbuilder] converted document attribs to gtkbuilder model
- From: Eitan Isaacson <eitani src gnome org>
- To: svn-commits-list gnome org
- Subject: [accerciser/gtkbuilder] converted document attribs to gtkbuilder model
- Date: Sun, 10 May 2009 11:31:35 -0400 (EDT)
commit 737c849550df9d8aebc437f5fb4d92547d84eef6
Author: Eitan Isaacson <eitan ascender com>
Date: Sun May 10 14:33:49 2009 +0300
converted document attribs to gtkbuilder model
---
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 d3368b8..75adbb8 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -638,19 +638,7 @@ class _SectionDocument(_InterfaceSection):
@type ui_xml: gtk.glade.XML
'''
# configure document attributes tree view
- treeview = ui_xml.get_object('docattrib_view')
- self.attr_model = gtk.ListStore(str, str)
- treeview.set_model(self.attr_model)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn()
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=0)
- treeview.append_column(tvc)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn()
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=1)
- treeview.append_column(tvc)
+ self.attr_model = ui_xml.get_object('docattrib_liststore')
self.label_locale = ui_xml.get_object('label_doc_locale')
def populateUI(self, acc):
diff --git a/plugins/interface_view.ui b/plugins/interface_view.ui
index 0663a74..70b81b6 100644
--- a/plugins/interface_view.ui
+++ b/plugins/interface_view.ui
@@ -38,6 +38,14 @@
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkListStore" id="docattrib_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>
@@ -971,7 +979,30 @@
<object class="GtkTreeView" id="docattrib_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="model">docattrib_liststore</property>
<property name="headers_visible">False</property>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn8">
+ <property name="title">column</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext8"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn9">
+ <property name="title">column</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext9"/>
+ <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]