aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorLiming An <limingx.l.an@intel.com>2012-05-14 20:51:50 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-20 09:24:24 +0100
commit881b81f2661f264795bfc9d10895a0675220369f (patch)
tree3f44e3834040fc9c94c0b8762e446d9235cdfdd4 /bitbake
parente80c1a370856b0e181c6db4a0886f93096117c59 (diff)
downloadopenembedded-core-contrib-881b81f2661f264795bfc9d10895a0675220369f.tar.gz
Hob:add function about clicked a row to load image file for 'my images' page
[YOCTO #2238] (Bitbake rev: b72ee3cf29a5badca3f8c1342356164270615aad) Signed-off-by: Liming An <limingx.l.an@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 4baf960a48..721d145a6a 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -1073,12 +1073,13 @@ class ImageSelectionDialog (CrumbsDialog):
self.image_table = HobViewTable(self.__columns__)
self.image_table.set_size_request(-1, 300)
self.image_table.connect("toggled", self.toggled_cb)
+ self.image_table.connect_group_selection(self.table_selected_cb)
+ self.image_table.connect("row-activated", self.row_actived_cb)
self.vbox.pack_start(self.image_table, expand=True, fill=True)
self.show_all()
- def toggled_cb(self, table, cell, path, columnid, tree):
- model = tree.get_model()
+ def change_image_cb(self, model, path, columnid):
if not model:
return
iter = model.get_iter_first()
@@ -1089,6 +1090,19 @@ class ImageSelectionDialog (CrumbsDialog):
model[path][columnid] = True
+ def toggled_cb(self, table, cell, path, columnid, tree):
+ model = tree.get_model()
+ self.change_image_cb(model, path, columnid)
+
+ def table_selected_cb(self, selection):
+ model, paths = selection.get_selected_rows()
+ if paths:
+ self.change_image_cb(model, paths[0], 1)
+
+ def row_actived_cb(self, tab, model, path):
+ self.change_image_cb(model, path, 1)
+ self.emit('response', gtk.RESPONSE_YES)
+
def select_path_cb(self, action, parent, entry):
dialog = gtk.FileChooserDialog("", parent,
gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)