All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Hob GUI tweaks and bugfixes
@ 2011-07-23  4:54 Joshua Lock
  2011-07-23  4:54 ` [PATCH 1/8] hob: refer to tasks as Package Collections Joshua Lock
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

This series contains largely cosmetic and purely GUI related changes to
address some bugs filed against Hob and a few other GUI tweaks.

The following changes since commit abc67ed6921c98ed581f101ec1acc589fd9ce7e9:

  bitbake/utils: Add contains helper function from lib.oe.utils (2011-07-22 12:11:01 +0100)

are available in the git repository at:
  git://github.com/incandescant/bitbake hob
  https://github.com/incandescant/bitbake/tree/hob

Joshua Lock (8):
  hob: refer to tasks as Package Collections
  ui/crumbs/tasklistmodel: don't show native and cross recipes
  ui/hob: clear the search entry when resetting
  ui/hob: if the user clicks Stop a second time only offer 'Force Stop'
  hob: only add new layer's to the UI
  ui/crumbs/hobprefs: set higher arbitrary limit on threads &
    parallelism
  ui/crumbs/hobprefs: tweak the package format tooltip
  hob: rework image output type setting

 lib/bb/ui/crumbs/configurator.py    |   10 ++++--
 lib/bb/ui/crumbs/hobeventhandler.py |   21 +++++++++++-
 lib/bb/ui/crumbs/hobprefs.py        |   60 ++++++++++++++++++++++-------------
 lib/bb/ui/crumbs/layereditor.py     |    5 ++-
 lib/bb/ui/crumbs/tasklistmodel.py   |    3 ++
 lib/bb/ui/hob.py                    |   58 +++++++++++++++++++++------------
 6 files changed, 107 insertions(+), 50 deletions(-)

-- 
1.7.6




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] hob: refer to tasks as Package Collections
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 2/8] ui/crumbs/tasklistmodel: don't show native and cross recipes Joshua Lock
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 2df344f..b60ca2f 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -602,7 +602,7 @@ class MainWindow (gtk.Window):
         self.tasks_tree.set_search_column(0)
         self.tasks_tree.get_selection().set_mode(gtk.SELECTION_SINGLE)
 
-        col = gtk.TreeViewColumn('Package')
+        col = gtk.TreeViewColumn('Package Collection')
         col.set_min_width(430)
         col1 = gtk.TreeViewColumn('Description')
         col1.set_min_width(430)
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/8] ui/crumbs/tasklistmodel: don't show native and cross recipes
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
  2011-07-23  4:54 ` [PATCH 1/8] hob: refer to tasks as Package Collections Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 3/8] ui/hob: clear the search entry when resetting Joshua Lock
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

Addresses [YOCTO #1224]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/tasklistmodel.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 112fdde..f4dffc6 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -185,6 +185,9 @@ class TaskListModel(gtk.ListStore):
         if model.get_value(it, self.COL_TYPE) != 'package':
             return False
         else:
+            name = model.get_value(it, self.COL_NAME)
+            if name.count('-native') or name.count('cross'):
+                return False
             return True
 
     """
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/8] ui/hob: clear the search entry when resetting
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
  2011-07-23  4:54 ` [PATCH 1/8] hob: refer to tasks as Package Collections Joshua Lock
  2011-07-23  4:54 ` [PATCH 2/8] ui/crumbs/tasklistmodel: don't show native and cross recipes Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 4/8] ui/hob: if the user clicks Stop a second time only offer 'Force Stop' Joshua Lock
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

When resetting and clearing all selections the searched for term is no
longer the selected row in the packages list, clear the search entry to
prevent cognitive disconnect.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index b60ca2f..a8bbd73 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -282,6 +282,7 @@ class MainWindow (gtk.Window):
         dialog.destroy()
         if response == gtk.RESPONSE_OK:
             self.reset_build()
+            self.search.set_text("")
         return
 
     def reset_build(self):
@@ -576,12 +577,12 @@ class MainWindow (gtk.Window):
 
         hb = gtk.HBox(False, 0)
         hb.show()
-        search = gtk.Entry()
-        search.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, "gtk-clear")
-        search.connect("icon-release", self.search_entry_clear_cb)
-        search.show()
-        self.pkgsaz_tree.set_search_entry(search)
-        hb.pack_end(search, False, False, 0)
+        self.search = gtk.Entry()
+        self.search.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, "gtk-clear")
+        self.search.connect("icon-release", self.search_entry_clear_cb)
+        self.search.show()
+        self.pkgsaz_tree.set_search_entry(self.search)
+        hb.pack_end(self.search, False, False, 0)
         label = gtk.Label("Search packages:")
         label.show()
         hb.pack_end(label, False, False, 6)
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/8] ui/hob: if the user clicks Stop a second time only offer 'Force Stop'
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
                   ` (2 preceding siblings ...)
  2011-07-23  4:54 ` [PATCH 3/8] ui/hob: clear the search entry when resetting Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 5/8] hob: only add new layer's to the UI Joshua Lock
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

Fixes [YOCTO #1264]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |   38 ++++++++++++++++++++++++++------------
 1 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index a8bbd73..8e3e7bc 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -46,6 +46,7 @@ class MainWindow (gtk.Window):
         self.files_to_clean = []
         self.selected_image = None
         self.selected_packages = None
+        self.stopping = False
 
         self.model = taskmodel
         self.model.connect("tasklist-populated", self.update_model)
@@ -403,6 +404,7 @@ class MainWindow (gtk.Window):
         self.nb.set_current_page(0)
 
     def build_complete_cb(self, running_build):
+        self.stopping = False
         self.back.connect("clicked", self.back_button_clicked_cb)
         self.back.set_sensitive(True)
         self.cancel.set_sensitive(False)
@@ -651,20 +653,32 @@ class MainWindow (gtk.Window):
         return vbox
 
     def cancel_build(self, button):
-        lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this build?\n"
-        lbl = lbl + "'Force Stop' will stop the build as quickly as"
-        lbl = lbl + " possible but may well leave your build directory in an"
-        lbl = lbl + " unusable state that requires manual steps to fix.\n"
-        lbl = lbl + "'Stop' will stop the build as soon as all in"
-        lbl = lbl + " progress build tasks are finished. However if a"
-        lbl = lbl + " lengthy compilation phase is in progress this may take"
-        lbl = lbl + " some time."
-        dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
-        dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
-        dialog.add_button("Stop", gtk.RESPONSE_OK)
-        dialog.add_button("Force Stop", gtk.RESPONSE_YES)
+        if self.stopping:
+            lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
+            lbl = lbl + " would you like to 'Force Stop' the build?\n\n"
+            lbl = lbl + "This will stop the build as quickly as possible but may"
+            lbl = lbl + " well leave your build directory in an  unusable state"
+            lbl = lbl + " that requires manual steps to fix.\n"
+            dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+            dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
+            dialog.add_button("Force Stop", gtk.RESPONSE_YES)
+        else:
+            lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this"
+            lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as"
+            lbl = lbl + " possible but may well leave your build directory in an"
+            lbl = lbl + " unusable state that requires manual steps to fix.\n\n"
+            lbl = lbl + "'Stop' will stop the build as soon as all in"
+            lbl = lbl + " progress build tasks are finished. However if a"
+            lbl = lbl + " lengthy compilation phase is in progress this may take"
+            lbl = lbl + " some time."
+            dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+            dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
+            dialog.add_button("Stop", gtk.RESPONSE_OK)
+            dialog.add_button("Force Stop", gtk.RESPONSE_YES)
         response = dialog.run()
         dialog.destroy()
+        if response != gtk.RESPONSE_CANCEL:
+            self.stopping = True
         if response == gtk.RESPONSE_OK:
             self.handler.cancel_build()
         elif response == gtk.RESPONSE_YES:
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/8] hob: only add new layer's to the UI
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
                   ` (3 preceding siblings ...)
  2011-07-23  4:54 ` [PATCH 4/8] ui/hob: if the user clicks Stop a second time only offer 'Force Stop' Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 6/8] ui/crumbs/hobprefs: set higher arbitrary limit on threads & parallelism Joshua Lock
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

If a user added the same layer more than once the underlying bblayers.conf
file would not have multiple entries but the UI would show an entry for
the layer for each time it was added. This patch changes the Configurator
to return None values if the layer wasn't added to bblayers.conf and the
LayerEditor to only update the UI if non-None values are returned.

Fixes [YOCTO #1275]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/configurator.py |    4 +++-
 lib/bb/ui/crumbs/layereditor.py  |    5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/bb/ui/crumbs/configurator.py b/lib/bb/ui/crumbs/configurator.py
index 5511799..e7c524a 100644
--- a/lib/bb/ui/crumbs/configurator.py
+++ b/lib/bb/ui/crumbs/configurator.py
@@ -139,7 +139,9 @@ class Configurator(gobject.GObject):
         name = self._getLayerName(layerpath)
         if name not in self.enabled_layers:
             self.addLayer(name, layerpath)
-        return name, layerpath
+            return name, layerpath
+        else:
+            return None, None
 
     def addLayer(self, name, path):
         self.enabled_layers[name] = path
diff --git a/lib/bb/ui/crumbs/layereditor.py b/lib/bb/ui/crumbs/layereditor.py
index 76a2eb5..7c581d6 100644
--- a/lib/bb/ui/crumbs/layereditor.py
+++ b/lib/bb/ui/crumbs/layereditor.py
@@ -132,5 +132,6 @@ class LayerEditor(gtk.Dialog):
             # FIXME: verify we've actually got a layer conf?
             if path.endswith(".conf"):
                 name, layerpath = self.configurator.addLayerConf(path)
-                self.newly_added[name] = layerpath
-                self.layer_store.append([name, layerpath, True])
+                if name:
+                    self.newly_added[name] = layerpath
+                    self.layer_store.append([name, layerpath, True])
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/8] ui/crumbs/hobprefs: set higher arbitrary limit on threads & parallelism
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
                   ` (4 preceding siblings ...)
  2011-07-23  4:54 ` [PATCH 5/8] hob: only add new layer's to the UI Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 7/8] ui/crumbs/hobprefs: tweak the package format tooltip Joshua Lock
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

We don't have a good handle on a sane cap value so just set it to an
arbitrary, but reasonably high, number. Once we have some more numbers on
values for number of threads and make parallelism we can integrate the
algorithm into the GUI.

Addresses [YOCTO #1266]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobprefs.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobprefs.py b/lib/bb/ui/crumbs/hobprefs.py
index 779c14a..e01a266 100644
--- a/lib/bb/ui/crumbs/hobprefs.py
+++ b/lib/bb/ui/crumbs/hobprefs.py
@@ -243,7 +243,12 @@ class HobPrefs(gtk.Dialog):
         pbox.pack_start(hbox, expand=False, fill=False, padding=6)
         label = gtk.Label("BitBake threads:")
         label.show()
-        spin_max = 9 #self.cpu_cnt * 3
+        # NOTE: may be a good idea in future to intelligently cap the maximum
+        # values but we need more data to make an educated decision, for now
+        # set a high maximum as a value for upper bounds is required by the
+        # gtk.Adjustment
+        spin_max = 30 # seems like a high enough arbitrary number
+        #spin_max = self.cpu_cnt * 3
         hbox.pack_start(label, expand=False, fill=False, padding=6)
         bbadj = gtk.Adjustment(value=self.bbthread, lower=1, upper=spin_max, step_incr=1)
         bbspinner = gtk.SpinButton(adjustment=bbadj, climb_rate=1, digits=0)
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/8] ui/crumbs/hobprefs: tweak the package format tooltip
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
                   ` (5 preceding siblings ...)
  2011-07-23  4:54 ` [PATCH 6/8] ui/crumbs/hobprefs: set higher arbitrary limit on threads & parallelism Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-23  4:54 ` [PATCH 8/8] hob: rework image output type setting Joshua Lock
  2011-07-25 11:36 ` [PATCH 0/8] Hob GUI tweaks and bugfixes Richard Purdie
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobprefs.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobprefs.py b/lib/bb/ui/crumbs/hobprefs.py
index e01a266..ab2f0d8 100644
--- a/lib/bb/ui/crumbs/hobprefs.py
+++ b/lib/bb/ui/crumbs/hobprefs.py
@@ -210,7 +210,8 @@ class HobPrefs(gtk.Dialog):
         label.show()
         hbox.pack_start(label, expand=False, fill=False, padding=6)
         self.package_combo = gtk.combo_box_new_text()
-        self.package_combo.set_tooltip_text("Select the package format you would like to use in your image")
+        self.package_combo.set_tooltip_text("""The package format is that used in creation
+ of the root filesystem and also dictates the package manager used in your image""")
         self.package_combo.show()
         hbox.pack_start(self.package_combo, expand=False, fill=False, padding=6)
         # Image output type selector
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/8] hob: rework image output type setting
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
                   ` (6 preceding siblings ...)
  2011-07-23  4:54 ` [PATCH 7/8] ui/crumbs/hobprefs: tweak the package format tooltip Joshua Lock
@ 2011-07-23  4:54 ` Joshua Lock
  2011-07-25 11:36 ` [PATCH 0/8] Hob GUI tweaks and bugfixes Richard Purdie
  8 siblings, 0 replies; 10+ messages in thread
From: Joshua Lock @ 2011-07-23  4:54 UTC (permalink / raw)
  To: bitbake-devel

The preferences UI to set the image output type only supported setting a
single value whereas it's common practice, particularly for those making
use of the ADT, to set multiple values. This is also the default in Poky.

This reworked preferences UI dynamically generates check boxes for each
available image type and sets an appropriate string representing all image
types when checkboxes are toggled.

Includes fixes for [YOCTO #1273]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/configurator.py    |    6 +++-
 lib/bb/ui/crumbs/hobeventhandler.py |   21 +++++++++++++-
 lib/bb/ui/crumbs/hobprefs.py        |   50 +++++++++++++++++++++--------------
 lib/bb/ui/hob.py                    |    5 ++-
 4 files changed, 56 insertions(+), 26 deletions(-)

diff --git a/lib/bb/ui/crumbs/configurator.py b/lib/bb/ui/crumbs/configurator.py
index e7c524a..6481608 100644
--- a/lib/bb/ui/crumbs/configurator.py
+++ b/lib/bb/ui/crumbs/configurator.py
@@ -90,12 +90,14 @@ class Configurator(gobject.GObject):
         pclass = getString('PACKAGE_CLASSES')
         if pclass and pclass != self.config.get('PACKAGE_CLASSES', ''):
             self.config['PACKAGE_CLASSES'] = pclass
+        fstypes = getString('IMAGE_FSTYPES')
+        if fstypes and fstypes != self.config.get('IMAGE_FSTYPES', ''):
+            self.config['IMAGE_FSTYPES'] = fstypes
 
         self.orig_config = copy.deepcopy(self.config)
 
     def setLocalConfVar(self, var, val):
-        if var in self.config:
-            self.config[var] = val
+        self.config[var] = val
 
     def _loadLayerConf(self, path):
         self.bblayers = path
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index fa79e0c..2f45350 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -74,6 +74,8 @@ class HobHandler(gobject.GObject):
         self.model = taskmodel
         self.server = server
 
+        self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
+
         self.command_map = {
             "findConfigFilePathLocal" : ("findConfigFilePath", ["hob.local.conf"], "findConfigFilePathHobLocal"),
             "findConfigFilePathHobLocal" : ("findConfigFilePath", ["bblayers.conf"], "findConfigFilePathLayers"),
@@ -258,8 +260,23 @@ class HobHandler(gobject.GObject):
             self.building = None
             self.emit("build-complete")
 
-    def set_image_output_type(self, output_type):
-        self.server.runCommand(["setVariable", "IMAGE_FSTYPES", output_type])
+    def set_fstypes(self, fstypes):
+        self.server.runCommand(["setVariable", "IMAGE_FSTYPES", fstypes])
+
+    def add_image_output_type(self, output_type):
+        if output_type not in self.image_output_types:
+            self.image_output_types.append(output_type)
+            fstypes = " ".join(self.image_output_types)
+            self.set_fstypes(fstypes)
+        return fstypes
+
+    def remove_image_output_type(self, output_type):
+        if output_type in self.image_output_types:
+            ind = self.image_output_types.index(output_type)
+            self.image_output_types.pop(ind)
+            fstypes = " ".join(self.image_output_types)
+            self.set_fstypes(fstypes)
+        return fstypes
 
     def get_image_deploy_dir(self):
         return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"])
diff --git a/lib/bb/ui/crumbs/hobprefs.py b/lib/bb/ui/crumbs/hobprefs.py
index ab2f0d8..1e6c78b 100644
--- a/lib/bb/ui/crumbs/hobprefs.py
+++ b/lib/bb/ui/crumbs/hobprefs.py
@@ -30,11 +30,15 @@ class HobPrefs(gtk.Dialog):
         if model:
             model.clear()
 
-    def output_type_changed_cb(self, combo, handler):
-        ot = combo.get_active_text()
-        if ot != self.curr_output_type:
-            self.curr_output_type = ot
-            handler.set_image_output_type(ot)
+    def output_type_toggled_cb(self, check, handler):
+        ot = check.get_label()
+        enabled = check.get_active()
+        if enabled:
+            self.selected_image_types = handler.add_image_output_type(ot)
+        else:
+            self.selected_image_types = handler.remove_image_output_type(ot)
+
+        self.configurator.setLocalConfVar('IMAGE_FSTYPES', "%s" % self.selected_image_types)
 
     def sdk_machine_combo_changed_cb(self, combo, handler):
         sdk_mach = combo.get_active_text()
@@ -144,7 +148,7 @@ class HobPrefs(gtk.Dialog):
             glib.idle_add(self.handler.reload_data)
 
     def __init__(self, configurator, handler, curr_sdk_mach, curr_distro, pclass,
-                 cpu_cnt, pmake, bbthread, image_types):
+                 cpu_cnt, pmake, bbthread, selected_image_types, all_image_types):
         """
         """
         gtk.Dialog.__init__(self, "Preferences", None,
@@ -162,7 +166,6 @@ class HobPrefs(gtk.Dialog):
         self.curr_sdk_mach = curr_sdk_mach
         self.curr_distro = curr_distro
         self.curr_package_format = pclass
-        self.curr_output_type = None
         self.cpu_cnt = cpu_cnt
         self.pmake = pmake
         self.bbthread = bbthread
@@ -170,6 +173,7 @@ class HobPrefs(gtk.Dialog):
         self.distro_handler_id = None
         self.sdk_machine_handler_id = None
         self.package_handler_id = None
+        self.selected_image_types = selected_image_types.split(" ")
 
         left = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
         right = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
@@ -214,19 +218,25 @@ class HobPrefs(gtk.Dialog):
  of the root filesystem and also dictates the package manager used in your image""")
         self.package_combo.show()
         hbox.pack_start(self.package_combo, expand=False, fill=False, padding=6)
-        # Image output type selector
-        label = gtk.Label("Image output type:")
-        label.show()
-        hbox.pack_start(label, expand=False, fill=False, padding=6)
-        output_combo = gtk.combo_box_new_text()
-        if image_types:
-            for it in image_types.split(" "):
-                output_combo.append_text(it)
-            output_combo.connect("changed", self.output_type_changed_cb, handler)
-        else:
-            output_combo.set_sensitive(False)
-        output_combo.show()
-        hbox.pack_start(output_combo)
+        if all_image_types:
+            # Image output type selector
+            label = gtk.Label("Image output types:")
+            label.show()
+            hbox.pack_start(label, expand=False, fill=False, padding=6)
+            chk_cnt = 3
+            for it in all_image_types.split(" "):
+                chk_cnt = chk_cnt + 1
+                if chk_cnt % 6 == 0:
+                    hbox = gtk.HBox(False, 12)
+                    hbox.show()
+                    pbox.pack_start(hbox, expand=False, fill=False, padding=6)
+                chk = gtk.CheckButton(it)
+                if it in self.selected_image_types:
+                    chk.set_active(True)
+                chk.set_tooltip_text("Build an %s image" % it)
+                chk.connect("toggled", self.output_type_toggled_cb, handler)
+                chk.show()
+                hbox.pack_start(chk, expand=False, fill=False, padding=3)
         # BitBake
         label = gtk.Label()
         label.set_markup("<b>BitBake</b>")
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 8e3e7bc..09a63c6 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -900,7 +900,8 @@ def main (server, eventHandler):
         # up to and including the space
         pmake = int(pmake.lstrip("-j "))
 
-    image_types = server.runCommand(["getVariable", "IMAGE_TYPES"])
+    selected_image_types = server.runCommand(["getVariable", "IMAGE_FSTYPES"])
+    all_image_types = server.runCommand(["getVariable", "IMAGE_TYPES"])
 
     pclasses = server.runCommand(["getVariable", "PACKAGE_CLASSES"]).split(" ")
     # NOTE: we're only supporting one value for PACKAGE_CLASSES being set
@@ -909,7 +910,7 @@ def main (server, eventHandler):
     pkg, sep, pclass = pclasses[0].rpartition("_")
 
     prefs = HobPrefs(configurator, handler, sdk_mach, distro, pclass, cpu_cnt,
-                     pmake, bbthread, image_types)
+                     pmake, bbthread, selected_image_types, all_image_types)
     layers = LayerEditor(configurator, None)
     window = MainWindow(taskmodel, handler, configurator, prefs, layers, mach)
     prefs.set_parent_window(window)
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/8] Hob GUI tweaks and bugfixes
  2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
                   ` (7 preceding siblings ...)
  2011-07-23  4:54 ` [PATCH 8/8] hob: rework image output type setting Joshua Lock
@ 2011-07-25 11:36 ` Richard Purdie
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Purdie @ 2011-07-25 11:36 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Fri, 2011-07-22 at 21:54 -0700, Joshua Lock wrote:
> This series contains largely cosmetic and purely GUI related changes to
> address some bugs filed against Hob and a few other GUI tweaks.
> 
> The following changes since commit abc67ed6921c98ed581f101ec1acc589fd9ce7e9:
> 
>   bitbake/utils: Add contains helper function from lib.oe.utils (2011-07-22 12:11:01 +0100)
> 
> are available in the git repository at:
>   git://github.com/incandescant/bitbake hob
>   https://github.com/incandescant/bitbake/tree/hob
> 
> Joshua Lock (8):
>   hob: refer to tasks as Package Collections
>   ui/crumbs/tasklistmodel: don't show native and cross recipes
>   ui/hob: clear the search entry when resetting
>   ui/hob: if the user clicks Stop a second time only offer 'Force Stop'
>   hob: only add new layer's to the UI
>   ui/crumbs/hobprefs: set higher arbitrary limit on threads &
>     parallelism
>   ui/crumbs/hobprefs: tweak the package format tooltip
>   hob: rework image output type setting

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-07-25 11:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-23  4:54 [PATCH 0/8] Hob GUI tweaks and bugfixes Joshua Lock
2011-07-23  4:54 ` [PATCH 1/8] hob: refer to tasks as Package Collections Joshua Lock
2011-07-23  4:54 ` [PATCH 2/8] ui/crumbs/tasklistmodel: don't show native and cross recipes Joshua Lock
2011-07-23  4:54 ` [PATCH 3/8] ui/hob: clear the search entry when resetting Joshua Lock
2011-07-23  4:54 ` [PATCH 4/8] ui/hob: if the user clicks Stop a second time only offer 'Force Stop' Joshua Lock
2011-07-23  4:54 ` [PATCH 5/8] hob: only add new layer's to the UI Joshua Lock
2011-07-23  4:54 ` [PATCH 6/8] ui/crumbs/hobprefs: set higher arbitrary limit on threads & parallelism Joshua Lock
2011-07-23  4:54 ` [PATCH 7/8] ui/crumbs/hobprefs: tweak the package format tooltip Joshua Lock
2011-07-23  4:54 ` [PATCH 8/8] hob: rework image output type setting Joshua Lock
2011-07-25 11:36 ` [PATCH 0/8] Hob GUI tweaks and bugfixes Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.