diff options
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 5 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 30 | ||||
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/packageselectionpage.py | 12 | ||||
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | 13 |
4 files changed, 24 insertions, 36 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 9aa6fdf815..1f9fcf72b8 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
| @@ -89,15 +89,12 @@ class BinbDialog(gtk.Dialog): | |||
| 89 | self.set_resizable(False) | 89 | self.set_resizable(False) |
| 90 | self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.DARK)) | 90 | self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.DARK)) |
| 91 | 91 | ||
| 92 | hbox = gtk.HBox(False, 0) | ||
| 93 | self.vbox.pack_start(hbox, expand=False, fill=False, padding=10) | ||
| 94 | |||
| 95 | label = gtk.Label(content) | 92 | label = gtk.Label(content) |
| 96 | label.set_alignment(0, 0) | 93 | label.set_alignment(0, 0) |
| 97 | label.set_line_wrap(True) | 94 | label.set_line_wrap(True) |
| 98 | label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.WHITE)) | 95 | label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.WHITE)) |
| 99 | 96 | ||
| 100 | hbox.pack_start(label, expand=False, fill=False, padding=10) | 97 | self.vbox.pack_start(label, expand=True, fill=True, padding=10) |
| 101 | self.vbox.show_all() | 98 | self.vbox.show_all() |
| 102 | 99 | ||
| 103 | # | 100 | # |
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 | ||
| 604 | class HobViewBar (gtk.EventBox): | 608 | class HobViewBar (gtk.EventBox): |
| 605 | """ | 609 | """ |
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py index 280d480c43..a3c4acdc14 100755 --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py | |||
| @@ -116,7 +116,7 @@ class PackageSelectionPage (HobPage): | |||
| 116 | tab.set_model(self.package_model.tree_model(filter)) | 116 | tab.set_model(self.package_model.tree_model(filter)) |
| 117 | tab.connect("toggled", self.table_toggled_cb) | 117 | tab.connect("toggled", self.table_toggled_cb) |
| 118 | if self.pages[i]['name'] == "Included": | 118 | if self.pages[i]['name'] == "Included": |
| 119 | tab.connect("changed", self.tree_selection_cb) | 119 | tab.connect("row-activated", self.tree_row_activated_cb) |
| 120 | 120 | ||
| 121 | reset_button = gtk.Button("Reset") | 121 | reset_button = gtk.Button("Reset") |
| 122 | reset_button.connect("clicked", self.reset_clicked_cb) | 122 | reset_button.connect("clicked", self.reset_clicked_cb) |
| @@ -161,14 +161,8 @@ class PackageSelectionPage (HobPage): | |||
| 161 | self.back_button.connect("clicked", self.back_button_clicked_cb) | 161 | self.back_button.connect("clicked", self.back_button_clicked_cb) |
| 162 | button_box.pack_start(self.back_button, expand=False, fill=False) | 162 | button_box.pack_start(self.back_button, expand=False, fill=False) |
| 163 | 163 | ||
| 164 | def tree_selection_cb(self, table, tree_selection, tree_view): | 164 | def tree_row_activated_cb(self, table, tree_model, path): |
| 165 | tree_model = tree_view.get_model() | 165 | binb = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB) |
| 166 | path, column = tree_view.get_cursor() | ||
| 167 | if not path or column == tree_view.get_column(2): | ||
| 168 | return | ||
| 169 | |||
| 170 | it = tree_model.get_iter(path) | ||
| 171 | binb = tree_model.get_value(it, PackageListModel.COL_BINB) | ||
| 172 | if binb: | 166 | if binb: |
| 173 | self.builder.show_binb_dialog(binb) | 167 | self.builder.show_binb_dialog(binb) |
| 174 | 168 | ||
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py index 93540b2a95..8a356935ac 100755 --- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py | |||
| @@ -140,8 +140,7 @@ class RecipeSelectionPage (HobPage): | |||
| 140 | tab.set_model(self.recipe_model.tree_model(filter)) | 140 | tab.set_model(self.recipe_model.tree_model(filter)) |
| 141 | tab.connect("toggled", self.table_toggled_cb) | 141 | tab.connect("toggled", self.table_toggled_cb) |
| 142 | if self.pages[i]['name'] == "Included": | 142 | if self.pages[i]['name'] == "Included": |
| 143 | tab.connect("changed", self.tree_selection_cb) | 143 | tab.connect("row-activated", self.tree_row_activated_cb) |
| 144 | |||
| 145 | reset_button = gtk.Button("Reset") | 144 | reset_button = gtk.Button("Reset") |
| 146 | reset_button.connect("clicked", self.reset_clicked_cb) | 145 | reset_button.connect("clicked", self.reset_clicked_cb) |
| 147 | hbox = gtk.HBox(False, 5) | 146 | hbox = gtk.HBox(False, 5) |
| @@ -185,14 +184,8 @@ class RecipeSelectionPage (HobPage): | |||
| 185 | self.back_button.connect("clicked", self.back_button_clicked_cb) | 184 | self.back_button.connect("clicked", self.back_button_clicked_cb) |
| 186 | button_box.pack_start(self.back_button, expand=False, fill=False) | 185 | button_box.pack_start(self.back_button, expand=False, fill=False) |
| 187 | 186 | ||
| 188 | def tree_selection_cb(self, table, tree_selection, tree_view): | 187 | def tree_row_activated_cb(self, table, tree_model, path): |
| 189 | tree_model = tree_view.get_model() | 188 | binb = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB) |
| 190 | path, column = tree_view.get_cursor() | ||
| 191 | if not path or column == tree_view.get_column(2): | ||
| 192 | return | ||
| 193 | |||
| 194 | it = tree_model.get_iter(path) | ||
| 195 | binb = tree_model.get_value(it, RecipeListModel.COL_BINB) | ||
| 196 | if binb: | 189 | if binb: |
| 197 | self.builder.show_binb_dialog(binb) | 190 | self.builder.show_binb_dialog(binb) |
| 198 | 191 | ||
