diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2012-10-25 13:36:23 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-27 09:55:54 +0100 |
commit | a9c563b1b5879ea597e00097ac7e399d531a0704 (patch) | |
tree | b2c728bd5c233b449047eb8af3211376c6ff89cd /bitbake/lib/bb/ui/crumbs/imagedetailspage.py | |
parent | e281bb3e35ca7ffabaa6742c126fd6f6079c000f (diff) | |
download | poky-a9c563b1b5879ea597e00097ac7e399d531a0704.tar.gz |
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 <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/imagedetailspage.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py index c47d67a222..a1c133edee 100755 --- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py | |||
@@ -27,6 +27,9 @@ from bb.ui.crumbs.hobwidget import hic, HobViewTable, HobAltButton, HobButton | |||
27 | from bb.ui.crumbs.hobpages import HobPage | 27 | from bb.ui.crumbs.hobpages import HobPage |
28 | import subprocess | 28 | import subprocess |
29 | from bb.ui.crumbs.hig import CrumbsDialog | 29 | from bb.ui.crumbs.hig import CrumbsDialog |
30 | from bb.ui.crumbs.hobthreads import OpeningLogThread | ||
31 | from bb.ui.crumbs.hig import OpeningLogDialog | ||
32 | |||
30 | # | 33 | # |
31 | # ImageDetailsPage | 34 | # ImageDetailsPage |
32 | # | 35 | # |
@@ -404,7 +407,18 @@ class ImageDetailsPage (HobPage): | |||
404 | 407 | ||
405 | def open_log_clicked_cb(self, button, log_file): | 408 | def open_log_clicked_cb(self, button, log_file): |
406 | if log_file: | 409 | if log_file: |
407 | os.system("xdg-open /%s" % log_file) | 410 | self.stop = False |
411 | dialog = OpeningLogDialog(title = "Opening Log", | ||
412 | parent = None, | ||
413 | flags = gtk.DIALOG_MODAL | ||
414 | | gtk.DIALOG_DESTROY_WITH_PARENT | ||
415 | | gtk.DIALOG_NO_SEPARATOR) | ||
416 | #create a thread to open log file | ||
417 | background = OpeningLogThread(dialog, log_file, self) | ||
418 | background.start() | ||
419 | response = dialog.run() | ||
420 | self.stop = True | ||
421 | background.join() | ||
408 | 422 | ||
409 | def refresh_package_detail_box(self, image_size): | 423 | def refresh_package_detail_box(self, image_size): |
410 | self.package_detail.update_line_widgets("Total image size: ", image_size) | 424 | self.package_detail.update_line_widgets("Total image size: ", image_size) |