From: Joshua Lock <josh@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 02/12] Hob: use HobNotebook to implement a notebook in build details page
Date: Mon, 19 Mar 2012 16:49:27 -0700 [thread overview]
Message-ID: <4F67C607.50806@linux.intel.com> (raw)
In-Reply-To: <8565670d713978a93a57a96c55b4815a144af3e5.1331910234.git.shane.wang@intel.com>
On 16/03/12 08:10, Shane Wang wrote:
> This patch is to use HobNotebook we defined to implement the notebook in the build details page.
>
> Signed-off-by: Liming An<limingx.l.an@intel.com>
> Signed-off-by: Shane Wang<shane.wang@intel.com>
> ---
> bitbake/lib/bb/ui/crumbs/builddetailspage.py | 30 ++++++++++--
> bitbake/lib/bb/ui/crumbs/runningbuild.py | 65 ++++++++++++++++++++++++++
> 2 files changed, 90 insertions(+), 5 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
> index 8b75ca0..63d2c7b 100755
> --- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
> +++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
> @@ -22,8 +22,10 @@
>
> import gtk
> from bb.ui.crumbs.progressbar import HobProgressBar
> -from bb.ui.crumbs.hobwidget import hic
> +from bb.ui.crumbs.hobwidget import hic, HobNotebook
> from bb.ui.crumbs.runningbuild import RunningBuildTreeView
> +from bb.ui.crumbs.runningbuild import BuildConfigurationTreeView
> +from bb.ui.crumbs.runningbuild import BuildFailureTreeView
> from bb.ui.crumbs.hobpages import HobPage
>
> #
> @@ -49,11 +51,29 @@ class BuildDetailsPage (HobPage):
> self.stop_button.connect("clicked", self.stop_button_clicked_cb)
> self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
>
> + self.notebook = HobNotebook()
> + self.config_tv = BuildConfigurationTreeView()
> + self.config_model = self.builder.handler.build.model.config_model()
> + self.config_tv.set_model(self.config_model)
> + self.scrolled_view_config = gtk.ScrolledWindow ()
> + self.scrolled_view_config.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
> + self.scrolled_view_config.add(self.config_tv)
> + self.notebook.append_page(self.scrolled_view_config, gtk.Label("Build Configuration"))
> +
> + self.failure_tv = BuildFailureTreeView()
> + self.failure_model = self.builder.handler.build.model.failure_model()
> + self.failure_tv.set_model(self.failure_model)
> + self.scrolled_view_failure = gtk.ScrolledWindow ()
> + self.scrolled_view_failure.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
> + self.scrolled_view_failure.add(self.failure_tv)
> + self.notebook.append_page(self.scrolled_view_failure, gtk.Label("Issues"))
> +
> self.build_tv = RunningBuildTreeView(readonly=True)
> self.build_tv.set_model(self.builder.handler.build.model)
> - self.scrolled_view = gtk.ScrolledWindow ()
> - self.scrolled_view.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
> - self.scrolled_view.add(self.build_tv)
> + self.scrolled_view_build = gtk.ScrolledWindow ()
> + self.scrolled_view_build.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
> + self.scrolled_view_build.add(self.build_tv)
> + self.notebook.append_page(self.scrolled_view_build, gtk.Label("Log"))
>
> self.button_box = gtk.HBox(False, 6)
> self.back_button = gtk.LinkButton("Go back to Image Configuration screen", "<< Back to image configuration")
> @@ -86,7 +106,7 @@ class BuildDetailsPage (HobPage):
> self.progress_bar.reset()
> self.vbox.pack_start(self.progress_box, expand=False, fill=False)
>
> - self.vbox.pack_start(self.scrolled_view, expand=True, fill=True)
> + self.vbox.pack_start(self.notebook, expand=True, fill=True)
>
> self.box_group_area.pack_end(self.button_box, expand=False, fill=False)
> self.show_all()
> diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
> index 718f692..eedd8d9 100644
> --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
> +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
> @@ -25,6 +25,7 @@ import logging
> import time
> import urllib
> import urllib2
> +import pango
> from bb.ui.crumbs.hobcolor import HobColors
>
> class RunningBuildModel (gtk.TreeStore):
> @@ -40,6 +41,32 @@ class RunningBuildModel (gtk.TreeStore):
> gobject.TYPE_STRING,
> gobject.TYPE_INT)
>
> + def config_model_filter(self, model, it):
> + msg = model.get(it, self.COL_MESSAGE)[0]
> + if msg == None or type(msg) != str:
> + return False
> + if msg.startswith("\nOE Build Configuration:\n"):
> + return True
> + return False
I think I commented on this before, this seems like a heavy way to
achieve this functionality. Is there not another way we can display the
Build Configuration to the user without having to filter every message
emitted?
Further, if we're going to display this information in a separate page
of the notebook would it not make sense to not show it in the build log
page?
Cheers,
Joshua
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-03-19 23:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 15:10 [PATCH 00/12] [V3]Hob Notebook Implementation and Others Shane Wang
2012-03-16 15:10 ` [PATCH 01/12] Hob: implement a self-defined notebook visual component for Hob Shane Wang
2012-03-19 23:49 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 02/12] Hob: use HobNotebook to implement a notebook in build details page Shane Wang
2012-03-19 23:49 ` Joshua Lock [this message]
2012-03-20 13:44 ` Wang, Shane
2012-03-20 14:17 ` Wang, Shane
2012-03-16 15:10 ` [PATCH 03/12] Hob: show indicators on the tabs of the Hob notebook Shane Wang
2012-03-19 23:49 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 04/12] Hob: change the code style to enumerate a list in a for-loop Shane Wang
2012-03-19 23:50 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 05/12] Hob: fix '!= None' and '== None' in the code Shane Wang
2012-03-19 23:51 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 06/12] Hob: allow users to setup the proxies Shane Wang
2012-03-19 23:51 ` Joshua Lock
2012-03-20 13:27 ` Wang, Shane
2012-03-26 17:38 ` Barros Pena, Belen
2012-03-16 15:10 ` [PATCH 07/12] Hob: remove the invalid code in hobwidget.py Shane Wang
2012-03-19 23:51 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 08/12] Hob: change the range dance in hobwidget make it like a pythonista Shane Wang
2012-03-19 23:57 ` Joshua Lock
2012-03-20 12:16 ` An, LimingX L
2012-03-16 15:10 ` [PATCH 09/12] Hob: fix static variable "self.search" to parameter "search" in signal callback function Shane Wang
2012-03-19 23:52 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 10/12] Hob: add auto adjust background area function for long issue text Shane Wang
2012-03-19 23:52 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 11/12] Hob: change HobNoteBook tab edge color from green to gray Shane Wang
2012-03-19 23:53 ` Joshua Lock
2012-03-16 15:10 ` [PATCH 12/12] Hob: per UI design add refresh icon for building log Shane Wang
2012-03-19 23:53 ` Joshua Lock
2012-03-20 13:04 ` An, LimingX L
2012-03-20 18:29 ` Joshua Lock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F67C607.50806@linux.intel.com \
--to=josh@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.