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 KDE

 
 
LinkBack Thread Tools
 
Old 05-07-2010, 11:49 PM
David Cantrell
 
Default Make Format and Resize checkboxes mutually exclusive (#589977)

In the Edit Partition dialog, disable Resize if Format is checked and
disable Format if Resize is checked. Users cannot check both Format and
Resize and have it perform a useful operation. Technically, it's
possible, but our UI workflow in anaconda does not really allow an easy
way to accomplish this. For now, prevent users from selecting both
Format and Resize. If we want to let people shrink a filesystem and
reformat it, we can get creative with that later.
---
iw/partition_ui_helpers_gui.py | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py
index 543d82d..d81fe4f 100644
--- a/iw/partition_ui_helpers_gui.py
+++ b/iw/partition_ui_helpers_gui.py
@@ -231,11 +231,13 @@ def mountptchangeCB(widget, fstypecombo):
if widget.get_children()[0].get_text() == "/boot":
fstypecombo.set_active_text(get_default_filesystem _type(boot=True))

-def resizeOptionCB(widget, resizesb):
+def resizeOptionCB(widget, data):
+ (formatcb, resizesb) = data
+ formatcb.set_sensitive(not widget.get_active())
resizesb.set_sensitive(widget.get_active())

def formatOptionResizeCB(widget, data):
- (resizesb, fmt) = data
+ (resizecb, resizesb, fmt) = data

if widget.get_active():
lower = 1
@@ -249,6 +251,9 @@ def formatOptionResizeCB(widget, data):
if resizesb.get_value_as_int() < lower:
resizesb.set_value(adj.lower)

+ resizecb.set_sensitive(not widget.get_active())
+ resizesb.set_sensitive(resizecb.get_active())
+
def formatMigrateOptionCB(widget, data):
(sensitive,) = widget.get_properties('sensitive')
if not sensitive:
@@ -392,12 +397,13 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo,
resizesb.set_data("reqlower", reqlower)
rc["resizesb"] = resizesb
maintable.attach(resizesb, 1, 2, row, row + 1)
- resizecb.connect('toggled', resizeOptionCB, resizesb)
- resizeOptionCB(resizecb, resizesb)
+ resizecb.connect('toggled', resizeOptionCB, (formatcb, resizesb))
+ resizeOptionCB(resizecb, (formatcb, resizesb))
row = row + 1

if formatcb:
- formatcb.connect("toggled", formatOptionResizeCB, (resizesb, origfs))
+ formatcb.connect("toggled", formatOptionResizeCB,
+ (resizecb, resizesb, origfs))

if luksdev:
lukscb.set_active(1)
--
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-08-2010, 12:19 AM
"Brian C. Lane"
 
Default Make Format and Resize checkboxes mutually exclusive (#589977)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/07/2010 04:49 PM, David Cantrell wrote:
> In the Edit Partition dialog, disable Resize if Format is checked and
> disable Format if Resize is checked. Users cannot check both Format and
> Resize and have it perform a useful operation. Technically, it's
> possible, but our UI workflow in anaconda does not really allow an easy
> way to accomplish this. For now, prevent users from selecting both
> Format and Resize. If we want to let people shrink a filesystem and
> reformat it, we can get creative with that later.

Ack.

Shrink and reformat doesn't really make sense since you can do a delete
and make a new one with the desired size, so hopefully we won't have to
handle that.

- --
Brian C. Lane <bcl@redhat.com>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBS+SuFhF+jBaO/jp/AQLHGAf/QRt78uYY7nIe68MaLHjT0orrEubwlcYJ
B/pViTbz8uqp2+pdNjRl3n74QSu2+ckBGLwK9kW+RSg8xsRF25iU DZoSYA8ixFir
RWxq8lViuYhlUKIrgarzsWCqcYJyIgDVeFAMkgG5/vu3bo5GFaUHNwyvrvj/1uZO
GToHwpZtquIGsY/MumSNzEkXoaK5eSNqE+6QvF7S22I57Sa/85zD57U9p0kK++mN
79gO8j3Nrg+k+WI4d+3zfEUqxqhVjEtz58T4z2EYhVrdVMlXtJ 1geehQEeIjGvxR
GiCNKDlzuETAsc6tDQBDZ3+Rg17K4CYG5W1TwgpSS9KyQca56n OKpw==
=L8aF
-----END PGP SIGNATURE-----

_______________________________________________
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 01:16 AM.

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