summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2012-04-10 17:57:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 17:58:51 +0100
commit9789ed626bc69f348b55cfa5f1a79abbdc994204 (patch)
tree68de5a3abcc87a1bbf0f9adb1e251258bc1d7b1c /bitbake/lib/bb/ui/crumbs
parent4be09eec6a5a25da089d8ad4fb68d2fda8149912 (diff)
downloadpoky-9789ed626bc69f348b55cfa5f1a79abbdc994204.tar.gz
hig/builder: use the new which_terminal() function
Also adjusted the cmdline ordering to work correctly with both xterm and vte. (Bitbake rev: 4219e2ea033232d95117211947b751bdb5efafd4) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py11
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py8
2 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 95402e04ba..d8d09871cf 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -37,6 +37,7 @@ from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
37 AdvancedSettingDialog, LayerSelectionDialog, \ 37 AdvancedSettingDialog, LayerSelectionDialog, \
38 DeployImageDialog 38 DeployImageDialog
39from bb.ui.crumbs.persistenttooltip import PersistentTooltip 39from bb.ui.crumbs.persistenttooltip import PersistentTooltip
40import bb.ui.crumbs.utils
40 41
41class Configuration: 42class Configuration:
42 '''Represents the data structure of configuration.''' 43 '''Represents the data structure of configuration.'''
@@ -969,12 +970,13 @@ class Builder(gtk.Window):
969 if response == gtk.RESPONSE_YES: 970 if response == gtk.RESPONSE_YES:
970 source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env") 971 source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
971 tmp_path = self.parameters.tmpdir 972 tmp_path = self.parameters.tmpdir
973 cmdline = bb.ui.crumbs.utils.which_terminal()
972 if os.path.exists(image_path) and os.path.exists(kernel_path) \ 974 if os.path.exists(image_path) and os.path.exists(kernel_path) \
973 and os.path.exists(source_env_path) and os.path.exists(tmp_path): 975 and os.path.exists(source_env_path) and os.path.exists(tmp_path)
974 cmdline = "/usr/bin/xterm -e " 976 and cmdline:
975 cmdline += "\" export OE_TMPDIR=" + tmp_path + "; " 977 cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; "
976 cmdline += "source " + source_env_path + " " + os.getcwd() + "; " 978 cmdline += "source " + source_env_path + " " + os.getcwd() + "; "
977 cmdline += "runqemu " + kernel_path + " " + image_path + "; bash\"" 979 cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'"
978 subprocess.Popen(shlex.split(cmdline)) 980 subprocess.Popen(shlex.split(cmdline))
979 else: 981 else:
980 lbl = "<b>Path error</b>\nOne of your paths is wrong," 982 lbl = "<b>Path error</b>\nOne of your paths is wrong,"
@@ -983,6 +985,7 @@ class Builder(gtk.Window):
983 lbl = lbl + "kernel path:" + kernel_path + "\n" 985 lbl = lbl + "kernel path:" + kernel_path + "\n"
984 lbl = lbl + "source environment path:" + source_env_path + "\n" 986 lbl = lbl + "source environment path:" + source_env_path + "\n"
985 lbl = lbl + "tmp path: " + tmp_path + "." 987 lbl = lbl + "tmp path: " + tmp_path + "."
988 lbl = lbl + "You may be missing either xterm or vte for terminal services."
986 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) 989 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
987 button = dialog.add_button("Close", gtk.RESPONSE_OK) 990 button = dialog.add_button("Close", gtk.RESPONSE_OK)
988 HobButton.style_button(button) 991 HobButton.style_button(button)
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 016fb59acb..5cc8a5931a 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -30,6 +30,7 @@ import shlex
30from bb.ui.crumbs.hobcolor import HobColors 30from bb.ui.crumbs.hobcolor import HobColors
31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker 31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
32from bb.ui.crumbs.progressbar import HobProgressBar 32from bb.ui.crumbs.progressbar import HobProgressBar
33import bb.ui.crumbs.utils
33 34
34""" 35"""
35The following are convenience classes for implementing GNOME HIG compliant 36The following are convenience classes for implementing GNOME HIG compliant
@@ -739,9 +740,10 @@ class DeployImageDialog (CrumbsDialog):
739 if response_id == gtk.RESPONSE_YES: 740 if response_id == gtk.RESPONSE_YES:
740 combo_item = self.usb_combo.get_active_text() 741 combo_item = self.usb_combo.get_active_text()
741 if combo_item and combo_item != self.__dummy_usb__: 742 if combo_item and combo_item != self.__dummy_usb__:
742 cmdline = "/usr/bin/xterm -e " 743 cmdline = bb.ui.crumbs.utils.which_terminal()
743 cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\"" 744 if cmdline:
744 subprocess.Popen(args=shlex.split(cmdline)) 745 cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "\""
746 subprocess.Popen(args=shlex.split(cmdline))
745 747
746 def update_progress_bar(self, title, fraction, status=None): 748 def update_progress_bar(self, title, fraction, status=None):
747 self.progress_bar.update(fraction) 749 self.progress_bar.update(fraction)