diff options
| author | Joshua Lock <josh@linux.intel.com> | 2011-08-03 18:12:32 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-04 15:06:39 +0100 |
| commit | cf4ab5363ff9396447f7a04ec8fd21945d315aa6 (patch) | |
| tree | bd5d4e7c2df0a4496ded7ae9687f8f653c589fa5 /bitbake/lib/bb/ui/hob.py | |
| parent | 1c1e27a7796c31aecd04484d35786c3632156ec5 (diff) | |
| download | poky-cf4ab5363ff9396447f7a04ec8fd21945d315aa6.tar.gz | |
bb/ui/hob: be clear that the image contents are an estimate
Partially addresses [YOCTO #1263]
(Bitbake rev: 5f079f11ca626a4a11ad728c56bde21009ddd7c8)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/hob.py')
| -rw-r--r-- | bitbake/lib/bb/ui/hob.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 5a4ac7850d..a38868ff74 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py | |||
| @@ -804,6 +804,14 @@ class MainWindow (gtk.Window): | |||
| 804 | menubar.show_all() | 804 | menubar.show_all() |
| 805 | 805 | ||
| 806 | return menubar | 806 | return menubar |
| 807 | |||
| 808 | def info_button_clicked_cb(self, button): | ||
| 809 | info = "We cannot accurately predict the image contents before they are built so instead a best" | ||
| 810 | info = info + " attempt at estimating what the image will contain is listed." | ||
| 811 | dialog = CrumbsDialog(self, info, gtk.STOCK_DIALOG_INFO) | ||
| 812 | dialog.add_buttons(gtk.STOCK_CLOSE, gtk.RESPONSE_OK) | ||
| 813 | resp = dialog.run() | ||
| 814 | dialog.destroy() | ||
| 807 | 815 | ||
| 808 | def create_build_gui(self): | 816 | def create_build_gui(self): |
| 809 | vbox = gtk.VBox(False, 12) | 817 | vbox = gtk.VBox(False, 12) |
| @@ -847,11 +855,19 @@ class MainWindow (gtk.Window): | |||
| 847 | ins.set_current_page(0) | 855 | ins.set_current_page(0) |
| 848 | ins.show_all() | 856 | ins.show_all() |
| 849 | 857 | ||
| 850 | label = gtk.Label("Image contents:") | 858 | hbox = gtk.HBox(False, 1) |
| 859 | hbox.show() | ||
| 860 | label = gtk.Label("Estimated image contents:") | ||
| 851 | self.model.connect("contents-changed", self.update_package_count_cb, label) | 861 | self.model.connect("contents-changed", self.update_package_count_cb, label) |
| 852 | label.set_property("xalign", 0.00) | 862 | label.set_property("xalign", 0.00) |
| 853 | label.show() | 863 | label.show() |
| 854 | vbox.pack_start(label, expand=False, fill=False, padding=6) | 864 | hbox.pack_start(label, expand=False, fill=False, padding=6) |
| 865 | info = gtk.Button("?") | ||
| 866 | info.set_tooltip_text("What does this mean?") | ||
| 867 | info.show() | ||
| 868 | info.connect("clicked", self.info_button_clicked_cb) | ||
| 869 | hbox.pack_start(info, expand=False, fill=False, padding=6) | ||
| 870 | vbox.pack_start(hbox, expand=False, fill=False, padding=6) | ||
| 855 | con = self.contents() | 871 | con = self.contents() |
| 856 | con.show() | 872 | con.show() |
| 857 | vbox.pack_start(con, expand=True, fill=True) | 873 | vbox.pack_start(con, expand=True, fill=True) |
| @@ -873,7 +889,7 @@ class MainWindow (gtk.Window): | |||
| 873 | return vbox | 889 | return vbox |
| 874 | 890 | ||
| 875 | def update_package_count_cb(self, model, count, label): | 891 | def update_package_count_cb(self, model, count, label): |
| 876 | lbl = "Image contents (%s packages):" % count | 892 | lbl = "Estimated image contents (%s packages):" % count |
| 877 | label.set_text(lbl) | 893 | label.set_text(lbl) |
| 878 | 894 | ||
| 879 | def contents(self): | 895 | def contents(self): |
