summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py22
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/recipeselectionpage.py8
2 files changed, 28 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 8c8bf9bc77..a42cdecf2d 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -425,6 +425,7 @@ class HobTabBar(gtk.DrawingArea):
425 self.connect("expose-event", self.on_draw) 425 self.connect("expose-event", self.on_draw)
426 self.connect("button-press-event", self.button_pressed_cb) 426 self.connect("button-press-event", self.button_pressed_cb)
427 self.connect("button-release-event", self.button_released_cb) 427 self.connect("button-release-event", self.button_released_cb)
428 self.connect("query-tooltip", self.query_tooltip_cb)
428 self.show_all() 429 self.show_all()
429 430
430 def button_released_cb(self, widget, event): 431 def button_released_cb(self, widget, event):
@@ -488,7 +489,7 @@ class HobTabBar(gtk.DrawingArea):
488 child["g"] = color.green 489 child["g"] = color.green
489 child["b"] = color.blue 490 child["b"] = color.blue
490 491
491 def append_tab_child(self, title, page): 492 def append_tab_child(self, title, page, tooltip=""):
492 num = len(self.children) + 1 493 num = len(self.children) + 1
493 self.tab_width = self.tab_width * len(self.children) / num 494 self.tab_width = self.tab_width * len(self.children) / num
494 495
@@ -513,8 +514,11 @@ class HobTabBar(gtk.DrawingArea):
513 "title" : title, 514 "title" : title,
514 "indicator_show" : False, 515 "indicator_show" : False,
515 "indicator_number" : 0, 516 "indicator_number" : 0,
517 "tooltip_markup" : tooltip,
516 } 518 }
517 self.children.append(new_one) 519 self.children.append(new_one)
520 if tooltip and (not self.props.has_tooltip):
521 self.props.has_tooltip = True
518 # set the default current child 522 # set the default current child
519 if not self.current_child: 523 if not self.current_child:
520 self.current_child = new_one 524 self.current_child = new_one
@@ -683,6 +687,18 @@ class HobTabBar(gtk.DrawingArea):
683 687
684 return gtk.gdk.Rectangle(x, y, w, h) 688 return gtk.gdk.Rectangle(x, y, w, h)
685 689
690 def query_tooltip_cb(self, widget, x, y, keyboardtip, tooltip):
691 if keyboardtip or (not tooltip):
692 return False
693 # check which tab be clicked
694 for child in self.children:
695 if (child["x"] < x) and (x < child["x"] + self.tab_width) \
696 and (child["y"] < y) and (y < child["y"] + self.tab_height):
697 tooltip.set_markup(child["tooltip_markup"])
698 return True
699
700 return False
701
686class HobNotebook(gtk.VBox): 702class HobNotebook(gtk.VBox):
687 703
688 def __init__(self): 704 def __init__(self):
@@ -767,13 +783,15 @@ class HobNotebook(gtk.VBox):
767 if not notebook: 783 if not notebook:
768 return 784 return
769 title = notebook.get_tab_label_text(notebook_child) 785 title = notebook.get_tab_label_text(notebook_child)
786 label = notebook.get_tab_label(notebook_child)
787 tooltip_markup = label.get_tooltip_markup()
770 if not title: 788 if not title:
771 return 789 return
772 for child in self.tabbar.children: 790 for child in self.tabbar.children:
773 if child["title"] == title: 791 if child["title"] == title:
774 child["toggled_page"] = page 792 child["toggled_page"] = page
775 return 793 return
776 self.tabbar.append_tab_child(title, page) 794 self.tabbar.append_tab_child(title, page, tooltip_markup)
777 795
778 def page_removed_cb(self, notebook, notebook_child, page, title=""): 796 def page_removed_cb(self, notebook, notebook_child, page, title=""):
779 for child in self.tabbar.children: 797 for child in self.tabbar.children:
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
index 46f86e6cdd..6ecc7965d0 100755
--- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -34,6 +34,7 @@ class RecipeSelectionPage (HobPage):
34 pages = [ 34 pages = [
35 { 35 {
36 'name' : 'Included', 36 'name' : 'Included',
37 'tooltip' : 'The recipes currently included for your image',
37 'filter' : { RecipeListModel.COL_INC : [True], 38 'filter' : { RecipeListModel.COL_INC : [True],
38 RecipeListModel.COL_TYPE : ['recipe', 'task'] }, 39 RecipeListModel.COL_TYPE : ['recipe', 'task'] },
39 'columns' : [{ 40 'columns' : [{
@@ -66,6 +67,7 @@ class RecipeSelectionPage (HobPage):
66 }] 67 }]
67 }, { 68 }, {
68 'name' : 'All recipes', 69 'name' : 'All recipes',
70 'tooltip' : 'All recipes available in the Yocto Project',
69 'filter' : { RecipeListModel.COL_TYPE : ['recipe'] }, 71 'filter' : { RecipeListModel.COL_TYPE : ['recipe'] },
70 'columns' : [{ 72 'columns' : [{
71 'col_name' : 'Recipe name', 73 'col_name' : 'Recipe name',
@@ -97,6 +99,7 @@ class RecipeSelectionPage (HobPage):
97 }] 99 }]
98 }, { 100 }, {
99 'name' : 'Tasks', 101 'name' : 'Tasks',
102 'tooltip' : 'All tasks availabel in the Yocto Project',
100 'filter' : { RecipeListModel.COL_TYPE : ['task'] }, 103 'filter' : { RecipeListModel.COL_TYPE : ['task'] },
101 'columns' : [{ 104 'columns' : [{
102 'col_name' : 'Task name', 105 'col_name' : 'Task name',
@@ -151,12 +154,17 @@ class RecipeSelectionPage (HobPage):
151 tab.connect("button-release-event", self.button_click_cb) 154 tab.connect("button-release-event", self.button_click_cb)
152 tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include) 155 tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include)
153 label = gtk.Label(page['name']) 156 label = gtk.Label(page['name'])
157 label.set_selectable(False)
158 label.set_tooltip_text(page['tooltip'])
154 self.ins.append_page(tab, label) 159 self.ins.append_page(tab, label)
155 self.tables.append(tab) 160 self.tables.append(tab)
156 161
157 self.ins.set_entry("Search recipes:") 162 self.ins.set_entry("Search recipes:")
158 # set the search entry for each table 163 # set the search entry for each table
159 for tab in self.tables: 164 for tab in self.tables:
165 search_tip = "Enter a recipe's or task's name to find it"
166 self.ins.search.set_tooltip_text(search_tip)
167 self.ins.search.props.has_tooltip = True
160 tab.set_search_entry(0, self.ins.search) 168 tab.set_search_entry(0, self.ins.search)
161 169
162 # add all into the window 170 # add all into the window