Switched from GtkTree to GtkCTree
svn: r793
This commit is contained in:
parent
2851a83522
commit
09c333dbdb
@ -569,7 +569,8 @@ class GrampsPreferences:
|
||||
"on_help_clicked" : self.on_propertybox_help,
|
||||
"on_color_toggled" : self.on_color_toggled,
|
||||
"on_color_set" : self.on_color_set,
|
||||
"on_object_toggled" : self.on_object_toggled
|
||||
"on_object_toggled" : self.on_object_toggled,
|
||||
"on_tree_select_row" : self.select
|
||||
})
|
||||
|
||||
self.window = self.top.get_widget("preferences")
|
||||
@ -585,20 +586,14 @@ class GrampsPreferences:
|
||||
self.apply.set_sensitive(0)
|
||||
|
||||
def build_tree(self):
|
||||
self.tree.show()
|
||||
prev = None
|
||||
for (name,list) in panellist:
|
||||
item = gtk.GtkTreeItem(name)
|
||||
item.show()
|
||||
item.connect("select",self.select,0)
|
||||
self.tree.append(item)
|
||||
subtree = gtk.GtkTree()
|
||||
subtree.show()
|
||||
item.set_subtree(subtree)
|
||||
node = self.tree.insert_node(None,prev,[name],is_leaf=0,expanded=1)
|
||||
self.tree.node_set_row_data(node,0)
|
||||
next = None
|
||||
for (subname,tab) in list:
|
||||
newitem = gtk.GtkTreeItem(subname)
|
||||
newitem.show()
|
||||
newitem.connect("select",self.select,tab)
|
||||
subtree.append(newitem)
|
||||
next = self.tree.insert_node(node,next,[subname],is_leaf=1,expanded=1)
|
||||
self.tree.node_set_row_data(next,tab)
|
||||
|
||||
def build(self):
|
||||
auto = self.top.get_widget("autoload")
|
||||
@ -862,7 +857,8 @@ class GrampsPreferences:
|
||||
table.attach(w[0],0,2,col,col+1,GTK.FILL|GTK.EXPAND,GTK.SHRINK,5,5)
|
||||
col = col + 1
|
||||
|
||||
def select(self,obj,data):
|
||||
def select(self,obj,node,other):
|
||||
data = self.tree.node_get_row_data(node)
|
||||
self.panel.set_page(data)
|
||||
|
||||
def on_propertybox_help(self,obj):
|
||||
|
@ -144,13 +144,41 @@
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkTree</class>
|
||||
<class>GtkScrolledWindow</class>
|
||||
<name>scrolledwindow1</name>
|
||||
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
|
||||
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
|
||||
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
|
||||
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
|
||||
|
||||
<widget>
|
||||
<class>GtkCTree</class>
|
||||
<name>tree</name>
|
||||
<border_width>10</border_width>
|
||||
<width>175</width>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>tree_select_row</name>
|
||||
<handler>on_tree_select_row</handler>
|
||||
<last_modification_time>Sat, 23 Feb 2002 06:03:41 GMT</last_modification_time>
|
||||
</signal>
|
||||
<columns>1</columns>
|
||||
<column_widths>80</column_widths>
|
||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||
<view_mode>GTK_TREE_VIEW_ITEM</view_mode>
|
||||
<view_line>True</view_line>
|
||||
<show_titles>False</show_titles>
|
||||
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<child_name>CTree:title</child_name>
|
||||
<name>label101</name>
|
||||
<label>GRAMPS</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user