diff options
author | Chris Lumens <clumens@redhat.com> | 2013-02-26 16:00:49 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2013-02-28 14:24:17 -0500 |
commit | 714b954248b54a7aabf36d4579d3b90b6f2f9113 (patch) | |
tree | 69ccca5dce1f57e5fdea88e71e8c8648dd1af79d /pyanaconda/ui | |
parent | 671ea1b4a9c96cb97cda2b2687e9fa5c5a15cf44 (diff) | |
download | anaconda-714b954248b54a7aabf36d4579d3b90b6f2f9113.tar.gz anaconda-714b954248b54a7aabf36d4579d3b90b6f2f9113.tar.xz anaconda-714b954248b54a7aabf36d4579d3b90b6f2f9113.zip |
Allow more than one Page to be expanded at a time.
This should help a little bit with the confusion people have where it looks
like filesystems are vanishing, when instead they are just moving to under
a different root. However, note that anything calling _do_refresh will cause
everything to be closed except the current page.
I do not yet see a way around that.
Diffstat (limited to 'pyanaconda/ui')
-rw-r--r-- | pyanaconda/ui/gui/spokes/custom.py | 31 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/lib/accordion.py | 9 |
2 files changed, 5 insertions, 35 deletions
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 910bfc161..d540f2a25 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -659,11 +659,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): self._current_selector.set_chosen(False) self._current_selector = None - # We can only have one page expanded at a time. - page_order = [] - if self._current_page: - page_order.append(self._current_page.pageTitle) - # Make sure we start with a clean slate. self._accordion.removeAllPages() @@ -703,9 +698,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): partitionsToReuse=bool(ui_roots)) self._accordion.addPage(page, cb=self.on_page_clicked) - if page.pageTitle not in page_order: - page_order.append(page.pageTitle) - self._partitionsNotebook.set_current_page(NOTEBOOK_LABEL_PAGE) label = self.builder.get_object("whenCreateLabel") label.set_text(self._when_create_text % (productName, productVersion)) @@ -753,9 +745,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): page.show_all() self._accordion.addPage(page, cb=self.on_page_clicked) - if root.name not in page_order: - page_order.append(root.name) - # Anything that doesn't go with an OS we understand? Put it in the Other box. if self.unusedDevices: page = UnknownPage(_("Unknown")) @@ -766,22 +755,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): page.show_all() self._accordion.addPage(page, cb=self.on_page_clicked) - if page.pageTitle not in page_order: - page_order.append(page.pageTitle) - - for page_name in page_order: - try: - self._accordion.expandPage(page_name) - except LookupError: - continue - else: - break - + # And then open the first page by default. Most of the time, this will + # be fine since it'll be the new installation page. self._initialized = True - currentPage = self._current_page - if currentPage: - self.on_page_clicked(self.currentPage, - mountpointToShow=mountpointToShow) + firstPage = self._accordion.allPages[0] + self._accordion.expandPage(firstPage.pageTitle) + self.on_page_clicked(firstPage, mountpointToShow=mountpointToShow) ### ### RIGHT HAND SIDE METHODS diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py index e70bbe70a..19af52036 100644 --- a/pyanaconda/ui/gui/spokes/lib/accordion.py +++ b/pyanaconda/ui/gui/spokes/lib/accordion.py @@ -158,15 +158,6 @@ class Accordion(Gtk.Box): self._expanders = [] def _onExpanded(self, obj, cb=None): - # Set all other expanders to closed, but don't do anything to the - # expander this method was called on. It's already been handled by - # the default activate signal handler. - for expander in self._expanders: - if expander == obj: - continue - - expander.set_expanded(False) - if cb: cb(obj.get_child()) |