aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiktor w brodlo <wiktor@brodlo.net>2011-08-01 01:24:16 +0000
committerwiktor w brodlo <wiktor@brodlo.net>2011-08-01 01:24:16 +0000
commit37c0a1e34298fb64ba7043a4c0fc0f17309f1df5 (patch)
tree6d27b8d76e28ba85f2b657f09aeb59ebc1d0e70e
parentiw/mirrorselect_gui.py: add the columns properly (diff)
downloadanaconda-37c0a1e34298fb64ba7043a4c0fc0f17309f1df5.tar.gz
anaconda-37c0a1e34298fb64ba7043a4c0fc0f17309f1df5.tar.bz2
anaconda-37c0a1e34298fb64ba7043a4c0fc0f17309f1df5.zip
iw/mirrorselect_gui.py: rework the treeview render slightly
-rw-r--r--iw/mirrorselect_gui.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/iw/mirrorselect_gui.py b/iw/mirrorselect_gui.py
index 57ebf1b..e5a2b13 100644
--- a/iw/mirrorselect_gui.py
+++ b/iw/mirrorselect_gui.py
@@ -82,10 +82,27 @@ class MirrorselectWindow(InstallWindow):
for mirror in mirrors[country]:
self.addMirrorRow(self.treestore, country_ts, region, country, mirror, mirror_data[region][country][mirror], )
treeview = gtk.TreeView(self.treestore)
- treeview.append_column(gtk.TreeViewColumn(_("Mirror URL")))
- treeview.append_column(gtk.TreeViewColumn(_("Mirror Name")))
- treeview.append_column(gtk.TreeViewColumn("IPv4?"))
- treeview.append_column(gtk.TreeViewColumn("IPv6?"))
+ url_column = gtk.TreeViewColumn(_("Mirror URL"))
+ treeview.append_column(url_column)
+ name_column = gtk.TreeViewColumn(_("Mirror Name"))
+ treeview.append_column(name_column)
+ ipv4_column = gtk.TreeViewColumn("IPv4?")
+ treeview.append_column(ipv4_column)
+ ipv6_column = gtk.TreeViewColumn("IPv6?")
+ treeview.append_column(ipv6_column)
+ url_cell = gtk.CellRendererToggle()
+ text_cell = gtk.CellRendererText()
+ url_column.pack_start(url_cell, True)
+ name_column.pack_start(text_cell, True)
+ ipv4_column.pack_start(text_cell, True)
+ ipv6_column.pack_start(text_cell, True)
+ url_column.add_attribute(url_cell, "activatable", 0)
+ name_column.add_attribute(text_cell, "text", 1)
+ ipv4_column.add_attribute(text_cell, "text", 2)
+ ipv6_column.add_attribute(text_cell, "text", 3)
+ treeview.set_search_column(1)
+ treeview.set_sort_column_id(0)
+
self.xml.get_widget("mirrors_viewport").add(treeview)