Hob: clear the repeated function get_kernel_file_name

there are a repeated function in builder.py and imagedetailspage.py,
so combine them to one.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: fix entry of recipe page can't be edited in case after clicked clear button

cancel some inviable code and fixed this issue

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: fixed a definition not match issue when click choose directflb in package page

[YOCTO #2526]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: lower the limitation for PyGTK

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: add versions for compatibility check between Hob and templates

If a user uses a very old version of Hob and does some work,
later on he/she upgrade to the latest version of Hob, because
Hob may change the settings (add more config option into the Adv.
Settings dialog or remove some), then the old templates are not
loadable and workable for the new Hob.

Even though the user hasn't save any template before, the Hob could
remember the settings between Hob sessions as a default template,
(Remember we have a bug to ask Hob remember between sessions?),
the new Hob will also load the default template.

By adding versions, we can easily to fix the issue. If the versions
don't match, Hob will remove the old default template first and
initiate a new build, which has very very little impact on the user.
(Just can't remember from the previous session after the user upgrades
to a new and incompatible Hob)

[Yocto #2492]

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: Interpret some special characters for label markup

Interpret some special characters for label markup, such as &, <, >, etc.
Otherwise, the message dialog can't show them, and worsely, it makes the
whole message blank.

[Yocto #2492]

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: Change 'run image' work flow and image detail screen as ui design

Added the qemu_image_kernel selection view box to image detail screen GUI, and
changed the 'run image' button clicked work flow.

[YOCTO #2155]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: fixed the index issue when set actived item for base image combo

The combo item index dosn't be increased as the insert a dummy item, when
execute the upadate base image combo operation.

[YOCTO #2500]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ui/crumbs/utils.py: import module bb

When I try to call function which_terminal() of utils.py directly,
it complains NameError: global name 'bb' is not defined

So import module bb

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ui/crumbs/hig.py: fix run time error

Commit 094742bed2fc01d55f572da946fcfa7a48521401 re-implement the
function popen_read(). If there is no USB device, it crashes with
"ExecutionError: Execution of 'ls /dev/disk/by-id/usb*' failed with exit
code 2:"

Replace popen_read() way with glob module to get the USB devices.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ui/crumbs/hig.py: remove extra spaces

Remove extra spaces at the end of line or blank line.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ui/crumbs/hig.py: check deploy process return value

Update function response_cb of DeployImageDialog to get deploy process
return value. According the return value tell user that deploy image
successfully or not.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob2: update DeployImageDialog for seperated tool

Part of [Yocto 2388]

Update class DeployImageDialog to get ready for a standalone deploy
image tool. The standalone tool can be run directly without hob, and
add a button to select image file. So adjust the layout of
DeployImageDialog.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob2: create a standalone deploy image tool

[Yocto 2388]

Create a deploy image tool using the existing dialog including
DeployImageDialog and ImageSelectionDialog.

This tool writes bootable images to USB devices, and it can be run
directly without hob.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>