Patchwork [bitbake-devel,05/11] Hob: Remove the reset button in recipe/package selection page

login
register
mail settings
Submitter Dongxiao Xu
Date March 14, 2012, 9:26 a.m.
Message ID <c86fa48517606d647dea901f803d3b22ff334c9f.1331716896.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/23307/
State Accepted
Commit f576355686804631fd797e2a5d383a70f6fc42cd
Headers show

Comments

Dongxiao Xu - March 14, 2012, 9:26 a.m.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builder.py              |    6 ------
 lib/bb/ui/crumbs/packageselectionpage.py |   11 -----------
 lib/bb/ui/crumbs/recipeselectionpage.py  |    9 ---------
 3 files changed, 0 insertions(+), 26 deletions(-)
Joshua Lock - March 14, 2012, 7:37 p.m.
On 14/03/12 02:26, Dongxiao Xu wrote:
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>

Signed-off-by: Joshua Lock <josh@linux.intel.com>

> ---
>   lib/bb/ui/crumbs/builder.py              |    6 ------
>   lib/bb/ui/crumbs/packageselectionpage.py |   11 -----------
>   lib/bb/ui/crumbs/recipeselectionpage.py  |    9 ---------
>   3 files changed, 0 insertions(+), 26 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index a905030..f9844de 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -361,12 +361,6 @@ class Builder(gtk.Window):
>           self.handler.set_extra_config(self.configuration.extra_setting)
>           self.handler.set_extra_inherit("packageinfo")
>
> -    def reset_recipe_model(self):
> -        self.recipe_model.reset()
> -
> -    def reset_package_model(self):
> -        self.package_model.reset()
> -
>       def update_recipe_model(self, selected_image, selected_recipes):
>           self.recipe_model.set_selected_image(selected_image)
>           self.recipe_model.set_selected_recipes(selected_recipes)
> diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
> index a8628ac..0427fe2 100755
> --- a/lib/bb/ui/crumbs/packageselectionpage.py
> +++ b/lib/bb/ui/crumbs/packageselectionpage.py
> @@ -118,12 +118,6 @@ class PackageSelectionPage (HobPage):
>               if self.pages[i]['name'] == "Included":
>                   tab.connect("row-activated", self.tree_row_activated_cb)
>
> -            reset_button = gtk.Button("Reset")
> -            reset_button.connect("clicked", self.reset_clicked_cb)
> -            hbox = gtk.HBox(False, 5)
> -            hbox.pack_end(reset_button, expand=False, fill=False)
> -            tab.pack_start(hbox, expand=False, fill=False)
> -
>               label = gtk.Label(self.pages[i]['name'])
>               self.ins.append_page(tab, label)
>               self.tables.append(tab)
> @@ -206,11 +200,6 @@ class PackageSelectionPage (HobPage):
>               size_str = str(size) + ' KB'
>           return size_str
>
> -    # Callback functions
> -    def reset_clicked_cb(self, button):
> -        self.package_model.reset()
> -        self.builder.reset_package_model()
> -
>       def toggle_item_idle_cb(self, path):
>           if not self.package_model.path_included(path):
>               self.package_model.include_item(item_path=path, binb="User Selected")
> diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
> index aea9c0c..234734c 100755
> --- a/lib/bb/ui/crumbs/recipeselectionpage.py
> +++ b/lib/bb/ui/crumbs/recipeselectionpage.py
> @@ -141,11 +141,6 @@ class RecipeSelectionPage (HobPage):
>               tab.connect("toggled", self.table_toggled_cb)
>               if self.pages[i]['name'] == "Included":
>                   tab.connect("row-activated", self.tree_row_activated_cb)
> -            reset_button = gtk.Button("Reset")
> -            reset_button.connect("clicked", self.reset_clicked_cb)
> -            hbox = gtk.HBox(False, 5)
> -            hbox.pack_end(reset_button, expand=False, fill=False)
> -            tab.pack_start(hbox, expand=False, fill=False)
>
>               label = gtk.Label(self.pages[i]['name'])
>               self.ins.append_page(tab, label)
> @@ -201,10 +196,6 @@ class RecipeSelectionPage (HobPage):
>           self.label.set_text("Recipes included: %s" % len(self.builder.configuration.selected_recipes))
>           self.ins.show_indicator_icon("Included", len(self.builder.configuration.selected_recipes))
>
> -    # Callback functions
> -    def reset_clicked_cb(self, button):
> -        self.builder.reset_recipe_model()
> -
>       def toggle_item_idle_cb(self, path):
>           if not self.recipe_model.path_included(path):
>               self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)

Patch

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index a905030..f9844de 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -361,12 +361,6 @@  class Builder(gtk.Window):
         self.handler.set_extra_config(self.configuration.extra_setting)
         self.handler.set_extra_inherit("packageinfo")
 
-    def reset_recipe_model(self):
-        self.recipe_model.reset()
-
-    def reset_package_model(self):
-        self.package_model.reset()
-
     def update_recipe_model(self, selected_image, selected_recipes):
         self.recipe_model.set_selected_image(selected_image)
         self.recipe_model.set_selected_recipes(selected_recipes)
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index a8628ac..0427fe2 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -118,12 +118,6 @@  class PackageSelectionPage (HobPage):
             if self.pages[i]['name'] == "Included":
                 tab.connect("row-activated", self.tree_row_activated_cb)
 
-            reset_button = gtk.Button("Reset")
-            reset_button.connect("clicked", self.reset_clicked_cb)
-            hbox = gtk.HBox(False, 5)
-            hbox.pack_end(reset_button, expand=False, fill=False)
-            tab.pack_start(hbox, expand=False, fill=False)
-
             label = gtk.Label(self.pages[i]['name'])
             self.ins.append_page(tab, label)
             self.tables.append(tab)
@@ -206,11 +200,6 @@  class PackageSelectionPage (HobPage):
             size_str = str(size) + ' KB'
         return size_str
 
-    # Callback functions
-    def reset_clicked_cb(self, button):
-        self.package_model.reset()
-        self.builder.reset_package_model()
-
     def toggle_item_idle_cb(self, path):
         if not self.package_model.path_included(path):
             self.package_model.include_item(item_path=path, binb="User Selected")
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index aea9c0c..234734c 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -141,11 +141,6 @@  class RecipeSelectionPage (HobPage):
             tab.connect("toggled", self.table_toggled_cb)
             if self.pages[i]['name'] == "Included":
                 tab.connect("row-activated", self.tree_row_activated_cb)
-            reset_button = gtk.Button("Reset")
-            reset_button.connect("clicked", self.reset_clicked_cb)
-            hbox = gtk.HBox(False, 5)
-            hbox.pack_end(reset_button, expand=False, fill=False)
-            tab.pack_start(hbox, expand=False, fill=False)
 
             label = gtk.Label(self.pages[i]['name'])
             self.ins.append_page(tab, label)
@@ -201,10 +196,6 @@  class RecipeSelectionPage (HobPage):
         self.label.set_text("Recipes included: %s" % len(self.builder.configuration.selected_recipes))
         self.ins.show_indicator_icon("Included", len(self.builder.configuration.selected_recipes))
 
-    # Callback functions
-    def reset_clicked_cb(self, button):
-        self.builder.reset_recipe_model()
-
     def toggle_item_idle_cb(self, path):
         if not self.recipe_model.path_included(path):
             self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)