diff options
author | Valentin Popa <valentin.popa@intel.com> | 2013-11-04 12:53:12 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-08 17:25:38 +0000 |
commit | 67a7ac1ea7403bf6b64becc58945c724b276f20f (patch) | |
tree | 40e679fb70fa52422b6e6eeae4c8188fe62c24ef /bitbake/lib | |
parent | 34eb0044356a04cc816808a57804242ea58d59c2 (diff) | |
download | poky-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')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 92 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/crumbsmessagedialog.py | 55 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py | 12 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py | 9 |
7 files changed, 87 insertions, 102 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index de1458cbc4..bbc01205df 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -794,8 +794,8 @@ class Builder(gtk.Window): | |||
794 | self.generate_image_async(True) | 794 | self.generate_image_async(True) |
795 | 795 | ||
796 | def show_error_dialog(self, msg): | 796 | def show_error_dialog(self, msg): |
797 | lbl = "<b>Hob found an error</b>\n" | 797 | lbl = "<b>Hob found an error</b>" |
798 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR, msg) | 798 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg) |
799 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 799 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
800 | HobButton.style_button(button) | 800 | HobButton.style_button(button) |
801 | response = dialog.run() | 801 | response = dialog.run() |
@@ -811,10 +811,9 @@ class Builder(gtk.Window): | |||
811 | dialog.destroy() | 811 | dialog.destroy() |
812 | 812 | ||
813 | def show_network_error_dialog(self): | 813 | def show_network_error_dialog(self): |
814 | lbl = "<b>Hob cannot connect to the network</b>\n" | 814 | lbl = "<b>Hob cannot connect to the network</b>" |
815 | msg = "Please check your network connection. If you are using a proxy server, please make sure it is configured correctly." | 815 | msg = msg + "Please check your network connection. If you are using a proxy server, please make sure it is configured correctly." |
816 | lbl = lbl + "%s\n\n" % glib.markup_escape_text(msg) | 816 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg) |
817 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) | ||
818 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 817 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
819 | HobButton.style_button(button) | 818 | HobButton.style_button(button) |
820 | button = dialog.add_button("Proxy settings", gtk.RESPONSE_CANCEL) | 819 | button = dialog.add_button("Proxy settings", gtk.RESPONSE_CANCEL) |
@@ -1037,7 +1036,7 @@ class Builder(gtk.Window): | |||
1037 | self.build_failed() | 1036 | self.build_failed() |
1038 | 1037 | ||
1039 | def handler_no_provider_cb(self, running_build, msg): | 1038 | def handler_no_provider_cb(self, running_build, msg): |
1040 | dialog = CrumbsMessageDialog(self, glib.markup_escape_text(msg), gtk.STOCK_DIALOG_INFO) | 1039 | dialog = CrumbsMessageDialog(self, glib.markup_escape_text(msg), gtk.MESSAGE_INFO) |
1041 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1040 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1042 | HobButton.style_button(button) | 1041 | HobButton.style_button(button) |
1043 | dialog.run() | 1042 | dialog.run() |
@@ -1100,9 +1099,10 @@ class Builder(gtk.Window): | |||
1100 | def build_packages(self): | 1099 | def build_packages(self): |
1101 | _, all_recipes = self.recipe_model.get_selected_recipes() | 1100 | _, all_recipes = self.recipe_model.get_selected_recipes() |
1102 | if not all_recipes: | 1101 | if not all_recipes: |
1103 | lbl = "<b>No selections made</b>\nYou have not made any selections" | 1102 | lbl = "<b>No selections made</b>" |
1104 | lbl = lbl + " so there isn't anything to bake at this time." | 1103 | msg = "You have not made any selections" |
1105 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 1104 | msg = msg + " so there isn't anything to bake at this time." |
1105 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg) | ||
1106 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1106 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1107 | HobButton.style_button(button) | 1107 | HobButton.style_button(button) |
1108 | dialog.run() | 1108 | dialog.run() |
@@ -1113,9 +1113,10 @@ class Builder(gtk.Window): | |||
1113 | def build_image(self): | 1113 | def build_image(self): |
1114 | selected_packages = self.package_model.get_selected_packages() | 1114 | selected_packages = self.package_model.get_selected_packages() |
1115 | if not selected_packages: | 1115 | if not selected_packages: |
1116 | lbl = "<b>No selections made</b>\nYou have not made any selections" | 1116 | lbl = "<b>No selections made</b>" |
1117 | lbl = lbl + " so there isn't anything to bake at this time." | 1117 | msg = "You have not made any selections" |
1118 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 1118 | msg = msg + " so there isn't anything to bake at this time." |
1119 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg) | ||
1119 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1120 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1120 | HobButton.style_button(button) | 1121 | HobButton.style_button(button) |
1121 | dialog.run() | 1122 | dialog.run() |
@@ -1129,9 +1130,10 @@ class Builder(gtk.Window): | |||
1129 | 1130 | ||
1130 | # If no base image and no selected packages don't build anything | 1131 | # If no base image and no selected packages don't build anything |
1131 | if not (selected_packages or selected_image != self.recipe_model.__custom_image__): | 1132 | if not (selected_packages or selected_image != self.recipe_model.__custom_image__): |
1132 | lbl = "<b>No selections made</b>\nYou have not made any selections" | 1133 | lbl = "<b>No selections made</b>" |
1133 | lbl = lbl + " so there isn't anything to bake at this time." | 1134 | msg = "You have not made any selections" |
1134 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 1135 | msg = msg + " so there isn't anything to bake at this time." |
1136 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg) | ||
1135 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1137 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1136 | HobButton.style_button(button) | 1138 | HobButton.style_button(button) |
1137 | dialog.run() | 1139 | dialog.run() |
@@ -1215,8 +1217,9 @@ class Builder(gtk.Window): | |||
1215 | response = dialog.run() | 1217 | response = dialog.run() |
1216 | if response == gtk.RESPONSE_YES: | 1218 | if response == gtk.RESPONSE_YES: |
1217 | if not dialog.image_names: | 1219 | if not dialog.image_names: |
1218 | lbl = "<b>No selections made</b>\nYou have not made any selections" | 1220 | lbl = "<b>No selections made</b>" |
1219 | crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 1221 | msg = "You have not made any selections" |
1222 | crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg) | ||
1220 | button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) | 1223 | button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) |
1221 | HobButton.style_button(button) | 1224 | HobButton.style_button(button) |
1222 | crumbs_dialog.run() | 1225 | crumbs_dialog.run() |
@@ -1303,7 +1306,7 @@ class Builder(gtk.Window): | |||
1303 | def deploy_image(self, image_name): | 1306 | def deploy_image(self, image_name): |
1304 | if not image_name: | 1307 | if not image_name: |
1305 | lbl = "<b>Please select an image to deploy.</b>" | 1308 | lbl = "<b>Please select an image to deploy.</b>" |
1306 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 1309 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO) |
1307 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1310 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1308 | HobButton.style_button(button) | 1311 | HobButton.style_button(button) |
1309 | dialog.run() | 1312 | dialog.run() |
@@ -1350,7 +1353,7 @@ class Builder(gtk.Window): | |||
1350 | def runqemu_image(self, image_name, kernel_name): | 1353 | def runqemu_image(self, image_name, kernel_name): |
1351 | if not image_name or not kernel_name: | 1354 | if not image_name or not kernel_name: |
1352 | lbl = "<b>Please select an %s to launch in QEMU.</b>" % ("kernel" if image_name else "image") | 1355 | lbl = "<b>Please select an %s to launch in QEMU.</b>" % ("kernel" if image_name else "image") |
1353 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) | 1356 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO) |
1354 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1357 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1355 | HobButton.style_button(button) | 1358 | HobButton.style_button(button) |
1356 | dialog.run() | 1359 | dialog.run() |
@@ -1371,14 +1374,15 @@ class Builder(gtk.Window): | |||
1371 | cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'" | 1374 | cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'" |
1372 | subprocess.Popen(shlex.split(cmdline)) | 1375 | subprocess.Popen(shlex.split(cmdline)) |
1373 | else: | 1376 | else: |
1374 | lbl = "<b>Path error</b>\nOne of your paths is wrong," | 1377 | lbl = "<b>Path error</b>" |
1375 | lbl = lbl + " please make sure the following paths exist:\n" | 1378 | msg = "One of your paths is wrong," |
1376 | lbl = lbl + "image path:" + image_path + "\n" | 1379 | msg = msg + " please make sure the following paths exist:\n" |
1377 | lbl = lbl + "kernel path:" + kernel_path + "\n" | 1380 | msg = msg + "image path:" + image_path + "\n" |
1378 | lbl = lbl + "source environment path:" + source_env_path + "\n" | 1381 | msg = msg + "kernel path:" + kernel_path + "\n" |
1379 | lbl = lbl + "tmp path: " + tmp_path + "." | 1382 | msg = msg + "source environment path:" + source_env_path + "\n" |
1380 | lbl = lbl + "You may be missing either xterm or vte for terminal services." | 1383 | msg = msg + "tmp path: " + tmp_path + "." |
1381 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) | 1384 | msg = msg + "You may be missing either xterm or vte for terminal services." |
1385 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg) | ||
1382 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 1386 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
1383 | HobButton.style_button(button) | 1387 | HobButton.style_button(button) |
1384 | dialog.run() | 1388 | dialog.run() |
@@ -1398,26 +1402,28 @@ class Builder(gtk.Window): | |||
1398 | 1402 | ||
1399 | def stop_build(self): | 1403 | def stop_build(self): |
1400 | if self.stopping: | 1404 | if self.stopping: |
1401 | lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once," | 1405 | lbl = "<b>Force Stop build?</b>" |
1402 | lbl = lbl + " would you like to 'Force Stop' the build?\n\n" | 1406 | msg = "You've already selected Stop once," |
1403 | lbl = lbl + "This will stop the build as quickly as possible but may" | 1407 | msg = msg + " would you like to 'Force Stop' the build?\n\n" |
1404 | lbl = lbl + " well leave your build directory in an unusable state" | 1408 | msg = msg + "This will stop the build as quickly as possible but may" |
1405 | lbl = lbl + " that requires manual steps to fix.\n" | 1409 | msg = msg + " well leave your build directory in an unusable state" |
1406 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) | 1410 | msg = msg + " that requires manual steps to fix." |
1411 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg) | ||
1407 | button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) | 1412 | button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) |
1408 | HobAltButton.style_button(button) | 1413 | HobAltButton.style_button(button) |
1409 | button = dialog.add_button("Force Stop", gtk.RESPONSE_YES) | 1414 | button = dialog.add_button("Force Stop", gtk.RESPONSE_YES) |
1410 | HobButton.style_button(button) | 1415 | HobButton.style_button(button) |
1411 | else: | 1416 | else: |
1412 | lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this" | 1417 | lbl = "<b>Stop build?</b>" |
1413 | lbl = lbl + " build?\n\n'Stop' will stop the build as soon as all in" | 1418 | msg = "Are you sure you want to stop this" |
1414 | lbl = lbl + " progress build tasks are finished. However if a" | 1419 | msg = msg + " build?\n\n'Stop' will stop the build as soon as all in" |
1415 | lbl = lbl + " lengthy compilation phase is in progress this may take" | 1420 | msg = msg + " progress build tasks are finished. However if a" |
1416 | lbl = lbl + " some time.\n\n" | 1421 | msg = msg + " lengthy compilation phase is in progress this may take" |
1417 | lbl = lbl + "'Force Stop' will stop the build as quickly as" | 1422 | msg = msg + " some time.\n\n" |
1418 | lbl = lbl + " possible but may well leave your build directory in an" | 1423 | msg = msg + "'Force Stop' will stop the build as quickly as" |
1419 | lbl = lbl + " unusable state that requires manual steps to fix." | 1424 | msg = msg + " possible but may well leave your build directory in an" |
1420 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) | 1425 | msg = msg + " unusable state that requires manual steps to fix." |
1426 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg) | ||
1421 | button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) | 1427 | button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) |
1422 | HobAltButton.style_button(button) | 1428 | HobAltButton.style_button(button) |
1423 | button = dialog.add_button("Force stop", gtk.RESPONSE_YES) | 1429 | button = dialog.add_button("Force stop", gtk.RESPONSE_YES) |
diff --git a/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py b/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py index 5542471c7b..e0b3553c2f 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py | |||
@@ -183,8 +183,9 @@ class AdvancedSettingsDialog (CrumbsDialog, SettingsUIHelper): | |||
183 | self.set_save_button_state() | 183 | self.set_save_button_state() |
184 | if self.get_num_checked_image_types() == 0: | 184 | if self.get_num_checked_image_types() == 0: |
185 | # Show an error dialog | 185 | # Show an error dialog |
186 | lbl = "<b>Select an image type</b>\n\nYou need to select at least one image type." | 186 | lbl = "<b>Select an image type</b>" |
187 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) | 187 | msg = "You need to select at least one image type." |
188 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg) | ||
188 | button = dialog.add_button("OK", gtk.RESPONSE_OK) | 189 | button = dialog.add_button("OK", gtk.RESPONSE_OK) |
189 | HobButton.style_button(button) | 190 | HobButton.style_button(button) |
190 | response = dialog.run() | 191 | response = dialog.run() |
diff --git a/bitbake/lib/bb/ui/crumbs/hig/crumbsmessagedialog.py b/bitbake/lib/bb/ui/crumbs/hig/crumbsmessagedialog.py index 097ce7b027..3b998e4637 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/crumbsmessagedialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/crumbsmessagedialog.py | |||
@@ -31,51 +31,28 @@ BitBake GUI's | |||
31 | In summary: spacing = 12px, border-width = 6px | 31 | In summary: spacing = 12px, border-width = 6px |
32 | """ | 32 | """ |
33 | 33 | ||
34 | class CrumbsMessageDialog(CrumbsDialog): | 34 | class CrumbsMessageDialog(gtk.MessageDialog): |
35 | """ | 35 | """ |
36 | A GNOME HIG compliant dialog widget. | 36 | A GNOME HIG compliant dialog widget. |
37 | Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons | 37 | Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons |
38 | """ | 38 | """ |
39 | def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO, msg=""): | 39 | def __init__(self, parent = None, label="", dialog_type = gtk.MESSAGE_QUESTION, msg=""): |
40 | super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_MODAL) | 40 | super(CrumbsMessageDialog, self).__init__(None, |
41 | gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, | ||
42 | dialog_type, | ||
43 | gtk.BUTTONS_NONE, | ||
44 | None) | ||
41 | 45 | ||
42 | self.set_border_width(6) | 46 | self.set_skip_taskbar_hint(False) |
43 | self.vbox.set_property("spacing", 12) | ||
44 | self.action_area.set_property("spacing", 12) | ||
45 | self.action_area.set_property("border-width", 6) | ||
46 | 47 | ||
47 | first_column = gtk.HBox(spacing=12) | 48 | self.set_markup(label) |
48 | first_column.set_property("border-width", 6) | ||
49 | first_column.show() | ||
50 | self.vbox.add(first_column) | ||
51 | 49 | ||
52 | self.icon = gtk.Image() | 50 | if 0 <= len(msg) < 300: |
53 | # We have our own Info icon which should be used in preference of the stock icon | 51 | self.format_secondary_markup(msg) |
54 | self.icon_chk = HobIconChecker() | ||
55 | self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG) | ||
56 | self.icon.set_property("yalign", 0.00) | ||
57 | self.icon.show() | ||
58 | first_column.pack_start(self.icon, expand=False, fill=True, padding=0) | ||
59 | |||
60 | if 0 <= len(msg) < 200: | ||
61 | lbl = label + "%s" % glib.markup_escape_text(msg) | ||
62 | self.label_short = gtk.Label() | ||
63 | self.label_short.set_use_markup(True) | ||
64 | self.label_short.set_line_wrap(True) | ||
65 | self.label_short.set_markup(lbl) | ||
66 | self.label_short.set_property("yalign", 0.00) | ||
67 | self.label_short.show() | ||
68 | first_column.add(self.label_short) | ||
69 | else: | 52 | else: |
70 | second_row = gtk.VBox(spacing=12) | 53 | vbox = self.get_message_area() |
71 | second_row.set_property("border-width", 6) | 54 | vbox.set_border_width(1) |
72 | self.label_long = gtk.Label() | 55 | vbox.set_property("spacing", 12) |
73 | self.label_long.set_use_markup(True) | ||
74 | self.label_long.set_line_wrap(True) | ||
75 | self.label_long.set_markup(label) | ||
76 | self.label_long.set_alignment(0.0, 0.0) | ||
77 | second_row.pack_start(self.label_long, expand=False, fill=False, padding=0) | ||
78 | self.label_long.show() | ||
79 | self.textWindow = gtk.ScrolledWindow() | 56 | self.textWindow = gtk.ScrolledWindow() |
80 | self.textWindow.set_shadow_type(gtk.SHADOW_IN) | 57 | self.textWindow.set_shadow_type(gtk.SHADOW_IN) |
81 | self.textWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) | 58 | self.textWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) |
@@ -89,7 +66,5 @@ class CrumbsMessageDialog(CrumbsDialog): | |||
89 | self.msgView.set_buffer(self.buf) | 66 | self.msgView.set_buffer(self.buf) |
90 | self.textWindow.add(self.msgView) | 67 | self.textWindow.add(self.msgView) |
91 | self.msgView.show() | 68 | self.msgView.show() |
92 | second_row.add(self.textWindow) | 69 | vbox.add(self.textWindow) |
93 | self.textWindow.show() | 70 | self.textWindow.show() |
94 | first_column.add(second_row) | ||
95 | second_row.show() | ||
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() |
diff --git a/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py b/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py index 783ee73c7a..1d100c54f1 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/layerselectiondialog.py | |||
@@ -92,7 +92,8 @@ class LayerSelectionDialog (CrumbsDialog): | |||
92 | path = dialog.get_filename() | 92 | path = dialog.get_filename() |
93 | dialog.destroy() | 93 | dialog.destroy() |
94 | 94 | ||
95 | lbl = "<b>Error</b>\nUnable to load layer <i>%s</i> because " % path | 95 | lbl = "<b>Error</b>" |
96 | msg = "Unable to load layer <i>%s</i> because " % path | ||
96 | if response == gtk.RESPONSE_YES: | 97 | if response == gtk.RESPONSE_YES: |
97 | import os | 98 | import os |
98 | import os.path | 99 | import os.path |
@@ -103,15 +104,15 @@ class LayerSelectionDialog (CrumbsDialog): | |||
103 | it = layer_store.iter_next(it) | 104 | it = layer_store.iter_next(it) |
104 | 105 | ||
105 | if not path: | 106 | if not path: |
106 | lbl += "it is an invalid path." | 107 | msg += "it is an invalid path." |
107 | elif not os.path.exists(path+"/conf/layer.conf"): | 108 | elif not os.path.exists(path+"/conf/layer.conf"): |
108 | lbl += "there is no layer.conf inside the directory." | 109 | msg += "there is no layer.conf inside the directory." |
109 | elif path in layers: | 110 | elif path in layers: |
110 | lbl += "it is already in loaded layers." | 111 | msg += "it is already in loaded layers." |
111 | else: | 112 | else: |
112 | layer_store.append([path]) | 113 | layer_store.append([path]) |
113 | return | 114 | return |
114 | dialog = CrumbsMessageDialog(parent, lbl) | 115 | dialog = CrumbsMessageDialog(parent, lbl, gtk.MESSAGE_ERROR, msg) |
115 | dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK) | 116 | dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK) |
116 | response = dialog.run() | 117 | response = dialog.run() |
117 | dialog.destroy() | 118 | dialog.destroy() |
diff --git a/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py b/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py index e940ceee43..4195f70e1e 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py | |||
@@ -146,12 +146,11 @@ class SaveImageDialog (CrumbsDialog): | |||
146 | self.show_invalid_input_error_dialog() | 146 | self.show_invalid_input_error_dialog() |
147 | 147 | ||
148 | def show_invalid_input_error_dialog(self): | 148 | def show_invalid_input_error_dialog(self): |
149 | lbl = "<b>Invalid characters in image recipe name</b>\n" | 149 | lbl = "<b>Invalid characters in image recipe name</b>" |
150 | msg = "Image recipe names should be all lowercase and\n" | 150 | msg = "Image recipe names should be all lowercase and\n" |
151 | msg += "include only alphanumeric characters. The only\n" | 151 | msg += "include only alphanumeric characters. The only\n" |
152 | msg += "special character you can use is the ASCII hyphen (-)." | 152 | msg += "special character you can use is the ASCII hyphen (-)." |
153 | lbl = lbl + "\n%s\n" % glib.markup_escape_text(msg) | 153 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg) |
154 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) | ||
155 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 154 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
156 | HobButton.style_button(button) | 155 | HobButton.style_button(button) |
157 | 156 | ||
diff --git a/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py b/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py index 4a7cfad52c..ab5b614c8d 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py | |||
@@ -212,13 +212,12 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper): | |||
212 | def response_cb(self, dialog, response_id): | 212 | def response_cb(self, dialog, response_id): |
213 | if response_id == gtk.RESPONSE_YES: | 213 | if response_id == gtk.RESPONSE_YES: |
214 | if self.proxy_checkbox.get_active(): | 214 | if self.proxy_checkbox.get_active(): |
215 | # Check that all proxy entries have a corresponding port | 215 | # Check that all proxy entries have a corresponding port |
216 | for proxy, port in zip(self.all_proxy_addresses, self.all_proxy_ports): | 216 | for proxy, port in zip(self.all_proxy_addresses, self.all_proxy_ports): |
217 | if proxy.get_text() and not port.get_text(): | 217 | if proxy.get_text() and not port.get_text(): |
218 | lbl = "<b>Enter all port numbers</b>\n\n" | 218 | lbl = "<b>Enter all port numbers</b>" |
219 | msg = "Proxy servers require a port number. Please make sure " | 219 | msg = "Proxy servers require a port number. Please make sure you have entered a port number for each proxy server." |
220 | msg += "you have entered a port number for each proxy server." | 220 | dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg) |
221 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING, msg) | ||
222 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 221 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
223 | HobButton.style_button(button) | 222 | HobButton.style_button(button) |
224 | response = dialog.run() | 223 | response = dialog.run() |