The first sets up some logging for what I believe is a race condition but haven't been able to fix yet. The last two break a bunch of strings, but mizmo has been nice enough to go through and update all the translations manually, so translations should be fine.
- Chris
--- pyanaconda/ui/gui/hubs/__init__.py | 6 ++++++ pyanaconda/ui/gui/spokes/source.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py index ecd9027..ea385de 100644 --- a/pyanaconda/ui/gui/hubs/__init__.py +++ b/pyanaconda/ui/gui/hubs/__init__.py @@ -31,6 +31,9 @@ from pyanaconda.ui.gui import GUIObject from pyanaconda.ui.gui.categories import collect_categories from pyanaconda.ui.gui.spokes import StandaloneSpoke, collect_spokes
+import logging +log = logging.getLogger("anaconda") + class Hub(GUIObject, common.Hub): """A Hub is an overview UI screen. A Hub consists of one or more grids of configuration options that the user may choose from. Each grid is @@ -258,6 +261,7 @@ class Hub(GUIObject, common.Hub): self._notReadySpokes.append(spoke)
self._updateContinueButton() + log.info("spoke is not ready: %s" % spoke) elif code == communication.HUB_CODE_READY: self._updateCompleteness(spoke)
@@ -265,6 +269,7 @@ class Hub(GUIObject, common.Hub): self._notReadySpokes.remove(spoke)
self._updateContinueButton() + log.info("spoke is ready: %s" % spoke)
# If this is a real kickstart install (the kind with an input ks file) # and all spokes are now completed, we should skip ahead to the next @@ -285,6 +290,7 @@ class Hub(GUIObject, common.Hub): self.continueButton.emit("clicked") elif code == communication.HUB_CODE_MESSAGE: spoke.selector.set_property("status", args[1]) + log.info("setting %s status to: %s" % (spoke, args[1]))
q.task_done()
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 59e27f9..c26210d 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -560,7 +560,6 @@ class SourceSpoke(NormalSpoke): # By default, the source spoke is not ready. We have to wait until # storageInitialize is done to know whether or not there's local # devices potentially holding install media. - log.info('source spoke ready: %s' % self._ready) return (self._ready and not threadMgr.get("AnaPayloadMDThread") and not threadMgr.get("AnaCheckSoftwareThread"))
Don't display what you entered, because it's all wrong. --- pyanaconda/ui/gui/spokes/source.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index c26210d..f570700 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -568,9 +568,11 @@ class SourceSpoke(NormalSpoke): from pyanaconda.threads import threadMgr if threadMgr.get("AnaCheckSoftwareThread"): return _("Checking software dependencies...") - if not self.ready: + elif not self.ready: return _("Not ready") - if self.data.method.method == "url": + elif self._error: + return _("Error setting up software source") + elif self.data.method.method == "url": return self.data.method.url elif self.data.method.method == "nfs": return _("NFS server %s") % self.data.method.server @@ -578,13 +580,10 @@ class SourceSpoke(NormalSpoke): return _("CD/DVD drive") elif self.data.method.method == "harddrive": return os.path.basename(self._currentIsoFile) + elif self.payload.baseRepo: + return _("Closest mirror") else: - if self.payload.baseRepo: - return _("Closest mirror") - elif self._error: - return _("Error setting up software source") - else: - return _("Nothing selected") + return _("Nothing selected")
def _grabObjects(self): self._autodetectButton = self.builder.get_object("autodetectRadioButton")
We don't want to display an error dialog (and we don't even support displaying a dialog for this exception). We should instead raise an exception we know how to handle, and then the status line for the source spoke will be set correctly. --- pyanaconda/packaging/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index 25d4aa2..0108f68 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -482,10 +482,8 @@ class Payload(object): device.format.setup(mountpoint=mountpoint) except StorageError as e: log.error("mount failed: %s" % e) - exn = PayloadSetupError(str(e)) - if errorHandler.cb(exn) == ERROR_RAISE: - device.teardown(recursive=True) - raise exn + device.teardown(recursive=True) + raise PayloadSetupError(str(e))
def _setupNFS(self, mountpoint, server, path, options): """ Prepare an NFS directory for use as a package source. """ @@ -511,10 +509,7 @@ class Payload(object): try: isys.mount(url, mountpoint, fstype="nfs", options=options) except SystemError as e: - log.error("mount failed: %s" % e) - exn = PayloadSetupError(str(e)) - if errorHandler.cb(exn) == ERROR_RAISE: - raise exn + raise PayloadSetupError(str(e))
### ### METHODS FOR INSTALLING THE PAYLOAD
--- pyanaconda/ui/gui/hubs/progress.glade | 2 +- pyanaconda/ui/gui/hubs/summary.glade | 4 ++-- pyanaconda/ui/gui/spokes/custom.glade | 2 +- pyanaconda/ui/gui/spokes/source.glade | 10 +++++----- pyanaconda/ui/gui/spokes/storage.glade | 4 ++-- widgets/src/StandaloneWindow.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/pyanaconda/ui/gui/hubs/progress.glade b/pyanaconda/ui/gui/hubs/progress.glade index fcc0f21..37bd0bb 100644 --- a/pyanaconda/ui/gui/hubs/progress.glade +++ b/pyanaconda/ui/gui/hubs/progress.glade @@ -186,7 +186,7 @@ for you to use! Go ahead and reboot to start using it!</property> </child> <child> <object class="GtkButton" id="rebootButton"> - <property name="label" translatable="yes">_REBOOT</property> + <property name="label" translatable="yes">_Reboot</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> diff --git a/pyanaconda/ui/gui/hubs/summary.glade b/pyanaconda/ui/gui/hubs/summary.glade index 92e3949..2fd4065 100644 --- a/pyanaconda/ui/gui/hubs/summary.glade +++ b/pyanaconda/ui/gui/hubs/summary.glade @@ -70,7 +70,7 @@ <property name="margin_bottom">6</property> <child> <object class="GtkButton" id="quitButton"> - <property name="label" translatable="yes">_QUIT</property> + <property name="label" translatable="yes">_Quit</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -88,7 +88,7 @@ </child> <child> <object class="GtkButton" id="continueButton"> - <property name="label" translatable="yes">_BEGIN INSTALLATION</property> + <property name="label" translatable="yes">_Begin Installation</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade index 2f5ec47..b53236d 100644 --- a/pyanaconda/ui/gui/spokes/custom.glade +++ b/pyanaconda/ui/gui/spokes/custom.glade @@ -1548,7 +1548,7 @@ you'll be able to view their details here.</property> </child> <child> <object class="GtkButton" id="finishPartitionsButton"> - <property name="label" translatable="yes">_FINISH PARTITIONING</property> + <property name="label" translatable="yes">_Finish Partitioning</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade index 4d6fe05..8ff450f 100644 --- a/pyanaconda/ui/gui/spokes/source.glade +++ b/pyanaconda/ui/gui/spokes/source.glade @@ -79,7 +79,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">WHERE IS THE YUM REPOSITORY FOR YOUR ADD-ON?</property> + <property name="label" translatable="yes">Where is the yum repository for your add-on?</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -589,7 +589,7 @@ TeXlive 2012 repository</col> <property name="layout_style">end</property> <child> <object class="GtkButton" id="proxyCancelButton"> - <property name="label" translatable="yes">_CANCEL</property> + <property name="label" translatable="yes">_Cancel</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -604,7 +604,7 @@ TeXlive 2012 repository</col> </child> <child> <object class="GtkButton" id="proxyAddButton"> - <property name="label" translatable="yes">_ADD</property> + <property name="label" translatable="yes">_Add</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -865,7 +865,7 @@ TeXlive 2012 repository</col> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">WHICH INSTALLATION SOURCE WOULD YOU LIKE TO USE?</property> + <property name="label" translatable="yes">Which installation source would you like to use?</property> <attributes> <attribute name="font-desc" value="Cantarell 10"/> <attribute name="weight" value="bold"/> @@ -1188,7 +1188,7 @@ TeXlive 2012 repository</col> <property name="can_focus">False</property> <property name="halign">start</property> <property name="margin_top">12</property> - <property name="label" translatable="yes">UPDATES</property> + <property name="label" translatable="yes">Updates</property> <attributes> <attribute name="font-desc" value="Cantarell 10"/> <attribute name="weight" value="bold"/> diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade index e59beaf..eb74a72 100644 --- a/pyanaconda/ui/gui/spokes/storage.glade +++ b/pyanaconda/ui/gui/spokes/storage.glade @@ -867,7 +867,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="label" translatable="yes">LOCAL STANDARD DISKS</property> + <property name="label" translatable="yes">Local Standard Disks</property> <property name="track_visited_links">False</property> <attributes> <attribute name="font-desc" value="Cantarell Bold 10"/> @@ -932,7 +932,7 @@ <property name="column_spacing">6</property> <child> <object class="GtkButton" id="continue_button"> - <property name="label" translatable="yes">_CONTINUE</property> + <property name="label" translatable="yes">_Continue</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> diff --git a/widgets/src/StandaloneWindow.c b/widgets/src/StandaloneWindow.c index c319e20..e87e5da 100644 --- a/widgets/src/StandaloneWindow.c +++ b/widgets/src/StandaloneWindow.c @@ -49,8 +49,8 @@ enum { LAST_SIGNAL };
-#define QUIT_TEXT N_("_QUIT") -#define CONTINUE_TEXT N_("_CONTINUE") +#define QUIT_TEXT N_("_Quit") +#define CONTINUE_TEXT N_("_Continue")
static guint window_signals[LAST_SIGNAL] = { 0 };
--- pyanaconda/ui/gui/spokes/lib/accordion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py index c447e72..af10a1e 100644 --- a/pyanaconda/ui/gui/spokes/lib/accordion.py +++ b/pyanaconda/ui/gui/spokes/lib/accordion.py @@ -237,14 +237,14 @@ class CreateNewPage(Page): label.set_line_wrap(True) self._createBox.add(label)
- self._createNewButton = Gtk.Button("") + self._createNewButton = Gtk.LinkButton("", label=_("Click here to create them automatically.")) label = self._createNewButton.get_children()[0] label.set_line_wrap(True) - label.set_use_markup(True) - label.set_markup(_("<span foreground='blue'><u>Click here to create them automatically.</u></span>"))
+ self._createNewButton.set_has_tooltip(False) self._createNewButton.set_halign(Gtk.Align.START) self._createNewButton.connect("clicked", cb) + self._createNewButton.connect("activate-link", lambda *args: Gtk.true()) self._createBox.add(self._createNewButton)
label = Gtk.Label(_("Or, create new mount points below with the '+' icon."))
On 11/09/2012 01:14 PM, Chris Lumens wrote:
The first sets up some logging for what I believe is a race condition but haven't been able to fix yet. The last two break a bunch of strings, but mizmo has been nice enough to go through and update all the translations manually, so translations should be fine.
- Chris
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
ACK
anaconda-patches@lists.fedorahosted.org