fix setupDialog and setupConstraints in SizeDialogBase and reverse the order

they're called in in the various dialog ctors to how it was in 1.0.x (which
makes a lot more sense)

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115388
This commit is contained in:
Volker Lanz 2010-04-16 09:28:39 +00:00
parent 5e6b74e1af
commit 1747d31bd2
5 changed files with 9 additions and 13 deletions

4
TODO
View File

@ -17,6 +17,10 @@ Bugs to fix for 1.1:
* make sure the default file system can indeed be created
* fs limits in sizedialog: create ext with >4GiB, set fs to fat16 --> it's
correctly resized to 4096MiB. but if align is on, the right handle can
still be moved to the next aligned sector
===============================================================================
For releases after 1.1:

View File

@ -50,8 +50,8 @@ InsertDialog::InsertDialog(QWidget* parent, Device& device, Partition& insertedP
dialogWidget().hideFileSystem();
dialogWidget().hideLabel();
setupConstraints();
setupDialog();
setupConstraints();
setupConnections();
restoreDialogSize(KConfigGroup(KGlobal::config(), "insertDialog"));

View File

@ -47,8 +47,8 @@ NewDialog::NewDialog(QWidget* parent, Device& device, Partition& unallocatedPart
{
setCaption(i18nc("@title:window", "Create a new partition"));
setupConstraints();
setupDialog();
setupConstraints();
setupConnections();
restoreDialogSize(KConfigGroup(KGlobal::config(), "newDialog"));

View File

@ -51,8 +51,8 @@ ResizeDialog::ResizeDialog(QWidget* parent, Device& d, Partition& p, qint64 minF
dialogWidget().hideFileSystem();
dialogWidget().hideLabel();
setupConstraints();
setupDialog();
setupConstraints();
setupConnections();
restoreDialogSize(KConfigGroup(KGlobal::config(), "resizeDialog"));

View File

@ -82,16 +82,6 @@ static qint64 dialogUnitToSectors(const Partition& p, int v)
void SizeDialogBase::setupDialog()
{
// TODO: these don't belong here; the distinction between setupDialog and setupConstraints
// doesn't work that well, there's too much interdependency.
if (!canShrink())
dialogWidget().partResizerWidget().setMinimumLength(partition().length());
if (!canGrow())
dialogWidget().partResizerWidget().setMaximumLength(partition().length());
dialogWidget().partResizerWidget().init(device(), partition(), minimumFirstSector(), maximumLastSector(), false, canMove());
dialogWidget().spinFreeBefore().setValue(sectorsToDialogUnit(partition(), partition().firstSector() - minimumFirstSector()));
dialogWidget().spinFreeAfter().setValue(sectorsToDialogUnit(partition(), maximumLastSector() - partition().lastSector()));
@ -105,6 +95,8 @@ void SizeDialogBase::setupDialog()
detailsWidget().spinLastSector().setValue(partition().lastSector());
detailsWidget().checkAlign().setChecked(Config::alignDefault());
dialogWidget().partResizerWidget().init(device(), partition(), minimumFirstSector(), maximumLastSector(), false, canMove());
dialogWidget().partResizerWidget().setAlign(Config::alignDefault());
}