* [PATCH 1/8] Hob: clear the building state after a successful build, as a failed build does
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 12:54 ` [PATCH 2/8] Hob: Change icon to error because parsing error is an error Shane Wang
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
bitbake/lib/bb/ui/crumbs/builder.py | 1 +
bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 0c00d2a..a651bdb 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -605,6 +605,7 @@ class Builder(gtk.Window):
elif self.current_step == self.PACKAGE_GENERATING:
fraction = 1.0
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
+ self.handler.build_succeeded_async()
self.stopping = False
def build_failed(self):
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 9c5dc77..f1f6168 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -365,6 +365,9 @@ class HobHandler(gobject.GObject):
self.commands_async.append(self.SUB_BUILD_IMAGE)
self.run_next_command(self.GENERATE_IMAGE)
+ def build_succeeded_async(self):
+ self.building = False
+
def build_failed_async(self):
self.initcmd = None
self.commands_async = []
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 2/8] Hob: Change icon to error because parsing error is an error
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
2012-03-29 12:54 ` [PATCH 1/8] Hob: clear the building state after a successful build, as a failed build does Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 12:54 ` [PATCH 3/8] Hob: Change "Just bake" to "Build image" as required Shane Wang
` (6 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
bitbake/lib/bb/ui/crumbs/builder.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index a651bdb..0226e1d 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -486,7 +486,7 @@ class Builder(gtk.Window):
if msg:
lbl = "<b>Error</b>\n"
lbl = lbl + "%s\n\n" % msg
- dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+ dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
button = dialog.add_button("Close", gtk.RESPONSE_OK)
HobButton.style_button(button)
response = dialog.run()
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 3/8] Hob: Change "Just bake" to "Build image" as required
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
2012-03-29 12:54 ` [PATCH 1/8] Hob: clear the building state after a successful build, as a failed build does Shane Wang
2012-03-29 12:54 ` [PATCH 2/8] Hob: Change icon to error because parsing error is an error Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 12:54 ` [PATCH 4/8] Hob: make ORANGE to be the same as the color on the dialog Shane Wang
` (5 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
[Yocto #2160]
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 0f59dd9..8914b1c 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -227,11 +227,11 @@ class ImageConfigurationPage (HobPage):
self.gtable.attach(self.view_packages_button, 20, 40, 30, 35)
def create_config_build_button(self):
- # Create the "Build packages" and "Just bake" buttons at the bottom
+ # Create the "Build packages" and "Build image" buttons at the bottom
button_box = gtk.HBox(False, 6)
- # create button "Just bake"
- just_bake_button = HobButton("Just bake")
+ # create button "Build image"
+ just_bake_button = HobButton("Build image")
just_bake_button.set_size_request(205, 49)
just_bake_button.set_tooltip_text("Build image to get your target image")
just_bake_button.connect("clicked", self.just_bake_button_clicked_cb)
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 4/8] Hob: make ORANGE to be the same as the color on the dialog
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
` (2 preceding siblings ...)
2012-03-29 12:54 ` [PATCH 3/8] Hob: Change "Just bake" to "Build image" as required Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 12:54 ` [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions Shane Wang
` (4 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
bitbake/lib/bb/ui/crumbs/hobcolor.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/hobcolor.py b/bitbake/lib/bb/ui/crumbs/hobcolor.py
index 4595dc1..74a9d46 100644
--- a/bitbake/lib/bb/ui/crumbs/hobcolor.py
+++ b/bitbake/lib/bb/ui/crumbs/hobcolor.py
@@ -21,7 +21,7 @@
class HobColors:
WHITE = "#ffffff"
PALE_GREEN = "#aaffaa"
- ORANGE = "#ff7c24"
+ ORANGE = "#eb8e68"
PALE_RED = "#ffaaaa"
GRAY = "#aaaaaa"
LIGHT_GRAY = "#dddddd"
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
` (3 preceding siblings ...)
2012-03-29 12:54 ` [PATCH 4/8] Hob: make ORANGE to be the same as the color on the dialog Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 20:04 ` Richard Purdie
2012-03-29 12:54 ` [PATCH 6/8] Hob: some color style changes to make HobTabBar more close to visual design Shane Wang
` (3 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
[Yocto #2186]
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
bitbake/lib/bb/runqueue.py | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6970548..67ad14b 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1049,17 +1049,21 @@ class RunQueueExecute:
result = os.waitpid(-1, os.WNOHANG)
if result[0] == 0 and result[1] == 0:
return None
- task = self.build_pids[result[0]]
- del self.build_pids[result[0]]
- self.build_pipes[result[0]].close()
- del self.build_pipes[result[0]]
+ task = None
+ if result[0] in self.build_pids.keys():
+ task = self.build_pids[result[0]]
+ del self.build_pids[result[0]]
+ if result[0] in self.build_pipes.keys():
+ self.build_pipes[result[0]].close()
+ del self.build_pipes[result[0]]
# self.build_stamps[result[0]] may not exist when use shared work directory.
if result[0] in self.build_stamps.keys():
del self.build_stamps[result[0]]
- if result[1] != 0:
- self.task_fail(task, result[1]>>8)
- else:
- self.task_complete(task)
+ if task:
+ if result[1] != 0:
+ self.task_fail(task, result[1]>>8)
+ else:
+ self.task_complete(task)
return True
def finish_now(self):
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions
2012-03-29 12:54 ` [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions Shane Wang
@ 2012-03-29 20:04 ` Richard Purdie
2012-03-30 6:10 ` Wang, Shane
2012-03-30 6:11 ` Wang, Shane
0 siblings, 2 replies; 15+ messages in thread
From: Richard Purdie @ 2012-03-29 20:04 UTC (permalink / raw)
To: Shane Wang; +Cc: bitbake-devel
On Thu, 2012-03-29 at 20:54 +0800, Shane Wang wrote:
>
>
> ne.wang@intel.com>
> To:
> bitbake-devel@lists.openembedded.org
> Subject:
> [bitbake-devel] [PATCH 5/8]
> runqueue.py: check results[0] in
> keys of build_pids before being
> used to avoid exceptions
> Date:
> Thu, 29 Mar 2012 20:54:54 +0800
> (29/03/12 13:54:54)
>
>
> [Yocto #2186]
>
> Signed-off-by: Shane Wang <shane.wang@intel.com>
> ---
> bitbake/lib/bb/runqueue.py | 20 ++++++++++++--------
> 1 files changed, 12 insertions(+), 8 deletions(-)
This kind of change sets off alarm bells. The big question is why are
you seeing exceptions? I suspect you're forking off processes within hob
which are then confusing the waitpid code. I'd have to ask why the UI is
forking processes when a build is running and why we're suddenly started
seeing this...
So can you please explain the problem further so we can fix the real
problem? I did look at #2186 but that doesn't help me either :(
Cheers,
Richard
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions
2012-03-29 20:04 ` Richard Purdie
@ 2012-03-30 6:10 ` Wang, Shane
2012-03-30 6:15 ` Chris Larson
2012-03-30 9:27 ` Richard Purdie
2012-03-30 6:11 ` Wang, Shane
1 sibling, 2 replies; 15+ messages in thread
From: Wang, Shane @ 2012-03-30 6:10 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel@lists.openembedded.org
Richard Purdie wrote on 2012-03-30:
> On Thu, 2012-03-29 at 20:54 +0800, Shane Wang wrote:
>>
>>
>> ne.wang@intel.com>
>> To:
>> bitbake-devel@lists.openembedded.org
>> Subject:
>> [bitbake-devel] [PATCH 5/8]
>> runqueue.py: check results[0] in
>> keys of build_pids before being
>> used to avoid exceptions
>> Date:
>> Thu, 29 Mar 2012 20:54:54 +0800
>> (29/03/12 13:54:54)
>>
>>
>> [Yocto #2186]
>>
>> Signed-off-by: Shane Wang <shane.wang@intel.com>
>> ---
>> bitbake/lib/bb/runqueue.py | 20 ++++++++++++--------
>> 1 files changed, 12 insertions(+), 8 deletions(-)
>
> This kind of change sets off alarm bells. The big question is why are
> you seeing exceptions? I suspect you're forking off processes within hob
> which are then confusing the waitpid code. I'd have to ask why the UI is
> forking processes when a build is running and why we're suddenly started
> seeing this...
The steps I did is to "Force stop" a build and click "build packages" to rebuild. Then I saw the exceptions.
In the command mode, there is no issue because the process exits.
In finish_now() in runqueue.py, os.kill() kills all sub-processes but they don't exit.
when I start a new build, self.build_pids is empty, but due to the above reason, os.waitpid still can get the value of pids.
>
> So can you please explain the problem further so we can fix the real
> problem? I did look at #2186 but that doesn't help me either :(
OK, I am going to submit another patch, but I think the condition check is also needed.
Otherwise, in the current code of runqueue_process_waitpid(), why do we have:
if result[0] in self.build_stamps.keys():
del self.build_stamps[result[0]]
>
> Cheers,
>
> Richard
--
Shane
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions
2012-03-30 6:10 ` Wang, Shane
@ 2012-03-30 6:15 ` Chris Larson
2012-03-30 9:27 ` Richard Purdie
1 sibling, 0 replies; 15+ messages in thread
From: Chris Larson @ 2012-03-30 6:15 UTC (permalink / raw)
To: Wang, Shane; +Cc: bitbake-devel@lists.openembedded.org
On Thu, Mar 29, 2012 at 11:10 PM, Wang, Shane <shane.wang@intel.com> wrote:
>> So can you please explain the problem further so we can fix the real
>> problem? I did look at #2186 but that doesn't help me either :(
> OK, I am going to submit another patch, but I think the condition check is also needed.
> Otherwise, in the current code of runqueue_process_waitpid(), why do we have:
> if result[0] in self.build_stamps.keys():
> del self.build_stamps[result[0]]
This is also off, from a code standpoint, even assuming it's needed.
There's no need to use the keys method at all for a map. 'in' against
a map automatically checks by key. result[0] in self.build_stamps.
--
Christopher Larson
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions
2012-03-30 6:10 ` Wang, Shane
2012-03-30 6:15 ` Chris Larson
@ 2012-03-30 9:27 ` Richard Purdie
1 sibling, 0 replies; 15+ messages in thread
From: Richard Purdie @ 2012-03-30 9:27 UTC (permalink / raw)
To: Wang, Shane; +Cc: bitbake-devel@lists.openembedded.org
On Fri, 2012-03-30 at 06:10 +0000, Wang, Shane wrote:
> Richard Purdie wrote on 2012-03-30:
>
> > On Thu, 2012-03-29 at 20:54 +0800, Shane Wang wrote:
> >>
> >>
> >> ne.wang@intel.com>
> >> To:
> >> bitbake-devel@lists.openembedded.org
> >> Subject:
> >> [bitbake-devel] [PATCH 5/8]
> >> runqueue.py: check results[0] in
> >> keys of build_pids before being
> >> used to avoid exceptions
> >> Date:
> >> Thu, 29 Mar 2012 20:54:54 +0800
> >> (29/03/12 13:54:54)
> >>
> >>
> >> [Yocto #2186]
> >>
> >> Signed-off-by: Shane Wang <shane.wang@intel.com>
> >> ---
> >> bitbake/lib/bb/runqueue.py | 20 ++++++++++++--------
> >> 1 files changed, 12 insertions(+), 8 deletions(-)
> >
> > This kind of change sets off alarm bells. The big question is why are
> > you seeing exceptions? I suspect you're forking off processes within hob
> > which are then confusing the waitpid code. I'd have to ask why the UI is
> > forking processes when a build is running and why we're suddenly started
> > seeing this...
> The steps I did is to "Force stop" a build and click "build packages" to rebuild. Then I saw the exceptions.
> In the command mode, there is no issue because the process exits.
Ok, so what it sounds like is that waitpid() is not being called in the
"force stop" mode to collect the exit values of the processes. We should
fix the code to collect the exit values even in force stop mode.
Cheers,
Richard (resisting the urge to talk about reaping and zombies)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions
2012-03-29 20:04 ` Richard Purdie
2012-03-30 6:10 ` Wang, Shane
@ 2012-03-30 6:11 ` Wang, Shane
1 sibling, 0 replies; 15+ messages in thread
From: Wang, Shane @ 2012-03-30 6:11 UTC (permalink / raw)
To: Wang, Shane, Richard Purdie; +Cc: bitbake-devel@lists.openembedded.org
By the way, I have never met the exception when I do "normally stop" the bitbake.
--
Shane
Wang, Shane wrote on 2012-03-30:
> Richard Purdie wrote on 2012-03-30:
>
>> On Thu, 2012-03-29 at 20:54 +0800, Shane Wang wrote:
>>>
>>>
>>> ne.wang@intel.com>
>>> To:
>>> bitbake-devel@lists.openembedded.org
>>> Subject:
>>> [bitbake-devel] [PATCH 5/8]
>>> runqueue.py: check results[0] in
>>> keys of build_pids before being
>>> used to avoid exceptions
>>> Date:
>>> Thu, 29 Mar 2012 20:54:54 +0800
>>> (29/03/12 13:54:54)
>>>
>>>
>>> [Yocto #2186]
>>>
>>> Signed-off-by: Shane Wang <shane.wang@intel.com>
>>> ---
>>> bitbake/lib/bb/runqueue.py | 20 ++++++++++++--------
>>> 1 files changed, 12 insertions(+), 8 deletions(-)
>>
>> This kind of change sets off alarm bells. The big question is why are
>> you seeing exceptions? I suspect you're forking off processes within hob
>> which are then confusing the waitpid code. I'd have to ask why the UI is
>> forking processes when a build is running and why we're suddenly started
>> seeing this...
> The steps I did is to "Force stop" a build and click "build packages" to rebuild.
> Then I saw the exceptions.
> In the command mode, there is no issue because the process exits.
>
> In finish_now() in runqueue.py, os.kill() kills all sub-processes but
> they don't exit. when I start a new build, self.build_pids is empty, but
> due to the above reason, os.waitpid still can get the value of pids.
>
>
>>
>> So can you please explain the problem further so we can fix the real
>> problem? I did look at #2186 but that doesn't help me either :(
> OK, I am going to submit another patch, but I think the condition check
> is also needed. Otherwise, in the current code of
> runqueue_process_waitpid(), why do we have:
> if result[0] in self.build_stamps.keys():
> del self.build_stamps[result[0]]
>
>>
>> Cheers,
>>
>> Richard
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 6/8] Hob: some color style changes to make HobTabBar more close to visual design
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
` (4 preceding siblings ...)
2012-03-29 12:54 ` [PATCH 5/8] runqueue.py: check results[0] in keys of build_pids before being used to avoid exceptions Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 12:54 ` [PATCH 7/8] Hob: fixed the 'error' icon source picture and adjusted corresponding showed icon size Shane Wang
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
The change includes:
- remove the colors which are not used
- change the background of indicators to deep red
- change the color style of the texts on HobTabBar, i.e., the tab text and the indicator background are gray when the tab is the current tab; the tab text is white and the indicator background is deep red when the tab is not the current tab.
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
bitbake/lib/bb/ui/crumbs/hobcolor.py | 4 +---
bitbake/lib/bb/ui/crumbs/hobwidget.py | 12 +++++++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/hobcolor.py b/bitbake/lib/bb/ui/crumbs/hobcolor.py
index 74a9d46..e10f546 100644
--- a/bitbake/lib/bb/ui/crumbs/hobcolor.py
+++ b/bitbake/lib/bb/ui/crumbs/hobcolor.py
@@ -25,13 +25,11 @@ class HobColors:
PALE_RED = "#ffaaaa"
GRAY = "#aaaaaa"
LIGHT_GRAY = "#dddddd"
- DEEP_GRAY = "#7c7c77"
SLIGHT_DARK = "#5f5f5f"
DARK = "#3c3b37"
BLACK = "#000000"
- LIGHT_ORANGE = "#f7a787"
- YELLOW = "#ffff00"
PALE_BLUE = "#53b8ff"
+ DEEP_RED = "#aa3e3e"
OK = WHITE
RUNNING = PALE_GREEN
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 413370e..8b176c6 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -558,7 +558,10 @@ class HobTabBar(gtk.DrawingArea):
off_y = (self.tab_height - fonth) / 2
x = child["x"] + off_x
y = child["y"] + off_y
- self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout)
+ if not child == self.current_child:
+ self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout, gtk.gdk.Color(HobColors.WHITE))
+ else:
+ self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout)
def draw_toggled_tab(self, cr):
if not self.current_child:
@@ -616,7 +619,10 @@ class HobTabBar(gtk.DrawingArea):
y = tab_y + self.tab_height/2 - dest_h/2
r = min(dest_w, dest_h)/2
- color = cr.set_source_color(gtk.gdk.color_parse(HobColors.ORANGE))
+ if not child == self.current_child:
+ color = cr.set_source_color(gtk.gdk.color_parse(HobColors.DEEP_RED))
+ else:
+ color = cr.set_source_color(gtk.gdk.color_parse(HobColors.GRAY))
# check round back area can contain the text or not
back_round_can_contain_width = float(2 * r * 0.707)
if float(textw) > back_round_can_contain_width:
@@ -635,7 +641,7 @@ class HobTabBar(gtk.DrawingArea):
x = x + (dest_w/2)-(textw/2)
y = y + (dest_h/2) - (texth/2)
cr.move_to(x, y)
- self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), layout)
+ self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), layout, gtk.gdk.Color(HobColors.WHITE))
def show_indicator_icon(self, child, number):
child["indicator_show"] = True
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 7/8] Hob: fixed the 'error' icon source picture and adjusted corresponding showed icon size
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
` (5 preceding siblings ...)
2012-03-29 12:54 ` [PATCH 6/8] Hob: some color style changes to make HobTabBar more close to visual design Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 12:54 ` [PATCH 8/8] Hob: in build details page, change error icon to denied icon Shane Wang
2012-03-29 20:26 ` [PATCH 0/8] Hob: bug fixes Richard Purdie
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
From: Liming An <limingx.l.an@intel.com>
The error source picture is not right, so fixed it and adjusted its size.
[YOCTO #2097]
Signed-off-by: Liming An <limingx.l.an@intel.com>
---
bitbake/lib/bb/ui/crumbs/hobwidget.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 8b176c6..bcc44cc 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -52,7 +52,7 @@ class hic:
ICON_INFO_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_display.png'))
ICON_INFO_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_hover.png'))
ICON_INDI_CONFIRM_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/confirmation.png'))
- ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/error.png'))
+ ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/denied.png'))
ICON_INDI_REMOVE_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove.png'))
ICON_INDI_REMOVE_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove-hover.png'))
ICON_INDI_ADD_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/add.png'))
@@ -933,6 +933,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
self.control = RefreshRuningController()
# add icon checker for make the gtk-icon transfer to hob-icon
self.checker = HobIconChecker()
+ self.set_property("stock-size", gtk.ICON_SIZE_DND)
def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG):
if widget and stock_id and gtk.icon_factory_lookup_default(stock_id):
@@ -990,7 +991,15 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
def on_get_size(self, widget, cell_area):
if self.props.icon_name or self.props.pixbuf or self.props.stock_id:
w, h = gtk.icon_size_lookup(self.props.stock_size)
- return 0, 0, w, h
+ calc_width = self.get_property("xpad") * 2 + w
+ calc_height = self.get_property("ypad") * 2 + h
+ x_offset = 0
+ y_offset = 0
+ if cell_area and w > 0 and h > 0:
+ x_offset = self.get_property("xalign") * (cell_area.width - calc_width - self.get_property("xpad"))
+ y_offset = self.get_property("yalign") * (cell_area.height - calc_height - self.get_property("ypad"))
+
+ return x_offset, y_offset, w, h
return 0, 0, 0, 0
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 8/8] Hob: in build details page, change error icon to denied icon
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
` (6 preceding siblings ...)
2012-03-29 12:54 ` [PATCH 7/8] Hob: fixed the 'error' icon source picture and adjusted corresponding showed icon size Shane Wang
@ 2012-03-29 12:54 ` Shane Wang
2012-03-29 20:26 ` [PATCH 0/8] Hob: bug fixes Richard Purdie
8 siblings, 0 replies; 15+ messages in thread
From: Shane Wang @ 2012-03-29 12:54 UTC (permalink / raw)
To: bitbake-devel
From: Liming An <limingx.l.an@intel.com>
For make icongraphy consistently to change the original gtk-icon to hob-icon
[YOCTO #2108]
Signed-off-by: Liming An <limingx.l.an@intel.com>
---
bitbake/lib/bb/ui/crumbs/runningbuild.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index 8d1f4e1..042902e 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -425,7 +425,7 @@ class BuildFailureTreeView(gtk.TreeView):
self.get_selection().set_mode(gtk.SELECTION_SINGLE)
# The icon that indicates whether we're building or failed.
- renderer = gtk.CellRendererPixbuf ()
+ renderer = HobCellRendererPixbuf ()
col = gtk.TreeViewColumn ("Status", renderer)
col.add_attribute (renderer, "icon-name", RunningBuildModel.COL_ICON)
self.append_column (col)
--
1.7.6
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 0/8] Hob: bug fixes
2012-03-29 12:54 [PATCH 0/8] Hob: bug fixes Shane Wang
` (7 preceding siblings ...)
2012-03-29 12:54 ` [PATCH 8/8] Hob: in build details page, change error icon to denied icon Shane Wang
@ 2012-03-29 20:26 ` Richard Purdie
8 siblings, 0 replies; 15+ messages in thread
From: Richard Purdie @ 2012-03-29 20:26 UTC (permalink / raw)
To: Shane Wang; +Cc: bitbake-devel
On Thu, 2012-03-29 at 20:54 +0800, Shane Wang wrote:
> This patchset includes the several Hob fixes:
> - fix the icons to be consistent on the whole GUI
> - fix the color style of the HobTabBar per visual design
> - add more checks before being used to avoid bitbake exception
> - fix the button label, etc.
>
> The following changes since commit 0057d7fde8315694307637c4d23fd414a4a200f9:
>
> lib/bb/ui/crumbs/hig: fix layers_changed test (2012-03-29 10:44:54 +0800)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib shane/hob
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=shane/hob
>
> Liming An (2):
> Hob: fixed the 'error' icon source picture and adjusted corresponding
> showed icon size
> Hob: in build details page, change error icon to denied icon
>
> Shane Wang (6):
> Hob: clear the building state after a successful build, as a failed
> build does
> Hob: Change icon to error because parsing error is an error
> Hob: Change "Just bake" to "Build image" as required
> Hob: make ORANGE to be the same as the color on the dialog
> runqueue.py: check results[0] in keys of build_pids before being used
> to avoid exceptions
> Hob: some color style changes to make HobTabBar more close to visual
> design
Merged to master apart from the runqueue change which I've commented on.
Cheers,
Richard
^ permalink raw reply [flat|nested] 15+ messages in thread