From a87ce4308e51364ea91b8f8448d2d7644e702054 Mon Sep 17 00:00:00 2001 From: Kang Kai Date: Thu, 14 Jun 2012 18:10:56 +0800 Subject: ui/crumbs/hig.py: tweak strings Add comments for DeployImageDialog 'standalone' part of codes to make it easy to read. And tweak some strings. (Bitbake rev: b0e604d3d6dbfcaeac0a2e0e4399aeb4327f8cbc) Signed-off-by: Kang Kai Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/hig.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 3b50f68eed..0c3f56c432 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/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 = "Deploy image successfully" + lbl = "Deploy image successfully." else: - lbl = "Deploy image failed\nPlease try again." + lbl = "Failed to deploy image.\nPlease check image %s exists and USB device %s is writable." % (self.image_path, combo_item) tmpfile.close() os.remove(tmpname) else: if not self.image_path: - lbl = "No selection made\nYou have not selected an image to deploy" + lbl = "No selection made.\nYou have not selected an image to deploy." else: - lbl = "No selection made\nYou have not selected USB device" + lbl = "No selection made.\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) -- cgit v1.2.3-54-g00ecf