summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 652226c13f..1db93eac17 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -28,7 +28,7 @@ import re
28import subprocess 28import subprocess
29import shlex 29import shlex
30from bb.ui.crumbs.hobcolor import HobColors 30from bb.ui.crumbs.hobcolor import HobColors
31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobAltButton 31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton
32from bb.ui.crumbs.progressbar import HobProgressBar 32from bb.ui.crumbs.progressbar import HobProgressBar
33 33
34""" 34"""
@@ -815,23 +815,22 @@ class LayerSelectionDialog (CrumbsDialog):
815 col1.pack_start(cell1, True) 815 col1.pack_start(cell1, True)
816 col1.set_cell_data_func(cell1, self.draw_delete_button_cb, layer_tv) 816 col1.set_cell_data_func(cell1, self.draw_delete_button_cb, layer_tv)
817 817
818 add_button = HobAltButton() 818 add_button = gtk.Button()
819 add_button.set_relief(gtk.RELIEF_NONE)
819 box = gtk.HBox(False, 6) 820 box = gtk.HBox(False, 6)
820 box.show() 821 box.show()
821 add_button.add(box) 822 add_button.add(box)
822 im = gtk.Image() 823 add_button.connect("enter-notify-event", self.add_hover_cb)
823 im.set_from_file(hic.ICON_INDI_ADD) 824 add_button.connect("leave-notify-event", self.add_leave_cb)
824 im.show() 825 self.im = gtk.Image()
825 box.pack_start(im, expand=False, fill=False, padding=6) 826 self.im.set_from_file(hic.ICON_INDI_ADD_FILE)
827 self.im.show()
828 box.pack_start(self.im, expand=False, fill=False, padding=6)
826 lbl = gtk.Label("Add layer") 829 lbl = gtk.Label("Add layer")
827 lbl.set_alignment(0.0, 0.5) 830 lbl.set_alignment(0.0, 0.5)
828 lbl.show() 831 lbl.show()
829 box.pack_start(lbl, expand=True, fill=True, padding=6) 832 box.pack_start(lbl, expand=True, fill=True, padding=6)
830 add_button.connect("clicked", self.layer_widget_add_clicked_cb, layer_store, window) 833 add_button.connect("clicked", self.layer_widget_add_clicked_cb, layer_store, window)
831 add_button.set_can_default(True)
832 add_button.grab_default()
833 add_button.set_can_focus(True)
834 add_button.grab_focus()
835 table_layer.attach(add_button, 0, 10, 1, 2, gtk.EXPAND | gtk.FILL, 0, 0, 6) 834 table_layer.attach(add_button, 0, 10, 1, 2, gtk.EXPAND | gtk.FILL, 0, 0, 6)
836 layer_tv.set_model(layer_store) 835 layer_tv.set_model(layer_store)
837 836
@@ -839,6 +838,12 @@ class LayerSelectionDialog (CrumbsDialog):
839 838
840 return hbox, layer_store 839 return hbox, layer_store
841 840
841 def add_hover_cb(self, button, event):
842 self.im.set_from_file(hic.ICON_INDI_ADD_HOVER_FILE)
843
844 def add_leave_cb(self, button, event):
845 self.im.set_from_file(hic.ICON_INDI_ADD_FILE)
846
842 def __init__(self, title, layers, all_layers, parent, flags, buttons): 847 def __init__(self, title, layers, all_layers, parent, flags, buttons):
843 super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons) 848 super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons)
844 849
@@ -849,7 +854,7 @@ class LayerSelectionDialog (CrumbsDialog):
849 854
850 # icon for remove button in TreeView 855 # icon for remove button in TreeView
851 im = gtk.Image() 856 im = gtk.Image()
852 im.set_from_file(hic.ICON_INDI_REMOVE) 857 im.set_from_file(hic.ICON_INDI_REMOVE_FILE)
853 self.rem_icon = im.get_pixbuf() 858 self.rem_icon = im.get_pixbuf()
854 859
855 # class members for internal use 860 # class members for internal use