summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobwidget.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-02-29 22:15:01 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-01 15:51:31 +0000
commit7f6165735767fbe2e0017b2c7619746b14a78a65 (patch)
tree688a851502e6faced120ce6fc2152ca6f2101960 /bitbake/lib/bb/ui/crumbs/hobwidget.py
parentb8582dc99660b5c3c666ccd0ec835b14170c0803 (diff)
downloadpoky-7f6165735767fbe2e0017b2c7619746b14a78a65.tar.gz
Hob: fixed the issue in the brought-in-by dialog.
When typing any thing in the search entry, the brough-in-by dialog will be shown. That is because we call back "selection-changed" signal to pop up the dialog, which is not correct. This patch is to fix the problem by using "row-activated" signal. (Bitbake rev: ea56ae787153460166697bbcae92f51a77ca1571) 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/hobwidget.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py30
1 files changed, 17 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 141c4efb1b..38bc573a26 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -520,16 +520,16 @@ class HobViewTable (gtk.VBox):
520 A VBox to contain the table for different recipe views and package view 520 A VBox to contain the table for different recipe views and package view
521 """ 521 """
522 __gsignals__ = { 522 __gsignals__ = {
523 "toggled" : (gobject.SIGNAL_RUN_LAST, 523 "toggled" : (gobject.SIGNAL_RUN_LAST,
524 gobject.TYPE_NONE, 524 gobject.TYPE_NONE,
525 (gobject.TYPE_PYOBJECT, 525 (gobject.TYPE_PYOBJECT,
526 gobject.TYPE_STRING, 526 gobject.TYPE_STRING,
527 gobject.TYPE_INT, 527 gobject.TYPE_INT,
528 gobject.TYPE_PYOBJECT,)), 528 gobject.TYPE_PYOBJECT,)),
529 "changed" : (gobject.SIGNAL_RUN_LAST, 529 "row-activated" : (gobject.SIGNAL_RUN_LAST,
530 gobject.TYPE_NONE, 530 gobject.TYPE_NONE,
531 (gobject.TYPE_PYOBJECT, 531 (gobject.TYPE_PYOBJECT,
532 gobject.TYPE_PYOBJECT,)), 532 gobject.TYPE_PYOBJECT,)),
533 } 533 }
534 534
535 def __init__(self, columns): 535 def __init__(self, columns):
@@ -540,7 +540,8 @@ class HobViewTable (gtk.VBox):
540 self.table_tree.set_enable_search(True) 540 self.table_tree.set_enable_search(True)
541 self.table_tree.set_rules_hint(True) 541 self.table_tree.set_rules_hint(True)
542 self.table_tree.get_selection().set_mode(gtk.SELECTION_SINGLE) 542 self.table_tree.get_selection().set_mode(gtk.SELECTION_SINGLE)
543 self.table_tree.get_selection().connect("changed", self.selection_changed_cb, self.table_tree) 543 self.toggle_columns = []
544 self.table_tree.connect("row-activated", self.row_activated_cb)
544 545
545 for i in range(len(columns)): 546 for i in range(len(columns)):
546 col = gtk.TreeViewColumn(columns[i]['col_name']) 547 col = gtk.TreeViewColumn(columns[i]['col_name'])
@@ -564,6 +565,7 @@ class HobViewTable (gtk.VBox):
564 self.toggle_id = i 565 self.toggle_id = i
565 col.pack_end(cell, True) 566 col.pack_end(cell, True)
566 col.set_attributes(cell, active=columns[i]['col_id']) 567 col.set_attributes(cell, active=columns[i]['col_id'])
568 self.toggle_columns.append(columns[i]['col_name'])
567 elif columns[i]['col_style'] == 'radio toggle': 569 elif columns[i]['col_style'] == 'radio toggle':
568 cell = gtk.CellRendererToggle() 570 cell = gtk.CellRendererToggle()
569 cell.set_property('activatable', True) 571 cell.set_property('activatable', True)
@@ -572,6 +574,7 @@ class HobViewTable (gtk.VBox):
572 self.toggle_id = i 574 self.toggle_id = i
573 col.pack_end(cell, True) 575 col.pack_end(cell, True)
574 col.set_attributes(cell, active=columns[i]['col_id']) 576 col.set_attributes(cell, active=columns[i]['col_id'])
577 self.toggle_columns.append(columns[i]['col_name'])
575 578
576 scroll = gtk.ScrolledWindow() 579 scroll = gtk.ScrolledWindow()
577 scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS) 580 scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
@@ -598,8 +601,9 @@ class HobViewTable (gtk.VBox):
598 def toggled_cb(self, cell, path, columnid, tree): 601 def toggled_cb(self, cell, path, columnid, tree):
599 self.emit("toggled", cell, path, columnid, tree) 602 self.emit("toggled", cell, path, columnid, tree)
600 603
601 def selection_changed_cb(self, selection, tree): 604 def row_activated_cb(self, tree, path, view_column):
602 self.emit("changed", selection, tree) 605 if not view_column.get_title() in self.toggle_columns:
606 self.emit("row-activated", tree.get_model(), path)
603 607
604class HobViewBar (gtk.EventBox): 608class HobViewBar (gtk.EventBox):
605 """ 609 """