diff options
author | 2011-08-01 09:31:24 +0000 | |
---|---|---|
committer | 2011-08-01 09:31:24 +0000 | |
commit | ce7f2cb8673438aded35d9bade5ae487fb2a1f6e (patch) | |
tree | 49ae7213115f45c51741a1016399a8f9e876b39a | |
parent | iw/mirrorselect_gui.py: typo (diff) | |
download | anaconda-ce7f2cb8673438aded35d9bade5ae487fb2a1f6e.tar.gz anaconda-ce7f2cb8673438aded35d9bade5ae487fb2a1f6e.tar.bz2 anaconda-ce7f2cb8673438aded35d9bade5ae487fb2a1f6e.zip |
iw/mirrorselect_gui.py: connect the toggle signal to the checkbutton
-rw-r--r-- | iw/mirrorselect_gui.py | 11 |
1 files 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: |