public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Wiktor W Brodlo" <wiktor@brodlo.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/anaconda:master commit in: iw/
Date: Sat, 30 Jul 2011 03:16:18 +0000 (UTC)	[thread overview]
Message-ID: <0d22a93cf263497c7f72558e0def607e20162cd1.wiktor@gentoo> (raw)

commit:     0d22a93cf263497c7f72558e0def607e20162cd1
Author:     wiktor w brodlo <wiktor <AT> brodlo <DOT> net>
AuthorDate: Fri Jul 29 20:36:49 2011 +0000
Commit:     Wiktor W Brodlo <wiktor <AT> brodlo <DOT> net>
CommitDate: Fri Jul 29 20:36:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/anaconda.git;a=commit;h=0d22a93c

iw/mirrorselect_gui.py: change table into tree

---
 iw/mirrorselect_gui.py |   37 ++++++++++++++++---------------------
 1 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/iw/mirrorselect_gui.py b/iw/mirrorselect_gui.py
index daf50a7..35462a8 100644
--- a/iw/mirrorselect_gui.py
+++ b/iw/mirrorselect_gui.py
@@ -23,6 +23,7 @@ import gtk
 import gtk.glade
 import gtk.gdk
 import gobject
+import pygtk
 import pango
 import sys
 import gui
@@ -66,41 +67,35 @@ class MirrorselectWindow(InstallWindow):
 					
 		mirrors_parsed = self.parseMirrors(mirrorsf)
 		self.mirrors = self.mirrorList(mirrors_parsed, "http+ftp")
-	
-		self.table = self.xml.get_widget("mirrors_table")
 		
-		self.addMirrors(self.table, self.mirrors, mirrors_parsed)
+		self.addMirrors(self.mirrors, mirrors_parsed)
 	
 		return self.align
 	
-	def addMirrors(self, table, mirror_list, mirror_data):
+	def addMirrors(self, mirror_list, mirror_data):
 		(regions, countries, mirrors) = mirror_list
+		self.treestore = gtk.TreeStore(gtk.CheckButton, str, str, str)
 		for region in regions:
+			region_ts = self.treestore.append(None, [region])
 			for country in countries[region]:
+				country_ts = self.treestore.append(region_ts, [country])
 				for mirror in mirrors[country]:
-					self.addMirrorRow(table, region, country, mirror, mirror_data[region][country][mirror])
+					self.addMirrorRow(self.treestore, country_ts, region, country, mirror, mirror_data[region][country][mirror], )
+		treeview = gtk.TreeView(self.treestore)
+		treeview.append_column(_("Mirror URL"))
+		treeview.append_column(_("Mirror Name"))
+		treeview.append_column("IPv4?")
+		treeview.append_column("IPv6?")
 	
-	def addMirrorRow(self, table, region, country, mirror, data):
-		cols = table.get_property("n-columns")
-		rows = table.get_property("n-rows")
-		table.resize(rows+1, cols)
-		
+	def addMirrorRow(self, ts, country_ts, region, country, mirror, data):
 		cb = gtk.CheckButton(label=data["url"], use_underline=False)
-		name = gtk.Label("%s: %s\n%s" % (region, country, mirror))
-		name.set_alignment(0, 0)
 		
-		flags_text = data["proto"]
 		if data["ipv4"] == "y":
-			flags_text += " ipv4"
+			ipv4 += " ipv4"
 		if data["ipv6"] == "y":
-			flags_text += " ipv6"
-		flags = gtk.Label(flags_text)
-		flags.set_alignment(0, 0)
+			ipv6 += " ipv6"
 		
-		table.attach(cb, 0, 1, rows, rows+1, gtk.FILL)
-		table.attach(name, 1, 2, rows, rows+1)
-		table.attach(flags, 2, 3, rows, rows+1)
-		self.buttons.append(cb)
+		ts.append([cb, mirror, ipv4, ipv6])
 	
 	def downloadMirrorlist(self):
 		try:



             reply	other threads:[~2011-07-30  4:02 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30  3:16 Wiktor W Brodlo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-21  0:03 [gentoo-commits] proj/anaconda:master commit in: iw/ Wiktor W Brodlo
2011-08-21  0:03 Wiktor W Brodlo
2011-08-21  0:03 Wiktor W Brodlo
2011-08-21  0:03 Wiktor W Brodlo
2011-08-11 12:58 Wiktor W Brodlo
2011-08-04  2:16 Wiktor W Brodlo
2011-08-04  2:16 Wiktor W Brodlo
2011-08-04  2:16 Wiktor W Brodlo
2011-08-03 11:30 Wiktor W Brodlo
2011-08-03  9:47 Wiktor W Brodlo
2011-08-03  9:31 Wiktor W Brodlo
2011-08-03  9:16 Wiktor W Brodlo
2011-08-03  8:59 Wiktor W Brodlo
2011-08-03  8:51 Wiktor W Brodlo
2011-08-03  8:40 Wiktor W Brodlo
2011-08-03  2:52 Wiktor W Brodlo
2011-08-01  9:47 Wiktor W Brodlo
2011-08-01  9:39 Wiktor W Brodlo
2011-08-01  9:32 Wiktor W Brodlo
2011-08-01  9:09 Wiktor W Brodlo
2011-08-01  8:58 Wiktor W Brodlo
2011-08-01  1:59 Wiktor W Brodlo
2011-08-01  1:50 Wiktor W Brodlo
2011-08-01  1:41 Wiktor W Brodlo
2011-08-01  1:32 Wiktor W Brodlo
2011-08-01  1:24 Wiktor W Brodlo
2011-08-01  1:01 Wiktor W Brodlo
2011-08-01  0:53 Wiktor W Brodlo
2011-08-01  0:44 Wiktor W Brodlo
2011-08-01  0:35 Wiktor W Brodlo
2011-08-01  0:28 Wiktor W Brodlo
2011-08-01  0:17 Wiktor W Brodlo
2011-07-26 11:38 Wiktor W Brodlo
2011-07-26 11:27 Wiktor W Brodlo
2011-07-26 11:12 Wiktor W Brodlo
2011-07-23  0:18 Wiktor W Brodlo
2011-07-22 21:22 Wiktor W Brodlo
2011-07-22 19:34 Wiktor W Brodlo
2011-07-22 19:27 Wiktor W Brodlo
2011-07-22 19:16 Wiktor W Brodlo
2011-07-21 21:37 Wiktor W Brodlo
2011-07-21 21:21 Wiktor W Brodlo
2011-07-21 20:40 Wiktor W Brodlo
2011-07-21 16:40 Wiktor W Brodlo
2011-07-21 15:21 Wiktor W Brodlo
2011-07-21 15:04 Wiktor W Brodlo
2011-07-21 14:47 Wiktor W Brodlo
2011-07-21 14:36 Wiktor W Brodlo
2011-07-21 14:19 Wiktor W Brodlo
2011-07-21 13:47 Wiktor W Brodlo
2011-07-21 13:42 Wiktor W Brodlo
2011-07-21 12:43 Wiktor W Brodlo
2011-07-10  1:44 Wiktor W Brodlo
2011-07-09 22:43 Wiktor W Brodlo
2011-07-09 19:20 Wiktor W Brodlo
2011-07-09 19:06 Wiktor W Brodlo
2011-07-09 18:43 Wiktor W Brodlo
2011-07-08 16:18 Wiktor W Brodlo
2011-07-08 15:42 Wiktor W Brodlo
2011-07-07 20:35 Wiktor W Brodlo
2011-07-07 20:22 Wiktor W Brodlo
2011-07-07 18:58 Wiktor W Brodlo
2011-07-07 18:58 Wiktor W Brodlo
2011-07-05 12:36 Wiktor W Brodlo
2011-07-05 12:33 Wiktor W Brodlo
2011-07-05 12:22 Wiktor W Brodlo
2011-07-05 12:07 Wiktor W Brodlo
2011-07-04 16:32 Wiktor W Brodlo
2011-07-04 16:19 Wiktor W Brodlo
2011-07-04 15:16 Wiktor W Brodlo
2011-07-04 14:53 Wiktor W Brodlo
2011-07-04 14:40 Wiktor W Brodlo
2011-07-04 14:18 Wiktor W Brodlo
2011-07-04 14:17 Wiktor W Brodlo
2011-07-04 12:56 Wiktor W Brodlo
2011-07-04 12:42 Wiktor W Brodlo
2011-07-03 19:28 Wiktor W Brodlo
2011-07-03 19:21 Wiktor W Brodlo
2011-07-03 19:06 Wiktor W Brodlo
2011-07-03 18:59 Wiktor W Brodlo
2011-07-03 17:52 Wiktor W Brodlo
2011-07-03 17:15 Wiktor W Brodlo
2011-07-03 16:49 Wiktor W Brodlo
2011-07-03 16:41 Wiktor W Brodlo
2011-07-03 16:00 Wiktor W Brodlo
2011-07-03 15:54 Wiktor W Brodlo
2011-07-01  2:03 Wiktor W Brodlo
2011-06-21 13:40 Wiktor W Brodlo
2011-06-21 13:12 Wiktor W Brodlo
2011-06-21 13:04 Wiktor W Brodlo
2011-06-21 12:56 Wiktor W Brodlo
2011-06-21 12:43 Wiktor W Brodlo
2011-06-21 12:40 Wiktor W Brodlo
2011-06-21 12:15 Wiktor W Brodlo
2011-06-20 19:28 Wiktor W Brodlo
2011-06-20 19:07 Wiktor W Brodlo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d22a93cf263497c7f72558e0def607e20162cd1.wiktor@gentoo \
    --to=wiktor@brodlo.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox