aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'iw/mirrorselect_gui.py')
-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)