diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/builder.py')
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 92 |
1 files changed, 49 insertions, 43 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) |
