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: Thu, 21 Jul 2011 20:33:18 +0000 (UTC)	[thread overview]
Message-ID: <7d7afc1b80596aca13268dd9c2967113e627c701.wiktor@gentoo> (raw)

commit:     7d7afc1b80596aca13268dd9c2967113e627c701
Author:     wiktor w brodlo <wiktor <AT> brodlo <DOT> net>
AuthorDate: Thu Jul 21 20:33:02 2011 +0000
Commit:     Wiktor W Brodlo <wiktor <AT> brodlo <DOT> net>
CommitDate: Thu Jul 21 20:33:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/anaconda.git;a=commit;h=7d7afc1b

Control the main progress bar

---
 anaconda          |    1 +
 gui.py            |    1 +
 iw/welcome_gui.py |   11 +++++++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index fc87336..3beb128 100755
--- a/anaconda
+++ b/anaconda
@@ -486,6 +486,7 @@ class Anaconda(object):
         self.makeconf_jobs = None
         self.makeconf_load = None
         self.makeconf_silent = None
+        self.mainxml = None
         self.mediaDevice = None
         self.methodstr = None
         self.mirrors = []

diff --git a/gui.py b/gui.py
index b588065..34de804 100755
--- a/gui.py
+++ b/gui.py
@@ -1477,6 +1477,7 @@ class InstallControlWindow:
     def loadGlade(self):
         self.mainxml = gtk.glade.XML(findGladeFile("anaconda.glade"),
                                      domain="anaconda")
+        self.anaconda.mainxml = self.mainxml
 
     def setup_window (self, window_reload):
         self.setLtR()

diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py
index 1d4eb0d..f9815f4 100644
--- a/iw/welcome_gui.py
+++ b/iw/welcome_gui.py
@@ -104,14 +104,21 @@ environment installed on your new system. "),
     def getScreen(self, anaconda):
         (step, _anaconda) = anaconda.dispatch.currentStep()
         (title, text, chapter, linktext) = self.windows[step]
-        return self.setWindow(title, text, chapter, linktext)             
+        return self.setWindow(anaconda, title, text, chapter, linktext)
     
-    def setWindow(self, title, text, chapter, linktext):
+    def setWindow(self, anaconda, title, text, chapter, linktext):
         (xml, align) = gui.getGladeWidget("welcome.glade", "welcome_align")
         title_ = xml.get_widget("title")
         text_ = xml.get_widget("text")
         title_.set_markup("<span size=\"x-large\">%s</span>" % (_("Chapter %i: %s") % (chapter, title)))
         text_.set_text(text)
+        ip = anaconda.mainxml.get_widget("install_progress")
+        current_progress = ip.get_fraction()
+        step = 1/len(self.windows)
+        new_progress = current_progress + step()
+        if chapter == 0:
+            new_progress = 0
+        ip.set_fraction(new_progress)
         return align
     
     



             reply	other threads:[~2011-07-21 20:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 20:33 Wiktor W Brodlo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-21 14:12 [gentoo-commits] proj/anaconda:master commit in: /, iw/ 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 19:18 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=7d7afc1b80596aca13268dd9c2967113e627c701.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