summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-02-27 13:28:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-20 15:21:32 +0000
commit88bbc0ce562aa80d2b98c8b48d79a612b47ca852 (patch)
treed3bbe6d318e96cbbcc46f350d6a730c36320a47c /bitbake/lib/bb/ui/crumbs/packageselectionpage.py
parent8b206d38c7fb172022e98a0879963e5f44bc2092 (diff)
downloadpoky-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/packageselectionpage.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/packageselectionpage.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
index 1c335ac733..3cd1c5e725 100755
--- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
@@ -23,7 +23,7 @@
23import gtk 23import gtk
24import glib 24import glib
25from bb.ui.crumbs.hobcolor import HobColors 25from bb.ui.crumbs.hobcolor import HobColors
26from bb.ui.crumbs.hobwidget import HobViewBar, HobViewTable 26from bb.ui.crumbs.hobwidget import HobViewTable, HobNotebook
27from bb.ui.crumbs.hoblistmodel import PackageListModel 27from bb.ui.crumbs.hoblistmodel import PackageListModel
28from bb.ui.crumbs.hobpages import HobPage 28from bb.ui.crumbs.hobpages import HobPage
29 29
@@ -102,11 +102,7 @@ class PackageSelectionPage (HobPage):
102 self.pack_start(self.group_align, expand=True, fill=True) 102 self.pack_start(self.group_align, expand=True, fill=True)
103 103
104 # set visiable members 104 # set visiable members
105 self.grid = gtk.Table(10, 1, True) 105 self.ins = HobNotebook()
106 self.grid.set_col_spacings(3)
107
108 self.ins = gtk.Notebook()
109 self.ins.set_show_tabs(False)
110 self.tables = [] # we need to modify table when the dialog is shown 106 self.tables = [] # we need to modify table when the dialog is shown
111 # append the tab 107 # append the tab
112 for i in range(len(self.pages)): 108 for i in range(len(self.pages)):
@@ -122,16 +118,13 @@ class PackageSelectionPage (HobPage):
122 self.ins.append_page(tab, label) 118 self.ins.append_page(tab, label)
123 self.tables.append(tab) 119 self.tables.append(tab)
124 120
125 self.grid.attach(self.ins, 0, 1, 1, 10, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND, 1, 1) 121 self.ins.set_entry("Search packages:")
126 # a black bar associated with the notebook
127 self.topbar = HobViewBar(self.ins)
128 self.grid.attach(self.topbar, 0, 1, 0, 1, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND, 1, 1)
129 # set the search entry for each table 122 # set the search entry for each table
130 for tab in self.tables: 123 for tab in self.tables:
131 tab.set_search_entry(0, self.topbar.search) 124 tab.set_search_entry(0, self.ins.search)
132 125
133 # add all into the dialog 126 # add all into the dialog
134 self.box_group_area.add(self.grid) 127 self.box_group_area.pack_start(self.ins, expand=True, fill=True)
135 128
136 button_box = gtk.HBox(False, 6) 129 button_box = gtk.HBox(False, 6)
137 self.box_group_area.pack_start(button_box, expand=False, fill=False) 130 self.box_group_area.pack_start(button_box, expand=False, fill=False)