diff options
author | Liming An <limingx.l.an@intel.com> | 2012-05-14 20:51:50 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-20 09:24:24 +0100 |
commit | 881b81f2661f264795bfc9d10895a0675220369f (patch) | |
tree | 3f44e3834040fc9c94c0b8762e446d9235cdfdd4 /bitbake/lib/bb | |
parent | e80c1a370856b0e181c6db4a0886f93096117c59 (diff) | |
download | poky-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/lib/bb')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 18 |
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): | |||
1073 | self.image_table = HobViewTable(self.__columns__) | 1073 | self.image_table = HobViewTable(self.__columns__) |
1074 | self.image_table.set_size_request(-1, 300) | 1074 | self.image_table.set_size_request(-1, 300) |
1075 | self.image_table.connect("toggled", self.toggled_cb) | 1075 | self.image_table.connect("toggled", self.toggled_cb) |
1076 | self.image_table.connect_group_selection(self.table_selected_cb) | ||
1077 | self.image_table.connect("row-activated", self.row_actived_cb) | ||
1076 | self.vbox.pack_start(self.image_table, expand=True, fill=True) | 1078 | self.vbox.pack_start(self.image_table, expand=True, fill=True) |
1077 | 1079 | ||
1078 | self.show_all() | 1080 | self.show_all() |
1079 | 1081 | ||
1080 | def toggled_cb(self, table, cell, path, columnid, tree): | 1082 | def change_image_cb(self, model, path, columnid): |
1081 | model = tree.get_model() | ||
1082 | if not model: | 1083 | if not model: |
1083 | return | 1084 | return |
1084 | iter = model.get_iter_first() | 1085 | iter = model.get_iter_first() |
@@ -1089,6 +1090,19 @@ class ImageSelectionDialog (CrumbsDialog): | |||
1089 | 1090 | ||
1090 | model[path][columnid] = True | 1091 | model[path][columnid] = True |
1091 | 1092 | ||
1093 | def toggled_cb(self, table, cell, path, columnid, tree): | ||
1094 | model = tree.get_model() | ||
1095 | self.change_image_cb(model, path, columnid) | ||
1096 | |||
1097 | def table_selected_cb(self, selection): | ||
1098 | model, paths = selection.get_selected_rows() | ||
1099 | if paths: | ||
1100 | self.change_image_cb(model, paths[0], 1) | ||
1101 | |||
1102 | def row_actived_cb(self, tab, model, path): | ||
1103 | self.change_image_cb(model, path, 1) | ||
1104 | self.emit('response', gtk.RESPONSE_YES) | ||
1105 | |||
1092 | def select_path_cb(self, action, parent, entry): | 1106 | def select_path_cb(self, action, parent, entry): |
1093 | dialog = gtk.FileChooserDialog("", parent, | 1107 | dialog = gtk.FileChooserDialog("", parent, |
1094 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) | 1108 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) |