Commit Graph

43 Commits

Author SHA1 Message Date
Bogdan Marinescu 7bfb98568a bitbake: hig.py: refactor into individual components
Since hig.py was becoming too large (which impacted maintenance and
operations like git merges) it was split into individual files for
the classes that were implemented in hig.py. hig is now a Python
package (lib/bb/ui/crumbs/hig/). The patch was tested by
building core-image-basic/qemux86 in Hob and accessing the various
UI elements implemented in hig. Note that the patch does not change
the functionality of Hob in any way, it's just a code refactoring
that should make life a bit easier for Hob developers.

[YOCTO #3200]

(Bitbake rev: a7a2b730f915cafe7aa30539622dd1ca64ae41f5)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 12:51:33 +00:00
Cristiana Voicu a9c563b1b5 bitbake: hob: add a progress indicator when you select 'view log'
- created a new file named "hobthreads.py", defining a thread
for opening the log file in a subprocess using subprocess module;
in the future I think we will add some other threads here, to
implement some other performance issues
- on "builddetailspage", "packageselectionpage" and "imagedetailspage"
I have changed the manner for opening the log file; it uses the thread
to open the file, and on main thread it creates a dialog to show a
progress bar, which pulses till the file is open
- this was added because when the log file is big, it takes time to
be opened; on the dialog you can use "Cancel" button to terminate the
process initiated to open the file

[YOCTO #2997]
(Bitbake rev: 165362a63f085991b6bab63ab90a0c7b9bf6b784)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:54 +01:00
Constantin Musca 73182ed4ea bitbake: hob/imagedetailspage: disable the deploy tool for qemu machines
- qemu images cannot be deployed to hardware, even if live
images (hddimg and iso) files are created

[YOCTO #3196]

(Bitbake rev: 001b1c439ffa450cb8728b0fa9469fed63ae9bed)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:30:19 +01:00
Ioana Grigoropol 93fdfafbfc bitbake: hob/image_details/run_image: Kernel must be set
- when displaying image details, even if the kernel information is not shown, the kernel value must be set (if dealing with qemu) otherwise running the image will throw an error
(Bitbake rev: 334125a98ecb8a938aee4bc530205ad75099361c)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:30:18 +01:00
Ioana Grigoropol 58a99ebe3c bitbake: hob/image_details: Remove kernel info from details
- removed kernel information from image details

[Yocto #3002]

(Bitbake rev: 7fc33f0a8a38d9b8984bf884e47e505791536d16)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:54 +01:00
Ioana Grigoropol 0e1a427a25 bitbake: hob: Buttons width and height are taken for host
- removed all set_size_request calls for buttons in order to:
	- force autosizing of buttons with regard to the text length
	- use host theme default height for buttons
- modified buttons on image details page to have the same height (default host one) and the width of the button with the largest text
- modified Stop button on build details page to have the default height by directly attaching it to the containing table instead of hbox

(Bitbake rev: 9cdfaa17309d368c3bbae0f1cce0ad875d340e83)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:25 +01:00
Bogdan Marinescu 05c1d32e02 bitbake: hob: Fix settings dialog issues
Fix some issues with the settings dialog that were introduced as
a result of merging the fix for #2162.

[YOCTO #3117]

(Bitbake rev: a363f59579e01cb7bd39be2ce73f22c875c62ce7)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Constantin Musca 8c82b12d1c bitbake: hob: rename 'View log' to 'Open log'
Rename all the 'View log' buttons to 'Open log' for
consistency.

[YOCTO #3045]

(Bitbake rev: 7bc9b0c1c2544b494959b13ac79ac3e52edb4fe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Cristiana Voicu 831486844d bitbake: hob/imagedetailspage: change "FileCreated" label to "Files created"
[YOCTO #2998]

(Bitbake rev: ca2464561d54d59d1146359e41eb08201954fc21)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Cristiana Voicu e2b0eaef93 bitbake: hob: The 'run image' and 'deploy image' dialogs text and alignment corrections
-changed the text shown by both dialogs text
-make small tweaks to alignment

[YOCTO #2999]

(Bitbake rev: b193db13472908b8ec6c670da96ff3b0004e635b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Cristiana Voicu ed17f44da6 bitbake: hob/imagedetailspage: "Image ready" icon appers only after the image was generated
Now, "Your image is ready" icon doesn't appear when you come back on Imagedetails
page. It appears only after the image was generated.

[YOCTO #2984]

(Bitbake rev: de29bfc163471e4959483493a5e5b26f8a2cf8a0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Ioana Grigoropol 40d55d37b6 bitbake: hobwidget: Button theme is taken from host, fix
- All buttons in the interface inherit a BaseHobButton that
  use the gtk settings for buttons from the host;
- Removed 'or' label between actions on image details page

[Yocto #3011]

(Bitbake rev: 1a8356b57f906cf575612eb52fc8d3a9824ff9a7)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Liming An 94e2a104ec bitbake: Hob: log for Hob and allow users to show logs after successful build
If users build images in Hob, record logs and allow users to retrieve the lo
after successful build.

The logs are generated if and only if:
      - users do "just bake"
      - users do "build image" after "build packages"
      - users do "build packages" only

[YOCTO #1991]

(Bitbake rev: 291289787bb042b99f0599babc2d67c220aadb87)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Liming An 5d79175b87 bitbake: Hob: fixed some variables not clean bug in detail page
[YOCTO #2679]

(Bitbake rev: 73801f571e040dcdfeb15a15b9a484cbefaae70c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An a5b2c1e4ce bitbake: Hob: change 'run image' and 'deploy' Gui and work flow for building detail page
In build detail page, the response action of clicked the 'run image'
or 'deploy' button will accroding to below as ui design:
1)if there has one file in building result, it will responsed the
'run image'(now, we only support the qemu) or 'deploy' directly
2)if there has more than one file, it will popup a dialog with listed
created files type, they are has same action attributes 'deploy'
or 'runnable'.
Note: because the qemu image (runnable file) can't be deployed and
we can't generated a image that has the two attributes now, can be run
or can be deployed,  so the code will not deal with this case.

[YOCTO #2155]

(Bitbake rev: 0d24b1e85a11b68c8464cf15b49d3fc78f216818)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-29 14:46:47 +01:00
Liming An e91f1e28bc 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]

(Bitbake rev: d548eb8a03cfba5c64c018898972bc0a0bdb280c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Liming An 6ac1545453 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.

(Bitbake rev: 4bada20cd244a2dd6d72acd38f0cadc90453e60b)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Liming An c8d78b2186 Hob: add the 'build new' be as the primary action for 'Image detail' page
As ui design, we should set at least one primary action for 'My Image' and
'Image detail' screen as the differnt selected image. if no 'run image' or
no 'save as template' or no 'deploy image' we should set 'build new image'

[YOCTO #2326]

(Bitbake rev: d848af637e9a14b627533bee65bf16f680dff854)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Liming An f3a5ad170d Hob:fixed the issue of primary button is not an 'orange hob button'
In image detail page, the primary button should be an 'orange hob
button', there has a primary button is not, so change it.

[YOCTO #2326]

(Bitbake rev: 884a0b2d927404991b7e23d5bbfab096a5b7e849)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:11 +01:00
Robert Yang 10a0f9ed92 replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would
fail (more or less) silently if the executed program cannot be found

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2075]

(Bitbake rev: f5b3bf115dc1ffbfb241a49cec0fc3654cb71021)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:35:11 +01:00
Liming An 644b30adfb Hob: fixed the issue about the 'run image' page should have the primary bug
issues: when build a image for atom-pc, the output does not include live
image, and 'Save as template' should become the primary action on the screen

[YOCTO 2326]

(Bitbake rev: e9516c7e14d782b943cc6e6a2e5e2111edf03d8c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:18 +01:00
Liming An 0d210ff8e8 Hob: fixed the issue about bug 'running image' workflow and related view
[YOCTO #2155]

(Bitbake rev: 5e14cb41e8ba26a3114ea2c8b8f83b271bc44b54)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:18 +01:00
Liming An 6841abd172 Hob: change the workflow about click 'Run Image' to run directly after builded a qemu image
[YOCTO #2155]

(Bitbake rev: d8a1fc4613ce1d6c1d0e3dad53d7af15b2011fd5)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-09 21:56:47 +01:00
Shane Wang 6486d39fb1 Hob: show those appliable buttons on the image details page only
We don't use "grayed out" but use "show/hide" for those appliable buttons
in the image details page.

[Yocto #2143]

(Bitbake rev: df1564d78d081ceab51d628d227e57b7a197259b)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:05:23 +01:00
Shane Wang 793058e6f2 Hob: add tooltips into image details screen
[Yocto #2243]

(Bitbake rev: 543e81b87b48de9c5285b81c856376c9f52d7902)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:05:22 +01:00
Shane Wang 8d353411c1 Hob: clean up and unify the steps for new build to call initiate_new_build_async()
initiate_new_build() (changed the function name into initiate_new_build_async()
to indicate it is an async function) or the similar sub-functions are called at
different places.

This patch is unify to call initiate_new_build_async().

(Bitbake rev: ec42be626a5d6362a09f12f4f4025ad92d70c89b)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:04:44 +01:00
Dongxiao Xu 4c72ee98c2 Hob: Fix the pattern patch for image name
Sometimes, users may open an image that is not built by Hob, therefore
its image name is not started with "hob-image-". This commit sets a
looser rule for runnable image matching.

This fixes [YOCTO #2240]

(Bitbake rev: 7b81389566cb27451557ca11ec8ed40ef2630543)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:04:43 +01:00
Shane Wang 5cad18b188 Hob: unify _size_to_string() and _string_to_size()
We call intsize_to_string (and string_to_intsize) in 3 different places.
We unify the implementations into one place.

(Bitbake rev: 578ce86a9ac2110f5b128aae582c6e0b3e739cec)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-05 18:48:07 +01:00
Shane Wang 3d594b7749 Hob: remove grab_default() for deploy button
When the deploy button is disabled since there is no deployable image,
the console will show the warning message:

WARNING: /home/yocto-build5/poky-contrib/bitbake/lib/bb/ui/crumbs/imagedetailspage.py:333:
GtkWarning: /build/buildd/gtk+2.0-2.22.0/gtk/gtkwidget.c:5684: widget not within a GtkWindow
  self.deploy_button.grab_default()

This patch is to remove the warning message.

(Bitbake rev: 51a9a5557bb798b559874a4e6dc9924380b5d9a4)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-05 14:00:27 +01:00
Dongxiao Xu 20ea123c28 Hob: Remove some calling of initiate_new_build()
initiate_new_build() function is in async mode and could not be called
before another async function.

Also we could not initialize the build if user simply change a setting,
therefore remove this function.

(Bitbake rev: c184cefe90115623e2312ad2bbe34ea95788c129)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-05 14:00:26 +01:00
Dongxiao Xu f73ea0e40d Hob: Improve the matching for runnable machine type
(Bitbake rev: 1b14488bcfb345a3258b15ebfdaa2e1235a5fe87)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29 21:25:52 +01:00
Shane Wang ff43873706 Hob: add Templates and Settings on image details screen
This patch is to add Templates and Settings tool buttons on the image
details screen, which makes things easier and simplier.

In order to fulfill that, the code splits the functions
show_load_template_dialog() and show_adv_settings_dialog() in builder.py
because they will possibly be called from different screens later.

[Yocto #2163]

(Bitbake rev: 29bea7b7076a7b74d36237da86a4eff6605d17ec)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29 21:12:56 +01:00
Shane Wang 3038c0c65d Hob: Set one of deployable images or runnable images as the default toggled item
With this patch, even though there are a lot of images built out, a default image
which is either deployable or runnable is toggled by default. So, for users, one
more action to select an image before running qemu or deploying is not needed any more.

Note: If there are more than one runnable or deployable images (such as ext2, ext3,
jffs2 and btrfs), only the first image is toggled by default for run-qemu or
deployment. If the user wants to run or deploy others, he/she needs to toggle them
manually.

[Yocto #2155]

(Bitbake rev: 4568dfbd5e693cce0e6e947f323eaf08a3176744)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29 21:12:55 +01:00
Joshua Lock ceee95efb1 lib/bb/ui/crumbs/imagedetails: use secondary button style for 'View files'
Use HobAltButton, rather than gtk.LinkButton, for the 'View files'
button.

Use xdg-open to display the folders contents.

(From Poky rev: 22955b47ac485e0d069ddd8301a11658d76bcfee)

(Bitbake rev: 9647c188c0d06ec045c15281eae785e935c25d2b)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-28 16:49:18 +01:00
Dongxiao Xu bc73876964 Hob: runqemu and deployment functionality filter
Implement the filter for runqemu and deployment functionality.

runqemu
1) suffix should be in the list of RUNNABLE_IMAGE_TYPES.
2) machine should match the pattern of RUNNABLE_MACHINE_PATTERNS.

deployment:
1) suffix should be in the list of DEPLOYMENT_IMAGE_TYPES.

(Bitbake rev: de4d09a8d100b81622300db5f46627c649812abd)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:32 +01:00
Joshua Lock ac53520823 lib/bb/ui/crumbs: make use of HobButton for existing primary action buttons
Replace all gtk.Button instances that have the orange style applied with
HobButton.

(Bitbake rev: f4dfdc23a6498fdaa164a1bfccf616ff8fcbd251)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 16:10:24 +00:00
Joshua Lock 21970f4755 lib/bb/ui/crumbs: Add HobAltButton and use it
This adds a gtk.Button subclass for secondary actions which unsets the
relief so that the user is aware that the button is clickable and yet it is
more subtle than the primary action (such that the primary action is the
most obvious one) - this is per the interaction design.

Further we replace all uses of gtk.LinkButton with the new HobAltButton

Partially addresses [YOCTO #2105], a follow on patch will theme the button
so that it matches the visual design.

(From Poky rev: c3f17fed243180678264168968333463b203bfa0)

(Bitbake rev: 601521c2d7f5568d94529a77b2cbe19fef7cbf48)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-22 14:40:41 +00:00
Joshua Lock 740bd44c5a ui/crumbs: remove unused return value from append_toolbar_button
No caller of the method uses the returned toolbar variable

(Bitbake rev: 77ed4bb3468d5d256f08329fd307df5a219ae242)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-20 15:21:35 +00:00
Shane Wang 491c87d167 Hob: fix '!= None' and '== None' in the code
This patch is to fix the following:

if foo != None -----> if foo
if foo == None -----> if not foo

(From Poky rev: d771343b1726f166ed8d75543ba68bd2a20aee7b)

(Bitbake rev: 23c140a4d00293d922cbd34b6b837493cac2e93a)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-20 15:21:33 +00:00
Dongxiao Xu 602adb0e58 Hob: Change Box's padding value
For Box type of widget, change the padding value to be HIG consistent,
that is an increments of 6 pixels.

(Bitbake rev: 0347e99ca5c232832f2b490584d76872c6d77311)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-15 10:35:18 +00:00
Shane Wang d76e62fdd8 Hob: fix a bug that the image size is shown incorrectly in the image details page.
Originally, the image size shows the last item in the image tree view in the image details page.
That is not correct. We need to show the size of the image which the user chooses.

(Bitbake rev: 01c18a24252b35959a4cc01088678f93cb2f95e5)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01 15:51:35 +00:00
Shane Wang 030ba4bc71 Hob: make HobViewTable more general in hob and make the image selection dialog and the image details page reuse it.
This patch is to make the class HobViewTable more general as a tree view in Hob.
Now the recipe selection page and the package selection page are using it.
And we have tree views in the image selection dialog and the image details page, which used the class methods in HobWidget to create the tree views. That is not good in OO.

So, make them reuse HobViewTable to create its instances.

(Bitbake rev: 3c900211e8bc0311542873480d79b347d7449f59)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01 15:51:30 +00:00
Dongxiao Xu 656f9a0758 Hob: A new implemetation (v2)
This commit implements a new design for hob
Some of the new features:
 - Friendly new designed GUI. Quick response to user actions.
 - Two step builds support package generation and image generation.
 - Support running GUI seprarately from bitbake server.
 - Recipe/package selection and deselection.
 - Accurate customization for image contents and size.
 - Progress bars showing the parsing and build status.
 - Load/save user configurations from/into templates.

(Bitbake rev: 4dacd29f9c957d20f4583330b51e5420f9c3338d)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Fengxia Hua <fengxia.hua@intel.com>
Designed-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 18:04:27 +00:00