1 |
commit: ce7f2cb8673438aded35d9bade5ae487fb2a1f6e |
2 |
Author: wiktor w brodlo <wiktor <AT> brodlo <DOT> net> |
3 |
AuthorDate: Mon Aug 1 09:31:24 2011 +0000 |
4 |
Commit: Wiktor W Brodlo <wiktor <AT> brodlo <DOT> net> |
5 |
CommitDate: Mon Aug 1 09:31:24 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/anaconda.git;a=commit;h=ce7f2cb8 |
7 |
|
8 |
iw/mirrorselect_gui.py: connect the toggle signal to the checkbutton |
9 |
|
10 |
--- |
11 |
iw/mirrorselect_gui.py | 11 +++++++++-- |
12 |
1 files changed, 9 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/iw/mirrorselect_gui.py b/iw/mirrorselect_gui.py |
15 |
index c2c5caf..dacd225 100644 |
16 |
--- a/iw/mirrorselect_gui.py |
17 |
+++ b/iw/mirrorselect_gui.py |
18 |
@@ -80,7 +80,7 @@ class MirrorselectWindow(InstallWindow): |
19 |
for country in countries[region]: |
20 |
country_ts = self.treestore.append(region_ts, [gtk.Label(country), "", "", ""]) |
21 |
for mirror in mirrors[country]: |
22 |
- self.addMirrorRow(self.treestore, country_ts, region, country, mirror, mirror_data[region][country][mirror], ) |
23 |
+ cb = self.addMirrorRow(self.treestore, country_ts, region, country, mirror, mirror_data[region][country][mirror], ) |
24 |
treeview = gtk.TreeView(self.treestore) |
25 |
url_column = gtk.TreeViewColumn(_("Mirror URL")) |
26 |
treeview.append_column(url_column) |
27 |
@@ -101,9 +101,15 @@ class MirrorselectWindow(InstallWindow): |
28 |
ipv4_column.add_attribute(text_cell, "text", 2) |
29 |
ipv6_column.add_attribute(text_cell, "text", 3) |
30 |
treeview.set_search_column(1) |
31 |
+ url_cell.connect("toggled", self.toggleCB, cb) |
32 |
|
33 |
xml.get_widget("mirrors_viewport").add(treeview) |
34 |
|
35 |
+ def toggleCB(self, cb): |
36 |
+ if cb.get_active() = True |
37 |
+ cb.set_active(False) |
38 |
+ else |
39 |
+ cb.set_active(True) |
40 |
|
41 |
def addMirrorRow(self, ts, country_ts, region, country, mirror, data): |
42 |
cb = gtk.CheckButton(label=data["url"], use_underline=False) |
43 |
@@ -116,7 +122,8 @@ class MirrorselectWindow(InstallWindow): |
44 |
ipv6 = " ipv6" |
45 |
|
46 |
ts.append(country_ts, [cb, mirror, ipv4, ipv6]) |
47 |
- ts.set(country_ts, COLUMN_EDITABLE, True) |
48 |
+ return cb |
49 |
+ |
50 |
|
51 |
def downloadMirrorlist(self): |
52 |
try: |