diff options
author | Andrei Dinu <andrei.adrianx.dinu@intel.com> | 2013-03-05 17:36:28 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-19 13:51:24 +0000 |
commit | 5b5db02bd7edb881121401af4e398ddc6003034f (patch) | |
tree | b969eb4ea832ff432fd5525b60c2c89f30918bd8 | |
parent | a43792c933189fa11c121f4dea91d113a5740781 (diff) | |
download | poky-5b5db02bd7edb881121401af4e398ddc6003034f.tar.gz |
bitbake: hobwidget: added functionality for the information dialogs.
(Bitbake rev: e4d9729fc66f472266e9dc2f579edeef74d8f289)
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py index 0bdae3b58c..9a00e941e9 100644 --- a/bitbake/lib/bb/ui/crumbs/hobwidget.py +++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py | |||
@@ -345,18 +345,13 @@ class HobInfoButton(gtk.EventBox): | |||
345 | hic.ICON_INFO_DISPLAY_FILE) | 345 | hic.ICON_INFO_DISPLAY_FILE) |
346 | self.image.show() | 346 | self.image.show() |
347 | self.add(self.image) | 347 | self.add(self.image) |
348 | self.tip_markup = tip_markup | ||
349 | self.my_parent = parent | ||
348 | 350 | ||
349 | self.set_events(gtk.gdk.BUTTON_RELEASE | | 351 | self.set_events(gtk.gdk.BUTTON_RELEASE | |
350 | gtk.gdk.ENTER_NOTIFY_MASK | | 352 | gtk.gdk.ENTER_NOTIFY_MASK | |
351 | gtk.gdk.LEAVE_NOTIFY_MASK) | 353 | gtk.gdk.LEAVE_NOTIFY_MASK) |
352 | 354 | ||
353 | self.ptip = PersistentTooltip(tip_markup) | ||
354 | |||
355 | if parent: | ||
356 | self.ptip.set_parent(parent) | ||
357 | self.ptip.set_transient_for(parent) | ||
358 | self.ptip.set_destroy_with_parent(True) | ||
359 | |||
360 | self.connect("button-release-event", self.button_release_cb) | 355 | self.connect("button-release-event", self.button_release_cb) |
361 | self.connect("enter-notify-event", self.mouse_in_cb) | 356 | self.connect("enter-notify-event", self.mouse_in_cb) |
362 | self.connect("leave-notify-event", self.mouse_out_cb) | 357 | self.connect("leave-notify-event", self.mouse_out_cb) |
@@ -366,7 +361,18 @@ class HobInfoButton(gtk.EventBox): | |||
366 | PersistentTooltip | 361 | PersistentTooltip |
367 | """ | 362 | """ |
368 | def button_release_cb(self, widget, event): | 363 | def button_release_cb(self, widget, event): |
369 | self.ptip.show() | 364 | from bb.ui.crumbs.hig.propertydialog import PropertyDialog |
365 | self.dialog = PropertyDialog(title = '', | ||
366 | parent = self.my_parent, | ||
367 | information = self.tip_markup, | ||
368 | flags = gtk.DIALOG_DESTROY_WITH_PARENT | ||
369 | | gtk.DIALOG_NO_SEPARATOR) | ||
370 | |||
371 | button = self.dialog.add_button("Close", gtk.RESPONSE_CANCEL) | ||
372 | HobAltButton.style_button(button) | ||
373 | button.connect("clicked", lambda w: self.dialog.destroy()) | ||
374 | self.dialog.show_all() | ||
375 | self.dialog.run() | ||
370 | 376 | ||
371 | """ | 377 | """ |
372 | Change to the prelight image when the mouse enters the widget | 378 | Change to the prelight image when the mouse enters the widget |