summaryrefslogtreecommitdiffstats
path: root/bitbake
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
parente36994f69a6780e4eb858262f16732d714c922f0 (diff)
downloadpoky-07803d58e0d33d54dfd3913eea6b050b726edd3c.tar.gz
poky-07803d58e0d33d54dfd3913eea6b050b726edd3c.tar.bz2
poky-07803d58e0d33d54dfd3913eea6b050b726edd3c.zip
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')
-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):
self.update_config_async()
dialog.destroy()
- def show_load_template_dialog(self):
- dialog = gtk.FileChooserDialog("Load Template Files", self,
- gtk.FILE_CHOOSER_ACTION_OPEN)
- button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
- HobAltButton.style_button(button)
- button = dialog.add_button("Open", gtk.RESPONSE_YES)
- HobButton.style_button(button)
- filter = gtk.FileFilter()
- filter.set_name("Hob Files")
- filter.add_pattern("*.hob")
- dialog.add_filter(filter)
-
- response = dialog.run()
- path = None
- if response == gtk.RESPONSE_YES:
- path = dialog.get_filename()
- dialog.destroy()
- return response == gtk.RESPONSE_YES, path
-
- def show_save_template_dialog(self):
- dialog = gtk.FileChooserDialog("Save Template Files", self,
- gtk.FILE_CHOOSER_ACTION_SAVE)
- button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
- HobAltButton.style_button(button)
- button = dialog.add_button("Save", gtk.RESPONSE_YES)
- HobButton.style_button(button)
- dialog.set_current_name("hob")
- response = dialog.run()
- if response == gtk.RESPONSE_YES:
- path = dialog.get_filename()
- self.save_template(path)
- dialog.destroy()
-
def get_image_extension(self):
image_extension = {}
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:
ICON_PACKAGES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('packages/packages_hover.png'))
ICON_LAYERS_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('layers/layers_display.png'))
ICON_LAYERS_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('layers/layers_hover.png'))
- ICON_TEMPLATES_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('templates/templates_display.png'))
- ICON_TEMPLATES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('templates/templates_hover.png'))
ICON_IMAGES_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('images/images_display.png'))
ICON_IMAGES_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('images/images_hover.png'))
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):
self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
self.toolbar.set_style(gtk.TOOLBAR_BOTH)
- template_button = self.append_toolbar_button(self.toolbar,
- "Templates",
- hic.ICON_TEMPLATES_DISPLAY_FILE,
- hic.ICON_TEMPLATES_HOVER_FILE,
- "Load a previously saved template",
- self.template_button_clicked_cb)
my_images_button = self.append_toolbar_button(self.toolbar,
"Images",
hic.ICON_IMAGES_DISPLAY_FILE,
@@ -494,13 +488,6 @@ class ImageConfigurationPage (HobPage):
self.builder.configuration.initial_selected_image = self.builder.configuration.selected_image
self.builder.show_recipes()
- def template_button_clicked_cb(self, button):
- response, path = self.builder.show_load_template_dialog()
- if not response:
- return
- if path:
- self.builder.load_template(path)
-
def my_images_button_clicked_cb(self, button):
self.builder.show_load_my_images_dialog()
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):
self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
self.toolbar.set_style(gtk.TOOLBAR_BOTH)
- template_button = self.append_toolbar_button(self.toolbar,
- "Templates",
- hic.ICON_TEMPLATES_DISPLAY_FILE,
- hic.ICON_TEMPLATES_HOVER_FILE,
- "Load a previously saved template",
- self.template_button_clicked_cb)
my_images_button = self.append_toolbar_button(self.toolbar,
"Images",
hic.ICON_IMAGES_DISPLAY_FILE,
@@ -265,11 +259,7 @@ class ImageDetailsPage (HobPage):
self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
- # create the buttons at the bottom first because the buttons are used in apply_button_per_image()
- if self.build_succeeded:
- self.buttonlist = ["Build new image", "Save as template", "Run image", "Deploy image"]
- else: # get to this page from "My images"
- self.buttonlist = ["Build new image", "Run image", "Deploy image"]
+ self.buttonlist = ["Build new image", "Run image", "Deploy image"]
# Name
self.image_store = []
@@ -582,26 +572,6 @@ class ImageDetailsPage (HobPage):
created = True
is_runnable = True
- name = "Save as template"
- if name in buttonlist:
- if created == True:
- # separator
- #label = gtk.Label(" or ")
- #self.details_bottom_buttons.pack_end(label, expand=False, fill=False)
-
- # create button "Save as template"
- save_button = HobAltButton("Save as template")
- else:
- save_button = HobButton("Save as template")
- #save_button.set_size_request(205, 49)
- save_button.set_flags(gtk.CAN_DEFAULT)
- packed = True
- save_button.set_tooltip_text("Save the image configuration for reuse")
- button_id = save_button.connect("clicked", self.save_button_clicked_cb)
- self.button_ids[button_id] = save_button
- self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False)
- create = True
-
name = "Build new image"
if name in buttonlist:
# create button "Build new image"
@@ -618,9 +588,6 @@ class ImageDetailsPage (HobPage):
return is_runnable
- def save_button_clicked_cb(self, button):
- self.builder.show_save_template_dialog()
-
def deploy_button_clicked_cb(self, button):
if self.toggled_image:
if self.num_toggled > 1:
@@ -648,13 +615,6 @@ class ImageDetailsPage (HobPage):
def edit_packages_button_clicked_cb(self, button):
self.builder.show_packages(ask=False)
- def template_button_clicked_cb(self, button):
- response, path = self.builder.show_load_template_dialog()
- if not response:
- return
- if path:
- self.builder.load_template(path)
-
def my_images_button_clicked_cb(self, button):
self.builder.show_load_my_images_dialog()