From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QjtWR-000336-03 for garchives@archives.gentoo.org; Thu, 21 Jul 2011 13:42:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B23C21C224; Thu, 21 Jul 2011 13:42:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2DA4321C224 for ; Thu, 21 Jul 2011 13:42:22 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A47E31B4011 for ; Thu, 21 Jul 2011 13:42:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 8CA238003D for ; Thu, 21 Jul 2011 13:42:20 +0000 (UTC) From: "Wiktor W Brodlo" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Wiktor W Brodlo" Message-ID: Subject: [gentoo-commits] proj/anaconda:master commit in: iw/ X-VCS-Repository: proj/anaconda X-VCS-Files: iw/welcome_gui.py X-VCS-Directories: iw/ X-VCS-Committer: wiktor X-VCS-Committer-Name: Wiktor W Brodlo X-VCS-Revision: b8b73c7edc37bbc5f121ff761104a44cd65d81db Date: Thu, 21 Jul 2011 13:42:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 73babd71540d2750c1929df33197435e commit: b8b73c7edc37bbc5f121ff761104a44cd65d81db Author: wiktor w brodlo brodlo net> AuthorDate: Thu Jul 21 13:41:10 2011 +0000 Commit: Wiktor W Brodlo brodlo net> CommitDate: Thu Jul 21 13:41:10 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/anaconda.git;= a=3Dcommit;h=3Db8b73c7e iw/welcome_gui.py: rework the system for easy extensibility --- iw/welcome_gui.py | 142 ++++++++++++++++++++++++++++-------------------= ----- 1 files changed, 76 insertions(+), 66 deletions(-) diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py index b7576e8..01f3f31 100644 --- a/iw/welcome_gui.py +++ b/iw/welcome_gui.py @@ -28,79 +28,89 @@ _ =3D lambda x: gettext.ldgettext("anaconda", x) =20 class WelcomeWindow (InstallWindow): =20 - def setWindow(self, title, text, chapter, linktext=3DNone): - (xml, align) =3D gui.getGladeWidget("welcome.glade", "welcome_al= ign") - title_ =3D self.xml.get_widget("title") - text_ =3D self.xml.get_widget("text") - title_.set_markup("%s") - title_.set_attribute("label", _("Chapter %i: %s") % (chapter, ti= tle)) - text_.set_attribute("text", text) - - def welcome(self, anaconda): - self.setWindow(_("Welcome to the Gentoo installer!"), - _("This wizard will take you through installing G= entoo \ - on your computer. We will follow the official = Gentoo \ - Handbook (with a few changes) and if at any po= int \ - you'd like to consult the handbook, you'll fin= d the \ - link in the top-right corner of the window.\n\= n\ - We'll start off asking you for the language an= d \ - keyboard layout you'd like the installer and y= our \ - future system to use. We will then skip straig= ht to \ - Chapter 4 and continue with the installation."= ), - 0, "Gentoo Handbook") + windows =3D {=20 + "welcome" : ( + _("Welcome to the Gentoo installer!"), + _("This wizard will take you through installing Gentoo \ + on your computer. We will follow the official Gentoo \ + Handbook (with a few changes) and if at any point \ + you'd like to consult the handbook, you'll find the \ + link in the top-right corner of the window.\n\n\ + We'll start off asking you for the language and \ + keyboard layout you'd like the installer and your \ + future system to use. We will then skip straight to \ + Chapter 4 and continue with the installation."), + 0, "Gentoo Handbook"), =20 - def preparedisks(self, anaconda): - self.setWindow(_("Preparing the Disks"), - _("To be able to install Gentoo, you must create = the \ - necessary partitions. The following screens wi= ll \ - help you choose the right disk configuration f= or \ - your system."), 4) + "preparedisks" : ( + _("Preparing the Disks"), + _("To be able to install Gentoo, you must create the \ + necessary partitions. The following screens will \ + help you choose the right disk configuration for \ + your system."), + 4, None), =20 - def installationfiles(self, anaconda): - self.setWindow(_("Installing the Gentoo Installation Files"), - _("Gentoo installs work through a stage3 archive.= In \ - this chapter the installer will help you choos= e the \ - right compilation options for your machine. ")= , 5) + "installationfiles" : ( + _("Installing the Gentoo Installation Files"), + _("Gentoo installs work through a stage3 archive. In \ + this chapter the installer will help you choose the \ + right compilation options for your machine. "), + 5, None), =20 - def basesystem(self, anaconda): - self.setWindow(_("Installing the Gentoo Installation Files"), - _("In this chapter you will set your Gentoo mirro= rs, \ - select your profile and choose your the USE fl= ags."), - 6) + "basesystem" : ( + _("Installing the Gentoo Installation Files"), + _("In this chapter you will set your Gentoo mirrors, \ + select your profile and choose your the USE flags."), + 6, None), =20 - def configurekernel(self, anaconda): - self.setWindow(_("Configuring the Kernel"), - _("The Linux kernel is the core of every distribu= tion. \ - This chapter explains how to configure your ke= rnel. \ - You will only have to set your timezone, as th= e \ - installer will just copy the LiveDVD kernel to= your \ - new system."), - 7) + "configurekernel": ( + _("Configuring the Kernel"), + _("The Linux kernel is the core of every distribution. \ + This chapter explains how to configure your kernel. \ + You will only have to set your timezone, as the \ + installer will just copy the LiveDVD kernel to your \ + new system."), + 7, None), =20 - def configuresystem(self, anaconda): - self.setWindow(_("Configuring your System"), - _("In this chapter you will only have to set your= root \ - password as the rest is figured out automatica= lly ;-)"), - 8) + "configuresystem" : ( + _("Configuring your System"), + _("In this chapter you will only have to set your root \ + password as the rest is figured out automatically ;-)"), + 8, None), =20 - def systools(self, anaconda): - self.setWindow(_("Installing Necessary System Tools"), - _("In this chapter we help you choose and install= some important tools."), - 9) + "systools" : ( + _("Installing Necessary System Tools"), + _("In this chapter we help you choose and install some impor= tant tools."), + 9, None), =20 - def bootloader(self, anaconda): - self.setWindow(_("Configuring the Bootloader"), - _("In this chapter you'll be able configure the G= RUB \ - bootloader."), - 10) + "bootloader" : ( + _("Configuring the Bootloader"), + _("In this chapter you'll be able configure the GRUB bootloa= der."), + 10, None), =20 - def finalizing(self, anaconda): - self.setWindow(_("Finalizing your Gentoo Installation"), - _("You're almost done. We'll just create a user f= or \ - your system.\n\ - You'll also be able to choose if you'd like th= e X \ - Window System and a desktop environment instal= led on \ - your new system. "), - 11) + "finalizing" : ( + _("Finalizing your Gentoo Installation"), + _("You're almost done. We'll just create a user for \ + your system.\n\ + You'll also be able to choose if you'd like the X \ + Window System and a desktop environment installed on \ + your new system. "), + 11, None) + } + =20 + def getScreen(self, anaconda): + (step, _anaconda) =3D anaconda.dispatch.currentStep() + (title, text, chapter, linktext) =3D self.windows[step] + self.setWindow(title, text, chapter, linktext) =20 + =20 + def setWindow(self, title, text, chapter, linktext): + (xml, align) =3D gui.getGladeWidget("welcome.glade", "welcome_al= ign") + title_ =3D self.xml.get_widget("title") + text_ =3D self.xml.get_widget("text") + title_.set_markup("%s") + title_.set_attribute("label", _("Chapter %i: %s") % (chapter, ti= tle)) + text_.set_attribute("text", text) + =20 + =20 def getNext(self): return None