From ce7f2cb8673438aded35d9bade5ae487fb2a1f6e Mon Sep 17 00:00:00 2001 From: wiktor w brodlo Date: Mon, 1 Aug 2011 09:31:24 +0000 Subject: iw/mirrorselect_gui.py: connect the toggle signal to the checkbutton --- iw/mirrorselect_gui.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/iw/mirrorselect_gui.py b/iw/mirrorselect_gui.py index c2c5caf..dacd225 100644 --- a/iw/mirrorselect_gui.py +++ b/iw/mirrorselect_gui.py @@ -80,7 +80,7 @@ class MirrorselectWindow(InstallWindow): for country in countries[region]: country_ts = self.treestore.append(region_ts, [gtk.Label(country), "", "", ""]) for mirror in mirrors[country]: - self.addMirrorRow(self.treestore, country_ts, region, country, mirror, mirror_data[region][country][mirror], ) + cb = self.addMirrorRow(self.treestore, country_ts, region, country, mirror, mirror_data[region][country][mirror], ) treeview = gtk.TreeView(self.treestore) url_column = gtk.TreeViewColumn(_("Mirror URL")) treeview.append_column(url_column) @@ -101,9 +101,15 @@ class MirrorselectWindow(InstallWindow): ipv4_column.add_attribute(text_cell, "text", 2) ipv6_column.add_attribute(text_cell, "text", 3) treeview.set_search_column(1) + url_cell.connect("toggled", self.toggleCB, cb) xml.get_widget("mirrors_viewport").add(treeview) + def toggleCB(self, cb): + if cb.get_active() = True + cb.set_active(False) + else + cb.set_active(True) def addMirrorRow(self, ts, country_ts, region, country, mirror, data): cb = gtk.CheckButton(label=data["url"], use_underline=False) @@ -116,7 +122,8 @@ class MirrorselectWindow(InstallWindow): ipv6 = " ipv6" ts.append(country_ts, [cb, mirror, ipv4, ipv6]) - ts.set(country_ts, COLUMN_EDITABLE, True) + return cb + def downloadMirrorlist(self): try: -- cgit v1.2.3-65-gdbad