From ea8a7a82da8fa1fa3ff89877fa31dad33407d734 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Tue, 13 Mar 2012 17:10:26 +0800 Subject: Hob: Add stop button for parsing progress Add a Stop button to allow user to quit the parsing process. (Bitbake rev: a1936ff544f21cde0765f24dc9b0af126ca98752) Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py') diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py index f386281947..a73eab160e 100644 --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py @@ -150,7 +150,13 @@ class ImageConfigurationPage (HobPage): markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual." self.layer_info_icon = HobInfoButton(markup, self.get_parent()) + self.progress_box = gtk.HBox(False, 6) self.progress_bar = HobProgressBar() + self.progress_box.pack_start(self.progress_bar, expand=True, fill=True) + self.stop_button = gtk.LinkButton("Stop the parsing process", "Stop") + self.stop_button.connect("clicked", self.stop_button_clicked_cb) + self.progress_box.pack_end(self.stop_button, expand=False, fill=False) + self.machine_separator = gtk.HSeparator() def set_config_machine_layout(self, show_progress_bar = False): @@ -160,7 +166,7 @@ class ImageConfigurationPage (HobPage): self.gtable.attach(self.layer_button, 12, 36, 6, 10) self.gtable.attach(self.layer_info_icon, 36, 40, 6, 9) if show_progress_bar == True: - self.gtable.attach(self.progress_bar, 0, 40, 13, 17) + self.gtable.attach(self.progress_box, 0, 40, 13, 17) self.gtable.attach(self.machine_separator, 0, 40, 12, 13) def create_config_baseimg(self): @@ -242,8 +248,14 @@ class ImageConfigurationPage (HobPage): return button_box + def stop_button_clicked_cb(self, button): + self.builder.stop_parse() + def machine_combo_changed_cb(self, machine_combo): combo_item = machine_combo.get_active_text() + if not combo_item: + return + self.builder.configuration.curr_mach = combo_item # Do reparse recipes self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING) -- cgit v1.2.3-54-g00ecf