diff --git a/TODO b/TODO
index efb42fa..3cbf3c1 100644
--- a/TODO
+++ b/TODO
@@ -20,17 +20,8 @@ Plans and ideas for 1.1:
* offer a) no alignment of partition boundaries at all or b) legacy cylinder
alignment or c) sector based alignment (the name is misleading, though)
-* the size dialog base is a mess with its confusing free before/after stuff.
- redesign to use first and last sector and nothing else and calc the rest from
- there.
+* offer to skip aligning the partition when creating it in that details widget?
-* once the above redesign is done, allow the user to adjust first and last
- sector directly. maybe offer a details dialog widget. maybe also offer to
- skip aligning the partition when creating it in that details widget?
-
-* write a KFormattedSpinBox widget to allow qint64 instead of int and to show
- sector numbers nicely
-
===============================================================================
Bugs to fix for 1.1:
diff --git a/src/gui/sizedialogbase.cpp b/src/gui/sizedialogbase.cpp
index c2a5bbf..18f79c0 100644
--- a/src/gui/sizedialogbase.cpp
+++ b/src/gui/sizedialogbase.cpp
@@ -131,12 +131,12 @@ void SizeDialogBase::setupConnections()
connect(&dialogWidget().spinFreeAfter(), SIGNAL(valueChanged(int)), SLOT(onFreeSpaceAfterChanged(int)));
connect(&dialogWidget().spinCapacity(), SIGNAL(valueChanged(int)), SLOT(onCapacityChanged(int)));
- connect(&dialogWidget().spinFirstSector(), SIGNAL(valueChanged(int)), SLOT(onSpinFirstSectorChanged(int)));
- connect(&dialogWidget().spinLastSector(), SIGNAL(valueChanged(int)), SLOT(onSpinLastSectorChanged(int)));
+ connect(&dialogWidget().spinFirstSector(), SIGNAL(valueChanged(double)), SLOT(onSpinFirstSectorChanged(double)));
+ connect(&dialogWidget().spinLastSector(), SIGNAL(valueChanged(double)), SLOT(onSpinLastSectorChanged(double)));
}
-void SizeDialogBase::onSpinFirstSectorChanged(int newFirst)
+void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
{
if (newFirst >= minimumFirstSector())
{
@@ -145,7 +145,7 @@ void SizeDialogBase::onSpinFirstSectorChanged(int newFirst)
}
}
-void SizeDialogBase::onSpinLastSectorChanged(int newLast)
+void SizeDialogBase::onSpinLastSectorChanged(double newLast)
{
if (newLast <= maximumLastSector())
{
diff --git a/src/gui/sizedialogbase.h b/src/gui/sizedialogbase.h
index 01ab183..8c9261b 100644
--- a/src/gui/sizedialogbase.h
+++ b/src/gui/sizedialogbase.h
@@ -74,8 +74,8 @@ class SizeDialogBase : public KDialog
void onFreeSpaceBeforeChanged(int newBefore);
void onFreeSpaceAfterChanged(int newAfter);
- void onSpinFirstSectorChanged(int newFirst);
- void onSpinLastSectorChanged(int newLast);
+ void onSpinFirstSectorChanged(double newFirst);
+ void onSpinLastSectorChanged(double newLast);
protected:
SizeDialogWidget* m_SizeDialogWidget;
diff --git a/src/gui/sizedialogwidget.h b/src/gui/sizedialogwidget.h
index 7c3fabd..5ec3f6d 100644
--- a/src/gui/sizedialogwidget.h
+++ b/src/gui/sizedialogwidget.h
@@ -43,8 +43,8 @@ class SizeDialogWidget : public QWidget, public Ui::SizeDialogWidgetBase
QSpinBox& spinFreeAfter() { Q_ASSERT(m_SpinFreeAfter); return *m_SpinFreeAfter; }
QSpinBox& spinCapacity() { Q_ASSERT(m_SpinCapacity); return *m_SpinCapacity; }
- QSpinBox& spinFirstSector() { Q_ASSERT(m_SpinFirstSector); return *m_SpinFirstSector; }
- QSpinBox& spinLastSector() { Q_ASSERT(m_SpinLastSector); return *m_SpinLastSector; }
+ QDoubleSpinBox& spinFirstSector() { Q_ASSERT(m_SpinFirstSector); return *m_SpinFirstSector; }
+ QDoubleSpinBox& spinLastSector() { Q_ASSERT(m_SpinLastSector); return *m_SpinLastSector; }
QLabel& labelMinSize() { Q_ASSERT(m_LabelMinSize); return *m_LabelMinSize; }
QLabel& labelMaxSize() { Q_ASSERT(m_LabelMaxSize); return *m_LabelMaxSize; }
diff --git a/src/gui/sizedialogwidgetbase.ui b/src/gui/sizedialogwidgetbase.ui
index 593f6ad..09591da 100644
--- a/src/gui/sizedialogwidgetbase.ui
+++ b/src/gui/sizedialogwidgetbase.ui
@@ -328,7 +328,7 @@
-
-
+
3
@@ -338,6 +338,9 @@
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+ 0
+
-
@@ -360,7 +363,7 @@
-
-
+
3
@@ -370,6 +373,9 @@
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+ 0
+
-