[accerciser/gtkbuilder] changed actions view to use GtkBuilder ListStore
- From: Eitan Isaacson <eitani src gnome org>
- To: svn-commits-list gnome org
- Subject: [accerciser/gtkbuilder] changed actions view to use GtkBuilder ListStore
- Date: Sun, 10 May 2009 11:31:30 -0400 (EDT)
commit 70bfd3c5fb0de1313d4e0faefeb286478cbff6ec
Author: Eitan Isaacson <eitan ascender com>
Date: Sun May 10 13:10:54 2009 +0300
changed actions view to use GtkBuilder ListStore
---
plugins/interface_view.py | 18 +----------------
plugins/interface_view.ui | 46 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 17 deletions(-)
diff --git a/plugins/interface_view.py b/plugins/interface_view.py
index f99f507..d3368b8 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -446,23 +446,7 @@ class _SectionAction(_InterfaceSection):
'''
# configure actions tree view
treeview = ui_xml.get_object('treeview_action')
- self.actions_model = gtk.ListStore(int, str, str, str)
- treeview.set_model(self.actions_model)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn(_('Name'))
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=1)
- treeview.append_column(tvc)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn(_('Description'))
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=2)
- treeview.append_column(tvc)
- crt = gtk.CellRendererText()
- tvc = gtk.TreeViewColumn(_('Key binding'))
- tvc.pack_start(crt, True)
- tvc.set_attributes(crt, text=3)
- treeview.append_column(tvc)
+ self.actions_model = treeview.get_model()
self.action_selection = treeview.get_selection()
show_button = ui_xml.get_object('button_action_do')
show_button.set_sensitive(self._isSelectedInView(self.action_selection))
diff --git a/plugins/interface_view.ui b/plugins/interface_view.ui
index b74fb98..0663a74 100644
--- a/plugins/interface_view.ui
+++ b/plugins/interface_view.ui
@@ -26,6 +26,18 @@
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkListStore" id="actions_liststore">
+ <columns>
+ <!-- column-name gint1 -->
+ <column type="gint"/>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name gchararray2 -->
+ <column type="gchararray"/>
+ <!-- column-name gchararray3 -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
<object class="GtkFrame" id="iface_view_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
@@ -406,7 +418,41 @@
<object class="GtkTreeView" id="treeview_action">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="model">actions_liststore</property>
<signal name="row_activated" handler="_onActionRowActivated"/>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn5">
+ <property name="title">Name</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext5"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn6">
+ <property name="title">Description</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext6"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn7">
+ <property name="title">Key binding</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext7"/>
+ <attributes>
+ <attribute name="text">3</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]