[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 5/5] Add storage category, spoke, and builder file.



>  - can't switch other spokes yet (eg: software)

I need to do something about this.  It's likely not going to be easy.
This might end up getting slipped to F18, too.

As a general comment, all the print()ing is fine now while we're
developing and testing, but we'll need to remove it all afterwards.
I've been printing stuff out when you click a button that doesn't do
anything yet just so we know the button signal is hooked up, as an
example.  I plan to remove them later.

> diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
> +class SelectedDisksDialog(UIObject):
> +    builderObjects = ["selected_disks_dialog", "summary_label",
> +                      "disk_view", "disk_store", "disk_selection"]
> +    mainWidgetName = "selected_disks_dialog"
> +    uiFile = "spokes/storage.ui"

I wish I could remember why I added a builderObjects property in the
first place, but I'm positive it was to fix a bug.

Anyway, you only need to add things to that list that appear at the top
level of the .ui file's XML.  This is stuff like dialogs, windows,
stores, and sometimes images (like if you need to create a new one for a
button).  Everything under those top-level widgets will automatically
get dragged in.

Thus, you do not need to list everything you will later get_object() on.
I need to add a comment about this.

> +class StorageSpoke(NormalSpoke):
> +    @property
> +    def status(self):
> +        """ A short string describing the current status of storage setup. """
> +        msg = "no disks selected"
> +        if self.data.ignoredisk.onlyuse:
> +            msg = "%d disks selected" % len(self.data.ignoredisk.onlyuse)
> +
> +            if self.data.autopart.autopart:
> +                msg = "automatic partitioning selected"
> +
> +                # if we had a storage instance we could check for a defined root
> +
> +        return msg

All other status strings are capitalized at the beginning, I do believe.
We should continue that.

> diff --git a/pyanaconda/ui/gui/spokes/storage.ui b/pyanaconda/ui/gui/spokes/storage.ui

You can't possibly look through a .ui file and make useful contextual
comments, so I pulled it into glade.  Here are my comments:

* First, make sure you've pulled the latest stuff on the newui branch
  and have installed the latest libAnacondaWidgets.so file.  Once you do
  that, reopen your storage.ui file and you'll see that storageWindow
  now has some more internal children - most notably main_box and
  alignment.

* You'll want to move box2 on storageWindow up out of box1 and make it a
  child of main_box, outside the alignment.  That way the buttons don't
  get aligned inside as well.  Because the storage stuff is especially
  real estate greedy, we may need to tweak alignment variables here.

* You can then get rid of box1 and just make everything in it a child of
  main_box.

* I think the Continue button size on options1_dialog is an error in the
  mockup.  Just about everywhere else, we use Horizontal Alignment:
  Center instead of Fill.  That should be the case both on this button
  and elsewhere.

* The couple checkboxes you use should have use underline.

* The Quit Installer button uses a capital I, but every other button has
  only the first word capitalized.

* The "SELECTED DISKS" label ought to be bolded.

That's all I see for now.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]