FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 10-27-2010, 01:08 PM
Tomas Mlcoch
 
Default Add Select All and Deselect All buttons to Add Partition dialog.

Add "Select All" and "Deselect all" buttons for selection handling in checkboxlist.
Screen shot: http://tmlcoch.fedorapeople.org/buttons_1.png
Reference: Bug 641910 (https://bugzilla.redhat.com/show_bug.cgi?id=641910).

---
pyanaconda/iw/partition_dialog_gui.py | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/iw/partition_dialog_gui.py b/pyanaconda/iw/partition_dialog_gui.py
index 3e4af2b..392daf9 100644
--- a/pyanaconda/iw/partition_dialog_gui.py
+++ b/pyanaconda/iw/partition_dialog_gui.py
@@ -53,6 +53,14 @@ class PartitionEditor:
def fillmaxszCB(self, widget, spin):
spin.set_sensitive(widget.get_active())

+ def selectAll(self, widget=None, data=None):
+ for i in xrange(self.driveview.num_rows):
+ self.driveview.set_active(i, True)
+
+ def deselectAll(self, widget=None, data=None):
+ for i in xrange(self.driveview.num_rows):
+ self.driveview.set_active(i, False)
+
# pass in CB defined above because of two scope limitation of python!
def createSizeOptionsFrame(self, request, fillmaxszCB):
frame = gtk.Frame(_("Additional Size Options"))
@@ -69,7 +77,7 @@ class PartitionEditor:
fillmaxszsb = gtk.SpinButton(maxsizeAdj, digits = 0)
fillmaxszsb.set_property('numeric', True)
fillunlimrb = gtk.RadioButton(group=fixedrb,
- label=_("Fill to maximum _allowable "
+ label=_("Fill to maximum allo_wable "
"size"))

fillmaxszrb.connect("toggled", fillmaxszCB, fillmaxszsb)
@@ -453,7 +461,7 @@ class PartitionEditor:

# allowable drives
if not self.origrequest.exists:
- lbl = createAlignedLabel(_("Allowable _Drives:"))
+ lbl = createAlignedLabel(_("Allowable D_rives:"))
maintable.attach(lbl, 0, 1, row, row + 1)

req_disk_names = [d.name for d in self.origrequest.req_disks]
@@ -469,6 +477,16 @@ class PartitionEditor:
self.driveview.set_size_request(375, 80)

row = row + 1
+
+ btn_selectall = gtk.Button("Select _All")
+ btn_selectall.connect("clicked", self.selectAll)
+ btn_deselectall = gtk.Button("_Deselect All")
+ btn_deselectall.connect("clicked", self.deselectAll)
+ hbox = gtk.HBox(homogeneous=False, spacing=0)
+ hbox.pack_start(btn_selectall, False, False, 2)
+ hbox.pack_start(btn_deselectall, False, False, 2)
+ maintable.attach(hbox, 1, 2, row, row + 1)
+ row = row + 1

# original fs type and label
if self.origrequest.exists:
--
1.7.2.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-27-2010, 03:35 PM
Ales Kozumplik
 
Default Add Select All and Deselect All buttons to Add Partition dialog.

Hi,

On 10/27/2010 03:08 PM, Tomas Mlcoch wrote:

Screen shot: http://tmlcoch.fedorapeople.org/buttons_1.png


Make sure this is not a part of the commit message when pushing. Your
fedorapeople account and all files on it will be gone one day but the
commit is FOREVA-EVA!



Reference: Bug 641910 (https://bugzilla.redhat.com/show_bug.cgi?id=641910).


Instead write:
Related: rhbz#641910

Ack on the code.

Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-27-2010, 03:47 PM
Chris Lumens
 
Default Add Select All and Deselect All buttons to Add Partition dialog.

> Add "Select All" and "Deselect all" buttons for selection handling in checkboxlist.
> Screen shot: http://tmlcoch.fedorapeople.org/buttons_1.png
> Reference: Bug 641910 (https://bugzilla.redhat.com/show_bug.cgi?id=641910).

I think buttons here look really out of place. In other places in
anaconda, we have a table that has a checkbox column and the header has
a Select All/None button. So that would at least be consistent with
what we do elsewhere. You could also make it so you can select multiple
by highlighting multiple rows in the UI before selecting.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 11:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org