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/persistenttooltip.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/persistenttooltip.py b/bitbake/lib/bb/ui/crumbs/persistenttooltip.py
index 8ba0043381..e18406221e 100644
--- a/bitbake/lib/bb/ui/crumbs/persistenttooltip.py
+++ b/bitbake/lib/bb/ui/crumbs/persistenttooltip.py
@@ -76,9 +76,7 @@ class PersistentTooltip(gtk.Window):
76 # Draw our label and close buttons 76 # Draw our label and close buttons
77 hbox = gtk.HBox(False, 0) 77 hbox = gtk.HBox(False, 0)
78 hbox.show() 78 hbox.show()
79 vbox = gtk.VBox(False, 0) 79 self.add(hbox)
80 vbox.show()
81 vbox.pack_start(hbox, True, True, 0)
82 80
83 img = gtk.Image() 81 img = gtk.Image()
84 img.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_BUTTON) 82 img.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_BUTTON)
@@ -89,18 +87,21 @@ class PersistentTooltip(gtk.Window):
89 self.button.set_can_default(True) 87 self.button.set_can_default(True)
90 self.button.grab_focus() 88 self.button.grab_focus()
91 self.button.show() 89 self.button.show()
90 vbox = gtk.VBox(False, 0)
91 vbox.show()
92 vbox.pack_start(self.button, False, False, 0)
92 if __button_right: 93 if __button_right:
93 hbox.pack_end(self.button, False, False, 0) 94 hbox.pack_end(vbox, True, True, 0)
94 else: 95 else:
95 hbox.pack_start(self.button, False, False, 0) 96 hbox.pack_start(vbox, True, True, 0)
96 97
97 self.set_default(self.button) 98 self.set_default(self.button)
98 99
99 hbox = gtk.HBox(True, 6) 100 bin = gtk.HBox(True, 6)
100 hbox.set_border_width(6) 101 bin.set_border_width(6)
101 hbox.show() 102 bin.show()
102 vbox.pack_end(hbox, True, True, 6)
103 self.label = gtk.Label() 103 self.label = gtk.Label()
104 self.label.set_line_wrap(True)
104 # We want to match the colours of the normal tooltips, as dictated by 105 # We want to match the colours of the normal tooltips, as dictated by
105 # the users gtk+-2.0 theme, wherever possible - on some systems this 106 # the users gtk+-2.0 theme, wherever possible - on some systems this
106 # requires explicitly setting a fg_color for the label which matches the 107 # requires explicitly setting a fg_color for the label which matches the
@@ -119,12 +120,11 @@ class PersistentTooltip(gtk.Window):
119 break # we only care for the tooltip_fg_color 120 break # we only care for the tooltip_fg_color
120 self.label.set_markup(markup) 121 self.label.set_markup(markup)
121 self.label.show() 122 self.label.show()
122 hbox.pack_end(self.label, True, True, 6) 123 bin.add(self.label)
124 hbox.pack_end(bin, True, True, 6)
123 125
124 self.connect("key-press-event", self._catch_esc_cb) 126 self.connect("key-press-event", self._catch_esc_cb)
125 127
126 self.add(vbox)
127
128 """ 128 """
129 Callback when the PersistentTooltip's close button is clicked. 129 Callback when the PersistentTooltip's close button is clicked.
130 Hides the PersistentTooltip. 130 Hides the PersistentTooltip.