From a9c563b1b5879ea597e00097ac7e399d531a0704 Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Thu, 25 Oct 2012 13:36:23 +0300 Subject: bitbake: 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] (Bitbake rev: 165362a63f085991b6bab63ab90a0c7b9bf6b784) Signed-off-by: Cristiana Voicu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builddetailspage.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/ui/crumbs/builddetailspage.py') diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py index 971cda0c59..1afacf85bd 100755 --- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py @@ -30,6 +30,8 @@ from bb.ui.crumbs.runningbuild import RunningBuildTreeView from bb.ui.crumbs.runningbuild import BuildFailureTreeView from bb.ui.crumbs.hobpages import HobPage from bb.ui.crumbs.hobcolor import HobColors +from bb.ui.crumbs.hobthreads import OpeningLogThread +from bb.ui.crumbs.hig import OpeningLogDialog class BuildConfigurationTreeView(gtk.TreeView): def __init__ (self): @@ -404,7 +406,18 @@ class BuildDetailsPage (HobPage): def open_log_button_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 failure_activate_file_bug_link_cb(self, button): button.child.emit('activate-link', "http://bugzilla.yoctoproject.org") -- cgit v1.2.3-54-g00ecf