From 116219ce09c63dfdbf1f57563c6d0b400bd96823 Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Thu, 25 Jul 2013 07:37:34 +0000 Subject: bitbake: hob: make changes in order to permit from UI to edit an image after saving it Added the image name to the list model, in order to show the image name as the user named it. [YOCTO #4193] (Bitbake rev: 0aba493103d1fe50026a47db16529febbbbd77a2) Signed-off-by: Cristiana Voicu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'bitbake/lib/bb/ui/crumbs/hoblistmodel.py') diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py index d8f3256e10..34ff76a9d2 100644 --- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py @@ -678,15 +678,8 @@ class RecipeListModel(gtk.ListStore): self.clear() # dummy image for prompt - self.set(self.append(), self.COL_NAME, self.__custom_image__, - self.COL_DESC, "Use 'Edit image recipe' to customize recipes and packages " \ - "to be included in your image ", - self.COL_LIC, "", self.COL_GROUP, "", - self.COL_DEPS, "", self.COL_BINB, "", - self.COL_TYPE, "image", self.COL_INC, False, - self.COL_IMG, False, self.COL_INSTALL, "", self.COL_PN, self.__custom_image__, - self.COL_SUMMARY, "", self.COL_VERSION, "", self.COL_REVISION, "", - self.COL_HOMEPAGE, "", self.COL_BUGTRACKER, "") + self.set_in_list(self.__custom_image__, "Use 'Edit image recipe' to customize recipes and packages " \ + "to be included in your image ") for item in event_model["pn"]: name = item @@ -732,6 +725,23 @@ class RecipeListModel(gtk.ListStore): self.pn_path[pn] = path it = self.iter_next(it) + def set_in_list(self, item, desc): + self.set(self.append(), self.COL_NAME, item, + self.COL_DESC, desc, + self.COL_LIC, "", self.COL_GROUP, "", + self.COL_DEPS, "", self.COL_BINB, "", + self.COL_TYPE, "image", self.COL_INC, False, + self.COL_IMG, False, self.COL_INSTALL, "", self.COL_PN, item, + self.COL_SUMMARY, "", self.COL_VERSION, "", self.COL_REVISION, "", + self.COL_HOMEPAGE, "", self.COL_BUGTRACKER, "") + self.pn_path = {} + it = self.get_iter_first() + while it: + pn = self.get_value(it, self.COL_NAME) + path = self.get_path(it) + self.pn_path[pn] = path + it = self.iter_next(it) + """ Update the model, send out the notification. """ -- cgit v1.2.3-54-g00ecf