From 7cea2129006adb121199a18454fbd0b199a2df41 Mon Sep 17 00:00:00 2001 From: wiktor w brodlo Date: Wed, 20 Jul 2011 22:09:07 +0000 Subject: Add a welcome screen --- gui.py | 2 +- iw/welcome_gui.py | 59 +++++++++++++++++++++---------------------------------- 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/gui.py b/gui.py index b8a4a22..6436e4e 100755 --- a/gui.py +++ b/gui.py @@ -61,9 +61,9 @@ mainWindow = None stepToClass = { # Welcome + "welcome" : ("welcome_gui", "WelcomeWindow"), "language" : ("language_gui", "LanguageWindow"), "keyboard" : ("kbd_gui", "KeyboardWindow"), - "welcome" : ("welcome_gui", "WelcomeWindow"), # Preparing the Disks "filtertype" : ("filter_type", "FilterTypeWindow"), diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py index 06cfd98..c0b519f 100644 --- a/iw/welcome_gui.py +++ b/iw/welcome_gui.py @@ -27,42 +27,27 @@ import gettext _ = lambda x: gettext.ldgettext("anaconda", x) class WelcomeWindow (InstallWindow): + + def setWindow(self, title, text, linktext, linkurl): + (xml, align) = gui.getGladeWidget("welcome.glade", "welcome_align") + title_ = self.xml.get_widget("title") + text_ = self.xml.get_widget("text") + title_.set_markup("%s") + title_.set_attribute("label", title) + text_.set_attribute("text", text) - windowTitle = "" #N_("Welcome") + def welcomeScreen(self, anaconda): + self.setWindow(_("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."), + "Gentoo Handbook", + "http://www.gentoo.org/doc/en/handbook/") - def __init__ (self, ics): - InstallWindow.__init__ (self, ics) - ics.setGrabNext (1) - self.anaconda = None - - # WelcomeWindow tag="wel" - def getScreen (self, anaconda): - self.anaconda = anaconda - # this is a bit ugly... but scale the image if we're not at 800x600 - (w, h) = self.ics.cw.window.get_size() - if w >= 800: - height = None - width = None - else: - width = 500 - height = 258 - pix = gui.readImageFromFile("splash.png", width, height, dither=False) - box = gtk.EventBox () - box.add (pix) - return box - - def getNext (self): - if self.anaconda.requiresNetworkInstall(): - self.anaconda.intf.messageWindow(_("Network Install Required"), - _("Your installation source is set to " - "a network location, but no netork " - "devices were found on your " - "system. To avoid a network " - "installation, boot with the full " - "DVD, full CD set, or do not pass " - "a repo= parameter that specifies " - "a network source."), - type="custom", - custom_icon="error", - custom_buttons=[_("E_xit Installer")]) - sys.exit(0) + def getNext(self): + return None -- cgit v1.2.3-65-gdbad