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: Sun,  3 Jul 2011 19:18:54 +0000 (UTC)	[thread overview]
Message-ID: <d098ced2c10103fac6e71bb7a2704326d785a51e.wiktor@gentoo> (raw)

commit:     d098ced2c10103fac6e71bb7a2704326d785a51e
Author:     wiktor w brodlo <wiktor <AT> brodlo <DOT> net>
AuthorDate: Sun Jul  3 19:18:40 2011 +0000
Commit:     Wiktor W Brodlo <wiktor <AT> brodlo <DOT> net>
CommitDate: Sun Jul  3 19:18:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/anaconda.git;a=commit;h=d098ced2

mirrorselect-sync

---
 dispatch.py                 |    2 +-
 gui.py                      |    2 +-
 installclass.py             |    1 +
 iw/mirrorselect-sync_gui.py |   70 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/dispatch.py b/dispatch.py
index 073dc2c..4ade775 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -97,7 +97,7 @@ installSteps = [
 
     # Installing the Gentoo Base System
     ("mirrorselect", ),
-    #("mirrorselect-sync", ),
+    ("mirrorselect-sync", ),
     # profile
     # use
 

diff --git a/gui.py b/gui.py
index addce82..41f127c 100755
--- a/gui.py
+++ b/gui.py
@@ -81,7 +81,7 @@ stepToClass = {
 
     # Installing the Gentoo Base System
     "mirrorselect": ("mirrorselect_gui", "MirrorselectWindow"),
-    #("mirrorselect-sync", ),
+    "mirrorselect-sync": ("mirrorselect-sync_gui", "MirrorselectSyncWindow"),
     
     # Configuring the Kernel
     "timezone" : ("timezone_gui", "TimezoneWindow"),

diff --git a/installclass.py b/installclass.py
index 561ccdf..28104d8 100644
--- a/installclass.py
+++ b/installclass.py
@@ -104,6 +104,7 @@ class BaseInstallClass(object):
 
          # Installing the Gentoo Base System
          "mirrorselect",
+         "mirrorselect-sync",
 
          # Configuring the Kernel
          "timezone",

diff --git a/iw/mirrorselect-sync_gui.py b/iw/mirrorselect-sync_gui.py
new file mode 100644
index 0000000..17d84ec
--- /dev/null
+++ b/iw/mirrorselect-sync_gui.py
@@ -0,0 +1,70 @@
+#
+# mirrorselect-sync_gui.py: gui mirrorselect.
+#
+# Copyright (C) 2011 wiktor w brodlo
+# Copyright (C) 2011 Gentoo Foundation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import string
+import gtk
+import gtk.glade
+import gtk.gdk
+import gobject
+import pango
+import sys
+import gui
+import os
+from mirrorselect_gui import MirrorselectWindow
+
+from iw_gui import *
+
+from constants import *
+import gettext
+_ = lambda x: gettext.ldgettext("anaconda", x)
+
+class MirrorselectSyncWindow(InstallWindow):
+	def getNext(self):
+		return None
+
+	def getScreen(self, anaconda):
+		self.anaconda = anaconda
+		self.intf = anaconda.intf  
+		ms = MirrorselectWindow()
+		
+		(self.xml, self.align) = gui.getGladeWidget("mirrorselect.glade", "mirrorselect_align")
+		
+		mirrorsf = None
+		
+		while mirrorsf == None:
+			# Try downloading the mirrorlist
+			mirrorsf = ms.downloadMirrorlist()
+			# if failed, 
+			if mirrorsf == None:
+				md = gtk.MessageDialog(buttons=gtk.BUTTONS_YES_NO)
+				md.set_property("title", _("Failed to download mirrorlist"))
+				md.set_property("text", _("Failed to download the mirror list. Would you like to try again?\nPressing 'No' will abort the installation."))
+				if md.run() == gtk.RESPONSE_NO:
+					md.destroy()
+					InstallControlWindow._doExit([])
+					
+		mirrors_parsed = ms.parseMirrors(mirrorsf)
+		self.mirrors = ms.mirrorList(mirrors_parsed, "rsync")
+	
+		self.table = self.xml.get_widget("mirrors_table")
+		
+		ms.addMirrors(self.table, self.mirrors, mirrors_parsed)
+	
+		return self.align



             reply	other threads:[~2011-07-03 19:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 19:18 Wiktor W Brodlo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-21 20:33 [gentoo-commits] proj/anaconda:master commit in: /, iw/ Wiktor W Brodlo
2011-07-21 14:12 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 23:05 Wiktor W Brodlo
2011-07-20 22:26 Wiktor W Brodlo
2011-07-20 22:09 Wiktor W Brodlo
2011-07-07 18:02 Wiktor W Brodlo
2011-07-07 18:00 Wiktor W Brodlo
2011-07-07 17:22 Wiktor W Brodlo
2011-07-04 22:24 Wiktor W Brodlo
2011-07-04 16:04 Wiktor W Brodlo
2011-07-03 18:59 Wiktor W Brodlo
2011-06-30 22:12 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=d098ced2c10103fac6e71bb7a2704326d785a51e.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