summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py
diff options
context:
space:
mode:
authorValentin Popa <valentin.popa@intel.com>2013-11-04 12:53:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-08 17:25:38 +0000
commit67a7ac1ea7403bf6b64becc58945c724b276f20f (patch)
tree40e679fb70fa52422b6e6eeae4c8188fe62c24ef /bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py
parent34eb0044356a04cc816808a57804242ea58d59c2 (diff)
downloadpoky-67a7ac1ea7403bf6b64becc58945c724b276f20f.tar.gz
bitbake: HOB: HIG compliant message dialogs
"More" HIG compliant dialogs for HOB. (Bitbake rev: a1ccb5e70523be6af7f4bcaabd728af1ddaf6dc5) Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py b/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py
index bc1efbbfaf..f64fbd6ea4 100644
--- a/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py
+++ b/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py
@@ -160,6 +160,7 @@ class DeployImageDialog (CrumbsDialog):
160 def response_cb(self, dialog, response_id): 160 def response_cb(self, dialog, response_id):
161 if response_id == gtk.RESPONSE_YES: 161 if response_id == gtk.RESPONSE_YES:
162 lbl = '' 162 lbl = ''
163 msg = ''
163 combo_item = self.usb_combo.get_active_text() 164 combo_item = self.usb_combo.get_active_text()
164 if combo_item and combo_item != self.__dummy_usb__ and self.image_path: 165 if combo_item and combo_item != self.__dummy_usb__ and self.image_path:
165 cmdline = bb.ui.crumbs.utils.which_terminal() 166 cmdline = bb.ui.crumbs.utils.which_terminal()
@@ -172,15 +173,18 @@ class DeployImageDialog (CrumbsDialog):
172 if int(tmpfile.readline().strip()) == 0: 173 if int(tmpfile.readline().strip()) == 0:
173 lbl = "<b>Deploy image successfully.</b>" 174 lbl = "<b>Deploy image successfully.</b>"
174 else: 175 else:
175 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) 176 lbl = "<b>Failed to deploy image.</b>"
177 msg = "Please check image <b>%s</b> exists and USB device <b>%s</b> is writable." % (self.image_path, combo_item)
176 tmpfile.close() 178 tmpfile.close()
177 else: 179 else:
178 if not self.image_path: 180 if not self.image_path:
179 lbl = "<b>No selection made.</b>\nYou have not selected an image to deploy." 181 lbl = "<b>No selection made.</b>"
182 msg = "You have not selected an image to deploy."
180 else: 183 else:
181 lbl = "<b>No selection made.</b>\nYou have not selected a USB device." 184 lbl = "<b>No selection made.</b>"
185 msg = "You have not selected a USB device."
182 if len(lbl): 186 if len(lbl):
183 crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 187 crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg)
184 button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) 188 button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK)
185 HobButton.style_button(button) 189 HobButton.style_button(button)
186 crumbs_dialog.run() 190 crumbs_dialog.run()