diff options
author | Shane Wang <shane.wang@intel.com> | 2012-02-27 13:28:26 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-20 15:21:32 +0000 |
commit | 88bbc0ce562aa80d2b98c8b48d79a612b47ca852 (patch) | |
tree | d3bbe6d318e96cbbcc46f350d6a730c36320a47c /bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |
parent | 8b206d38c7fb172022e98a0879963e5f44bc2092 (diff) | |
download | poky-88bbc0ce562aa80d2b98c8b48d79a612b47ca852.tar.gz |
Hob: implement a self-defined notebook visual component for Hob
In recipe selection page, package selection page, and build details page, etc, there is a notebook component which is not gtk.Notebook in the design video.
We implement the visual component with a drawing area, and use it to replace the old notebook in recipe selection page and package selection page. The reasons why we do it are:
1) General speaking, gtk.Notebook doesn't look like the designer worked out. (see https://wiki.yoctoproject.org/wiki/File:Hob1.2-screencast2.mov)
2) And the designer version looks better, for example, there is an indicator to show how many recipes or packages are included, and how many issues happened when building? Very straightforward.
But technically, gtk.Notebook can't implement that, as far as we know.
3) Moreover, there is an entry for "search recipes", and "search packages". How to make it horizontal to the tabs is a problem to us.
Regarding those, we give up gtk.Notebook and use our own.
(From Poky rev: e4ebac226cc5e4589bcecd8bada9fde462e925cc)
(Bitbake rev: b0c2ca3f600694c6d37924006de3f9474b2a9a8e)
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/recipeselectionpage.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py index d615ef1897..db873b611a 100755 --- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |||
@@ -23,7 +23,7 @@ | |||
23 | import gtk | 23 | import gtk |
24 | import glib | 24 | import glib |
25 | from bb.ui.crumbs.hobcolor import HobColors | 25 | from bb.ui.crumbs.hobcolor import HobColors |
26 | from bb.ui.crumbs.hobwidget import HobViewBar, HobViewTable | 26 | from bb.ui.crumbs.hobwidget import HobViewTable, HobNotebook |
27 | from bb.ui.crumbs.hoblistmodel import RecipeListModel | 27 | from bb.ui.crumbs.hoblistmodel import RecipeListModel |
28 | from bb.ui.crumbs.hobpages import HobPage | 28 | from bb.ui.crumbs.hobpages import HobPage |
29 | 29 | ||
@@ -124,13 +124,7 @@ class RecipeSelectionPage (HobPage): | |||
124 | self.pack_start(self.group_align, expand=True, fill=True) | 124 | self.pack_start(self.group_align, expand=True, fill=True) |
125 | 125 | ||
126 | # set visiable members | 126 | # set visiable members |
127 | self.grid = gtk.Table(10, 1, True) | 127 | self.ins = HobNotebook() |
128 | self.grid.set_col_spacings(3) | ||
129 | |||
130 | # draw the left part of the window | ||
131 | # a notebook | ||
132 | self.ins = gtk.Notebook() | ||
133 | self.ins.set_show_tabs(False) | ||
134 | self.tables = [] # we need modify table when the dialog is shown | 128 | self.tables = [] # we need modify table when the dialog is shown |
135 | # append the tabs in order | 129 | # append the tabs in order |
136 | for i in range(len(self.pages)): | 130 | for i in range(len(self.pages)): |
@@ -146,16 +140,13 @@ class RecipeSelectionPage (HobPage): | |||
146 | self.ins.append_page(tab, label) | 140 | self.ins.append_page(tab, label) |
147 | self.tables.append(tab) | 141 | self.tables.append(tab) |
148 | 142 | ||
149 | self.grid.attach(self.ins, 0, 1, 1, 10, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND) | 143 | self.ins.set_entry("Search recipes:") |
150 | # a black bar associated with the notebook | ||
151 | self.topbar = HobViewBar(self.ins) | ||
152 | self.grid.attach(self.topbar, 0, 1, 0, 1, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND) | ||
153 | # set the search entry for each table | 144 | # set the search entry for each table |
154 | for tab in self.tables: | 145 | for tab in self.tables: |
155 | tab.set_search_entry(0, self.topbar.search) | 146 | tab.set_search_entry(0, self.ins.search) |
156 | 147 | ||
157 | # add all into the window | 148 | # add all into the window |
158 | self.box_group_area.add(self.grid) | 149 | self.box_group_area.pack_start(self.ins, expand=True, fill=True) |
159 | 150 | ||
160 | button_box = gtk.HBox(False, 6) | 151 | button_box = gtk.HBox(False, 6) |
161 | self.box_group_area.pack_end(button_box, expand=False, fill=False) | 152 | self.box_group_area.pack_end(button_box, expand=False, fill=False) |