diff options
author | Kang Kai <kai.kang@windriver.com> | 2012-06-14 18:10:56 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-14 14:07:17 +0100 |
commit | a87ce4308e51364ea91b8f8448d2d7644e702054 (patch) | |
tree | b692b2473bc11a4af41f8e9b8b590a542b524ea2 /bitbake/lib | |
parent | 7f017cab0b3e4d5a4fc356eccd8eb8429b0531d0 (diff) | |
download | poky-a87ce4308e51364ea91b8f8448d2d7644e702054.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.
(Bitbake rev: b0e604d3d6dbfcaeac0a2e0e4399aeb4327f8cbc)
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 13 |
1 files changed, 9 insertions, 4 deletions
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): | |||
784 | scroll.add(tv) | 784 | scroll.add(tv) |
785 | table.attach(scroll, 0, 10, 0, 1) | 785 | table.attach(scroll, 0, 10, 0, 1) |
786 | 786 | ||
787 | # There are 2 ways to use DeployImageDialog | ||
788 | # One way is that called by HOB when the 'Deploy Image' button is clicked | ||
789 | # The other way is that called by a standalone script. | ||
790 | # Following block of codes handles the latter way. It adds a 'Select Image' button and | ||
791 | # emit a signal when the button is clicked. | ||
787 | if self.standalone: | 792 | if self.standalone: |
788 | gobject.signal_new("select_image_clicked", self, gobject.SIGNAL_RUN_FIRST, | 793 | gobject.signal_new("select_image_clicked", self, gobject.SIGNAL_RUN_FIRST, |
789 | gobject.TYPE_NONE, ()) | 794 | gobject.TYPE_NONE, ()) |
@@ -874,16 +879,16 @@ class DeployImageDialog (CrumbsDialog): | |||
874 | if os.path.exists(tmpname): | 879 | if os.path.exists(tmpname): |
875 | tmpfile = open(tmpname) | 880 | tmpfile = open(tmpname) |
876 | if int(tmpfile.readline().strip()) == 0: | 881 | if int(tmpfile.readline().strip()) == 0: |
877 | lbl = "<b>Deploy image successfully</b>" | 882 | lbl = "<b>Deploy image successfully.</b>" |
878 | else: | 883 | else: |
879 | lbl = "<b>Deploy image failed</b>\nPlease try again." | 884 | 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) |
880 | tmpfile.close() | 885 | tmpfile.close() |
881 | os.remove(tmpname) | 886 | os.remove(tmpname) |
882 | else: | 887 | else: |
883 | if not self.image_path: | 888 | if not self.image_path: |
884 | lbl = "<b>No selection made</b>\nYou have not selected an image to deploy" | 889 | lbl = "<b>No selection made.</b>\nYou have not selected an image to deploy." |
885 | else: | 890 | else: |
886 | lbl = "<b>No selection made</b>\nYou have not selected USB device" | 891 | lbl = "<b>No selection made.</b>\nYou have not selected a USB device." |
887 | if len(lbl): | 892 | if len(lbl): |
888 | crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 893 | crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) |
889 | button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) | 894 | button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) |