aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/crumbs/packageselectionpage.py
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2012-10-25 13:36:23 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-27 09:51:21 +0100
commit165362a63f085991b6bab63ab90a0c7b9bf6b784 (patch)
tree5ba0614a96905892065742a9f595af2da3164e4c /lib/bb/ui/crumbs/packageselectionpage.py
parent1c540541c5397c38dca880a79df9ebfcda576d4c (diff)
downloadbitbake-165362a63f085991b6bab63ab90a0c7b9bf6b784.tar.gz
hob: add a progress indicator when you select 'view log'
- created a new file named "hobthreads.py", defining a thread for opening the log file in a subprocess using subprocess module; in the future I think we will add some other threads here, to implement some other performance issues - on "builddetailspage", "packageselectionpage" and "imagedetailspage" I have changed the manner for opening the log file; it uses the thread to open the file, and on main thread it creates a dialog to show a progress bar, which pulses till the file is open - this was added because when the log file is big, it takes time to be opened; on the dialog you can use "Cancel" button to terminate the process initiated to open the file [YOCTO #2997] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui/crumbs/packageselectionpage.py')
-rwxr-xr-xlib/bb/ui/crumbs/packageselectionpage.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index 17b1dfe3c..ac9cc7e13 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -26,6 +26,8 @@ from bb.ui.crumbs.hobcolor import HobColors
from bb.ui.crumbs.hobwidget import HobViewTable, HobNotebook, HobAltButton, HobButton
from bb.ui.crumbs.hoblistmodel import PackageListModel
from bb.ui.crumbs.hobpages import HobPage
+from bb.ui.crumbs.hobthreads import OpeningLogThread
+from bb.ui.crumbs.hig import OpeningLogDialog
#
# PackageSelectionPage
@@ -167,7 +169,18 @@ class PackageSelectionPage (HobPage):
def open_log_clicked_cb(self, button, log_file):
if log_file:
- os.system("xdg-open /%s" % log_file)
+ self.stop = False
+ dialog = OpeningLogDialog(title = "Opening Log",
+ parent = None,
+ flags = gtk.DIALOG_MODAL
+ | gtk.DIALOG_DESTROY_WITH_PARENT
+ | gtk.DIALOG_NO_SEPARATOR)
+ #create a thread to open log file
+ background = OpeningLogThread(dialog, log_file, self)
+ background.start()
+ response = dialog.run()
+ self.stop = True
+ background.join()
def show_page(self, log_file):
children = self.button_box.get_children() or []