diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/packageselectionpage.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/packageselectionpage.py | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py index 1b832eb633..d1015352f1 100755 --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py | |||
@@ -143,8 +143,8 @@ class PackageSelectionPage (HobPage): | |||
143 | # add all into the dialog | 143 | # add all into the dialog |
144 | self.box_group_area.pack_start(self.ins, expand=True, fill=True) | 144 | self.box_group_area.pack_start(self.ins, expand=True, fill=True) |
145 | 145 | ||
146 | button_box = gtk.HBox(False, 6) | 146 | self.button_box = gtk.HBox(False, 6) |
147 | self.box_group_area.pack_start(button_box, expand=False, fill=False) | 147 | self.box_group_area.pack_start(self.button_box, expand=False, fill=False) |
148 | 148 | ||
149 | self.build_image_button = HobButton('Build image') | 149 | self.build_image_button = HobButton('Build image') |
150 | self.build_image_button.set_size_request(205, 49) | 150 | self.build_image_button.set_size_request(205, 49) |
@@ -152,11 +152,11 @@ class PackageSelectionPage (HobPage): | |||
152 | self.build_image_button.set_flags(gtk.CAN_DEFAULT) | 152 | self.build_image_button.set_flags(gtk.CAN_DEFAULT) |
153 | self.build_image_button.grab_default() | 153 | self.build_image_button.grab_default() |
154 | self.build_image_button.connect("clicked", self.build_image_clicked_cb) | 154 | self.build_image_button.connect("clicked", self.build_image_clicked_cb) |
155 | button_box.pack_end(self.build_image_button, expand=False, fill=False) | 155 | self.button_box.pack_end(self.build_image_button, expand=False, fill=False) |
156 | 156 | ||
157 | self.back_button = HobAltButton("<< Back to image configuration") | 157 | self.back_button = HobAltButton("<< Back to image configuration") |
158 | self.back_button.connect("clicked", self.back_button_clicked_cb) | 158 | self.back_button.connect("clicked", self.back_button_clicked_cb) |
159 | button_box.pack_start(self.back_button, expand=False, fill=False) | 159 | self.button_box.pack_start(self.back_button, expand=False, fill=False) |
160 | 160 | ||
161 | def button_click_cb(self, widget, event): | 161 | def button_click_cb(self, widget, event): |
162 | path, col = widget.table_tree.get_cursor() | 162 | path, col = widget.table_tree.get_cursor() |
@@ -166,6 +166,25 @@ class PackageSelectionPage (HobPage): | |||
166 | if binb: | 166 | if binb: |
167 | self.builder.show_binb_dialog(binb) | 167 | self.builder.show_binb_dialog(binb) |
168 | 168 | ||
169 | def view_log_clicked_cb(self, button, log_file): | ||
170 | if log_file: | ||
171 | os.system("xdg-open /%s" % log_file) | ||
172 | |||
173 | def show_page(self, log_file): | ||
174 | children = self.button_box.get_children() or [] | ||
175 | for child in children: | ||
176 | self.button_box.remove(child) | ||
177 | # re-packed the buttons as request, add the 'view log' button if build success | ||
178 | self.button_box.pack_start(self.back_button, expand=False, fill=False) | ||
179 | self.button_box.pack_end(self.build_image_button, expand=False, fill=False) | ||
180 | if log_file: | ||
181 | view_log_button = HobAltButton("View log") | ||
182 | view_log_button.connect("clicked", self.view_log_clicked_cb, log_file) | ||
183 | view_log_button.set_tooltip_text("Open the building log files") | ||
184 | self.button_box.pack_end(view_log_button, expand=False, fill=False) | ||
185 | |||
186 | self.show_all() | ||
187 | |||
169 | def build_image_clicked_cb(self, button): | 188 | def build_image_clicked_cb(self, button): |
170 | self.builder.build_image() | 189 | self.builder.build_image() |
171 | 190 | ||