-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ack. On Mon, 11 Jan 2010, Chris Lumens wrote:
--- iw/DeviceSelector.py | 6 ++++++ iw/cleardisks_gui.py | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/iw/DeviceSelector.py b/iw/DeviceSelector.py index ba3916a..17b977c 100644 --- a/iw/DeviceSelector.py +++ b/iw/DeviceSelector.py @@ -143,6 +143,7 @@ class DeviceSelector(DeviceDisplayer): self.view.append_column(col) self.view.set_headers_clickable(True) + self.view.connect("row-activated", self._row_activated, toggledCB, radioButton) def _all_clicked(self, button, cb=None): # This is called when the Add/Remove all button is checked and does @@ -167,6 +168,11 @@ class DeviceSelector(DeviceDisplayer): set = button.get_active() self.store.foreach(_toggle_all, set) + def _row_activated(self, view, row, col, cb, isRadio): + # This is called when a row is double-clicked, or selected via space or + # enter. We just want to do the same as if the checkbox were clicked. + self._device_toggled(None, row, cb, isRadio) + def _device_toggled(self, button, row, cb, isRadio): # This is called when the checkbox for a device is clicked or unclicked. model = self.model diff --git a/iw/cleardisks_gui.py b/iw/cleardisks_gui.py index 2ac8c68..c227e30 100644 --- a/iw/cleardisks_gui.py +++ b/iw/cleardisks_gui.py @@ -143,6 +143,10 @@ class ClearDisksWindow (InstallWindow): self.addButton.connect("clicked", self._add_clicked) self.removeButton.connect("clicked", self._remove_clicked) + # Also allow moving devices back and forth with double click, enter, etc. + self.leftTreeView.connect("row-activated", self._add_clicked) + self.rightTreeView.connect("row-activated", self._remove_clicked) + if self.anaconda.id.storage.clearPartType == CLEARPART_TYPE_LINUX: self.installTargetTip.set_markup(_("<b>Tip:</b> All Linux filesystems on install target devices will be reformatted and wiped of any data. Make sure you have backups.")) elif self.anaconda.id.storage.clearPartType == CLEARPART_TYPE_ALL: @@ -152,7 +156,7 @@ class ClearDisksWindow (InstallWindow): return self.vbox - def _add_clicked(self, button): + def _add_clicked(self, widget, *args, **kwargs): (filteredModel, filteredIter) = self.leftTreeView.get_selection().get_selected() if not filteredIter: @@ -174,7 +178,7 @@ class ClearDisksWindow (InstallWindow): self.leftFilteredModel.refilter() self.rightFilteredModel.refilter() - def _remove_clicked(self, button): + def _remove_clicked(self, widget, *args, **kwargs): (filteredModel, filteredIter) = self.rightTreeView.get_selection().get_selected() if not filteredIter:
- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iEYEARECAAYFAktLmssACgkQ5hsjjIy1VknaJwCgk3ETnlkGoHtrtkHJonIXx+uu bnYAmwXkYjIy8Cxe2WmGWy4+LeZYqF/D =weuz -----END PGP SIGNATURE----- _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list