summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-06-14 18:10:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-14 13:54:09 +0100
commitb0e604d3d6dbfcaeac0a2e0e4399aeb4327f8cbc (patch)
treea979967442c51f9682e6703812b3e14dc5576814
parent4be3e0876a35e7b5a95800bbf8834629dbd25906 (diff)
downloadbitbake-b0e604d3d6dbfcaeac0a2e0e4399aeb4327f8cbc.tar.gz
ui/crumbs/hig.py: tweak strings
Add comments for DeployImageDialog 'standalone' part of codes to make it easy to read. And tweak some strings. Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/crumbs/hig.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 3b50f68ee..0c3f56c43 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -784,6 +784,11 @@ class DeployImageDialog (CrumbsDialog):
scroll.add(tv)
table.attach(scroll, 0, 10, 0, 1)
+ # There are 2 ways to use DeployImageDialog
+ # One way is that called by HOB when the 'Deploy Image' button is clicked
+ # The other way is that called by a standalone script.
+ # Following block of codes handles the latter way. It adds a 'Select Image' button and
+ # emit a signal when the button is clicked.
if self.standalone:
gobject.signal_new("select_image_clicked", self, gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ())
@@ -874,16 +879,16 @@ class DeployImageDialog (CrumbsDialog):
if os.path.exists(tmpname):
tmpfile = open(tmpname)
if int(tmpfile.readline().strip()) == 0:
- lbl = "<b>Deploy image successfully</b>"
+ lbl = "<b>Deploy image successfully.</b>"
else:
- lbl = "<b>Deploy image failed</b>\nPlease try again."
+ lbl = "<b>Failed to deploy image.</b>\nPlease check image <b>%s</b> exists and USB device <b>%s</b> is writable." % (self.image_path, combo_item)
tmpfile.close()
os.remove(tmpname)
else:
if not self.image_path:
- lbl = "<b>No selection made</b>\nYou have not selected an image to deploy"
+ lbl = "<b>No selection made.</b>\nYou have not selected an image to deploy."
else:
- lbl = "<b>No selection made</b>\nYou have not selected USB device"
+ lbl = "<b>No selection made.</b>\nYou have not selected a USB device."
if len(lbl):
crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK)