summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-01-31 14:43:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-15 12:12:38 +0000
commit07803d58e0d33d54dfd3913eea6b050b726edd3c (patch)
tree1d71a9276c7b6d10231f9bc77b0e283da3ebeb07 /bitbake/lib
parente36994f69a6780e4eb858262f16732d714c922f0 (diff)
downloadpoky-07803d58e0d33d54dfd3913eea6b050b726edd3c.tar.gz
bitbake: hob: remove save/load template functionality
The Hob templates functionality, in its current incarnation, is confusing and has no clear utility. [YOCTO #3696] (Bitbake rev: 4eb3b6bb9f936808ddf085624078f6479c522c48) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py33
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py2
-rw-r--r--bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py13
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/imagedetailspage.py42
4 files changed, 1 insertions, 89 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 6805f20cc5..f6adabe42f 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -1230,39 +1230,6 @@ class Builder(gtk.Window):
1230 self.update_config_async() 1230 self.update_config_async()
1231 dialog.destroy() 1231 dialog.destroy()
1232 1232
1233 def show_load_template_dialog(self):
1234 dialog = gtk.FileChooserDialog("Load Template Files", self,
1235 gtk.FILE_CHOOSER_ACTION_OPEN)
1236 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
1237 HobAltButton.style_button(button)
1238 button = dialog.add_button("Open", gtk.RESPONSE_YES)
1239 HobButton.style_button(button)
1240 filter = gtk.FileFilter()
1241 filter.set_name("Hob Files")
1242 filter.add_pattern("*.hob")
1243 dialog.add_filter(filter)
1244
1245 response = dialog.run()
1246 path = None
1247 if response == gtk.RESPONSE_YES:
1248 path = dialog.get_filename()
1249 dialog.destroy()
1250 return response == gtk.RESPONSE_YES, path
1251
1252 def show_save_template_dialog(self):
1253 dialog = gtk.FileChooserDialog("Save Template Files", self,
1254 gtk.FILE_CHOOSER_ACTION_SAVE)
1255 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
1256 HobAltButton.style_button(button)
1257 button = dialog.add_button("Save", gtk.RESPONSE_YES)
1258 HobButton.style_button(button)
1259 dialog.set_current_name("hob")
1260 response = dialog.run()
1261 if response == gtk.RESPONSE_YES:
1262 path = dialog.get_filename()
1263 self.save_template(path)
1264 dialog.destroy()
1265
1266 def get_image_extension(self): 1233 def get_image_extension(self):
1267 image_extension = {} 1234 image_extension = {}
1268 for type in self.parameters.image_types: 1235 for type in self.parameters.image_types:
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 3ca9066227..0bdae3b58c 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -44,8 +44,6 @@ class hic:
44 ICON_PACKAGES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('packages/packages_hover.png')) 44 ICON_PACKAGES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('packages/packages_hover.png'))
45 ICON_LAYERS_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('layers/layers_display.png')) 45 ICON_LAYERS_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('layers/layers_display.png'))
46 ICON_LAYERS_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('layers/layers_hover.png')) 46 ICON_LAYERS_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('layers/layers_hover.png'))
47 ICON_TEMPLATES_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('templates/templates_display.png'))
48 ICON_TEMPLATES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('templates/templates_hover.png'))
49 ICON_IMAGES_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('images/images_display.png')) 47 ICON_IMAGES_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('images/images_display.png'))
50 ICON_IMAGES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('images/images_hover.png')) 48 ICON_IMAGES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('images/images_hover.png'))
51 ICON_SETTINGS_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('settings/settings_display.png')) 49 ICON_SETTINGS_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('settings/settings_display.png'))
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 956f5ced84..615b5445cb 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -55,12 +55,6 @@ class ImageConfigurationPage (HobPage):
55 self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL) 55 self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
56 self.toolbar.set_style(gtk.TOOLBAR_BOTH) 56 self.toolbar.set_style(gtk.TOOLBAR_BOTH)
57 57
58 template_button = self.append_toolbar_button(self.toolbar,
59 "Templates",
60 hic.ICON_TEMPLATES_DISPLAY_FILE,
61 hic.ICON_TEMPLATES_HOVER_FILE,
62 "Load a previously saved template",
63 self.template_button_clicked_cb)
64 my_images_button = self.append_toolbar_button(self.toolbar, 58 my_images_button = self.append_toolbar_button(self.toolbar,
65 "Images", 59 "Images",
66 hic.ICON_IMAGES_DISPLAY_FILE, 60 hic.ICON_IMAGES_DISPLAY_FILE,
@@ -494,13 +488,6 @@ class ImageConfigurationPage (HobPage):
494 self.builder.configuration.initial_selected_image = self.builder.configuration.selected_image 488 self.builder.configuration.initial_selected_image = self.builder.configuration.selected_image
495 self.builder.show_recipes() 489 self.builder.show_recipes()
496 490
497 def template_button_clicked_cb(self, button):
498 response, path = self.builder.show_load_template_dialog()
499 if not response:
500 return
501 if path:
502 self.builder.load_template(path)
503
504 def my_images_button_clicked_cb(self, button): 491 def my_images_button_clicked_cb(self, button):
505 self.builder.show_load_my_images_dialog() 492 self.builder.show_load_my_images_dialog()
506 493
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
index 1b60aa8ed5..d5864136aa 100755
--- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
@@ -197,12 +197,6 @@ class ImageDetailsPage (HobPage):
197 self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL) 197 self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
198 self.toolbar.set_style(gtk.TOOLBAR_BOTH) 198 self.toolbar.set_style(gtk.TOOLBAR_BOTH)
199 199
200 template_button = self.append_toolbar_button(self.toolbar,
201 "Templates",
202 hic.ICON_TEMPLATES_DISPLAY_FILE,
203 hic.ICON_TEMPLATES_HOVER_FILE,
204 "Load a previously saved template",
205 self.template_button_clicked_cb)
206 my_images_button = self.append_toolbar_button(self.toolbar, 200 my_images_button = self.append_toolbar_button(self.toolbar,
207 "Images", 201 "Images",
208 hic.ICON_IMAGES_DISPLAY_FILE, 202 hic.ICON_IMAGES_DISPLAY_FILE,
@@ -265,11 +259,7 @@ class ImageDetailsPage (HobPage):
265 self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color) 259 self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
266 self.box_group_area.pack_start(self.build_result, expand=False, fill=False) 260 self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
267 261
268 # create the buttons at the bottom first because the buttons are used in apply_button_per_image() 262 self.buttonlist = ["Build new image", "Run image", "Deploy image"]
269 if self.build_succeeded:
270 self.buttonlist = ["Build new image", "Save as template", "Run image", "Deploy image"]
271 else: # get to this page from "My images"
272 self.buttonlist = ["Build new image", "Run image", "Deploy image"]
273 263
274 # Name 264 # Name
275 self.image_store = [] 265 self.image_store = []
@@ -582,26 +572,6 @@ class ImageDetailsPage (HobPage):
582 created = True 572 created = True
583 is_runnable = True 573 is_runnable = True
584 574
585 name = "Save as template"
586 if name in buttonlist:
587 if created == True:
588 # separator
589 #label = gtk.Label(" or ")
590 #self.details_bottom_buttons.pack_end(label, expand=False, fill=False)
591
592 # create button "Save as template"
593 save_button = HobAltButton("Save as template")
594 else:
595 save_button = HobButton("Save as template")
596 #save_button.set_size_request(205, 49)
597 save_button.set_flags(gtk.CAN_DEFAULT)
598 packed = True
599 save_button.set_tooltip_text("Save the image configuration for reuse")
600 button_id = save_button.connect("clicked", self.save_button_clicked_cb)
601 self.button_ids[button_id] = save_button
602 self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False)
603 create = True
604
605 name = "Build new image" 575 name = "Build new image"
606 if name in buttonlist: 576 if name in buttonlist:
607 # create button "Build new image" 577 # create button "Build new image"
@@ -618,9 +588,6 @@ class ImageDetailsPage (HobPage):
618 588
619 return is_runnable 589 return is_runnable
620 590
621 def save_button_clicked_cb(self, button):
622 self.builder.show_save_template_dialog()
623
624 def deploy_button_clicked_cb(self, button): 591 def deploy_button_clicked_cb(self, button):
625 if self.toggled_image: 592 if self.toggled_image:
626 if self.num_toggled > 1: 593 if self.num_toggled > 1:
@@ -648,13 +615,6 @@ class ImageDetailsPage (HobPage):
648 def edit_packages_button_clicked_cb(self, button): 615 def edit_packages_button_clicked_cb(self, button):
649 self.builder.show_packages(ask=False) 616 self.builder.show_packages(ask=False)
650 617
651 def template_button_clicked_cb(self, button):
652 response, path = self.builder.show_load_template_dialog()
653 if not response:
654 return
655 if path:
656 self.builder.load_template(path)
657
658 def my_images_button_clicked_cb(self, button): 618 def my_images_button_clicked_cb(self, button):
659 self.builder.show_load_my_images_dialog() 619 self.builder.show_load_my_images_dialog()
660 620