Commit Graph

309 Commits

Author SHA1 Message Date
Volker Lanz 7c750514d0 make sure to say we're talking about logical sector size when we say sector size.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135497
2010-06-07 12:56:27 +00:00
Volker Lanz d18e8cfb2a fix horizontal stretch
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135478
2010-06-07 12:14:55 +00:00
Volker Lanz fa36ef13f6 simplyfy grid layout, fix horizontal stretch
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135474
2010-06-07 12:20:03 +00:00
Volker Lanz ecb6341769 fix horizontal stretch
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135470
2010-06-07 12:11:31 +00:00
Volker Lanz 3b2a443e07 modify spacing, width and border size for new looks
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135253
2010-06-06 23:39:10 +00:00
Volker Lanz 29f73d29fa integrate Hugo's new code a little better, mainly white space.
move implementation of handleWidget() to cpp file to avoid an include

add credit to KAboutData

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135182
2010-06-06 18:23:17 +00:00
Hugo Pereira Da Costa 16de8b9034 Changed rendering of
- partwidget, to use the same appearance as buttons
- partresizewidget, to use a 'sunken' frame, and same appearance as QSplitter for the resize handlers.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1135173
2010-06-06 17:57:08 +00:00
Volker Lanz 68d1eb14ce use a PartWidget instead of a PartResizerWidget in the partition properties
dialog -- no one is going to do any resizing, after all.

to make this possible, allow creating a PartWidget() without a valid Partition
pointer and add an init() method for later setting the Partition pointer. also
take care of the Partition pointer being NULL everywhere in the class

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1134172
2010-06-03 15:01:53 +00:00
Volker Lanz 6508ad1d71 create and handle info pane just like the other dock widget content widgets
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1134148
2010-06-03 14:27:11 +00:00
Volker Lanz 0a77bb6d8a remove KPart remains
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1134137
2010-06-03 14:02:35 +00:00
Volker Lanz 358825fba1 move mountentry to its own implementation files and make it a class
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1133534
2010-06-01 22:07:13 +00:00
Volker Lanz a6715ebebe increase version
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1133462
2010-06-01 19:21:50 +00:00
Volker Lanz b47363f3a2 remove some actions from default toolbars to make them more usable
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1133421
2010-06-01 17:52:53 +00:00
Volker Lanz bd3a3db8b9 make sure the max value of first and last sector isn't set wrong
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1132901
2010-05-31 17:12:18 +00:00
Volker Lanz e66fa24e52 don't allow editing mount points for mounted partitions
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1130885
2010-05-26 17:33:39 +00:00
Volker Lanz b7dfc67ca9 resolve symlinks when reading device nodes from fstab
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1130866
2010-05-26 16:52:20 +00:00
Volker Lanz 51ae5ddcb4 clear the clipboard if undo deleted the partition that's in it
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129877
2010-05-24 01:52:36 +00:00
Volker Lanz 91b6ce0a47 make formatted spinbox work when suffix or prefix are set
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129714
2010-05-23 14:05:57 +00:00
Volker Lanz f9c0fcd0b3 don't crash checkinf file system support if no partition table is present
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129264
2010-05-21 19:52:22 +00:00
Volker Lanz 08da1fac60 move FileSystemSupportDialogWidget to a file of its own
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128905
2010-05-20 16:09:29 +00:00
Volker Lanz bdfce5576f delete delgate in dtor
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128892
2010-05-20 15:38:15 +00:00
Volker Lanz e9871e0e82 add a check when scanning devices if support for all file systems we found is
present. if not, show a messagebox with detailed information what is missing.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128887
2010-05-20 15:25:55 +00:00
Volker Lanz d6417cbbab revert r1128581 and implement this as an additional check in
CopyOperation::canPaste() instead.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128813
2010-05-20 11:02:00 +00:00
Volker Lanz 696b368463 add a select device submenu to the device menu
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128594
2010-05-19 18:39:40 +00:00
Volker Lanz d8d7b82862 use pretty name from Device class
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128593
2010-05-19 18:38:32 +00:00
Volker Lanz 6b260d97ec use pretty print method from Device
output device name in bold

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128592
2010-05-19 18:38:00 +00:00
Volker Lanz 8b912ffb88 prevent the user from pasting a partition on another that is too big for the
source partition's file system

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128581
2010-05-19 17:38:12 +00:00
Volker Lanz 2b1f937917 warn if user tries to overwrite an existing partition with another or an image
file

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128576
2010-05-19 17:11:15 +00:00
Volker Lanz d058abce6e doxygen updates
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128312
2010-05-18 22:27:30 +00:00
Volker Lanz 2069e191de make sure to update unallocated space after changing the alignment type. also,
update partition widget after changing the alignment type since now the
unallocated space might have changed.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127793
2010-05-17 16:36:18 +00:00
Volker Lanz 2202629829 ws fix
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127770
2010-05-17 15:50:10 +00:00
Volker Lanz 3eb9dc8b4a add assert and check if there is a selected partition
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127769
2010-05-17 15:49:46 +00:00
Volker Lanz 438a325f29 neither KMountPoint nor our own edit mount point dialog can handle more than
one mount point per partition, so don't pretend we could in the Partition class

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127763
2010-05-17 15:17:15 +00:00
Volker Lanz bc5d916cc6 if the target file does not exist, don't complain if we cannot rename it to a
backup

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127762
2010-05-17 15:14:19 +00:00
Volker Lanz bff6424cf6 check if the mount point the partition has is non-empty before using it in the
dialog.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127371
2010-05-16 12:19:04 +00:00
Volker Lanz 96964cc52d make sure avail and used capacity aren't printed if not known
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127356
2010-05-16 11:45:31 +00:00
Volker Lanz d9715e5211 switch the order of file system and label so it's consistent across dialogs
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1122705
2010-05-04 14:27:12 +00:00
Volker Lanz 0c3f5ca46f add icons to open browser and save buttons
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1121503
2010-05-01 13:31:27 +00:00
Volker Lanz df7ef8571d make HtmlReport a real class
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1121500
2010-05-01 13:19:50 +00:00
Volker Lanz ce6f2c08d4 add a first version of a html report class
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1120179
2010-04-28 15:21:07 +00:00
Volker Lanz bc58e08b93 add saving of smart report to a html file
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119675
2010-04-27 16:10:54 +00:00
Volker Lanz a26bda1ca8 re-init the file systems when loading a new backend
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119646
2010-04-27 14:49:28 +00:00
Volker Lanz 1c97342be3 if the file system we want to set the combo box to cannot be found in it, set
it to the first value; don't set it to -1

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119609
2010-04-27 13:19:34 +00:00
Volker Lanz 0bc6695513 remove the NO_THREADED_DEVICE_SCANNER ifdefs, they are not requires anymore
(and never really were)

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119568
2010-04-27 12:14:53 +00:00
Volker Lanz 19ed42c34b make sure we hide the scan progress dialog even if there is no progress at all
(most likely the case when there are no devices found at all)

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119566
2010-04-27 12:11:50 +00:00
Volker Lanz f8e81095ea add a formatted spin box
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119557
2010-04-27 11:41:35 +00:00
Volker Lanz 004e83447b turn off keyboard tracking for the spin boxes if align is on; this mostly
alleviates the problems arising from overwriting the spin box values if the new
value is illegal since we don't see values while they are being entered

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119551
2010-04-27 11:21:16 +00:00
Volker Lanz b28c212a9d make the spin boxes in SizeDialogBase work properly with aligned partitions,
mostly.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119547
2010-04-27 11:04:59 +00:00
Volker Lanz d08ce3ac78 move the updateLength-code from the part resizer widget to SizeDialogBase
because that's where it's actually being used exclusively.

don't update the spinbox value in
SizeDialogBase::onFreeSpaceBefore/AfterChanged() because if we do that the user
cannot enter values digit by digit anymore (we'll just overwrite what he entered
after each keystroke)

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119113
2010-04-26 15:37:02 +00:00
Volker Lanz 80cbafc7cb set spin box stepping for capacity, too
make sure we set the correct value for the free space spinboxes after
calculating the new first/last sector

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119091
2010-04-26 14:34:59 +00:00
Volker Lanz 1322c015e0 make sure start and end are aligned when updating a partition's length
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119081
2010-04-26 14:14:14 +00:00
Volker Lanz 42cc630639 update TODO
don't check for length constraints when moving a partition: the length must not
change anyway and the logic wouldn't work because the length DOES change in
between calls to update first and last sector

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119076
2010-04-26 14:03:41 +00:00
Volker Lanz 0284f685a8 make PartitionAlignment::alignedFirstSector() and
PartitionAlignment::alignedLastSector() take the min and max first/last, the
min length and the max length as args, making a lot of stuff in
PartitionAlignment superfluous.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119051
2010-04-26 13:14:29 +00:00
Volker Lanz b6f60697e9 no need to align new or inserted partitions: they're replacing unallocated or
existing partitions which will be aligned if that is what the user configured

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119049
2010-04-26 13:12:48 +00:00
Volker Lanz 32f610d28a make changing the free space after a partition work with aligning, mostly.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119010
2010-04-26 11:46:38 +00:00
Volker Lanz 6b89377253 make changing the free space before a partition work with aligning, mostly.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119007
2010-04-26 11:30:06 +00:00
Volker Lanz 31936a5072 set maximum for sector
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119006
2010-04-26 11:24:51 +00:00
Volker Lanz 8dcd4cd1de use QDoubleSpinBox instead of the integer version for free space before and
after and for capacity so that fractions are possible for these values

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1118931
2010-04-26 08:50:57 +00:00
Laurent Montel 444cc70394 Fix ui files
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1116400
2010-04-19 11:47:04 +00:00
Volker Lanz d4772c37fb make resizeLogicals take start and end delta as args to it does not always have
to delete and re-create the unallocated first and last child in an extended
partition, which is a waste of resources

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1116005
2010-04-18 11:36:00 +00:00
Volker Lanz 1747d31bd2 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
2010-04-16 09:28:39 +00:00
Volker Lanz 5e6b74e1af use the setters in init() for readonly and move allowed; also, call the setters
in the order the args are in

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115387
2010-04-16 09:27:39 +00:00
Volker Lanz 511c20476c fix off by one
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115384
2010-04-16 09:05:08 +00:00
Volker Lanz 50ee02a24a fix calculation of min and max first and last for aligned case
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115379
2010-04-16 08:40:33 +00:00
Volker Lanz 34842c84cb make PartResizerWidget::resizeLogicals do the "right" thing for non extended
partitions (i.e., just remove any children)

call resizeLogicals() when a new partition's role changes in NewDialog so it
gets an unallocated child if it's now extended or the unallocated child is
removed if not anymore.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115223
2010-04-15 16:59:56 +00:00
Volker Lanz 8632b7cf0d Move the workaround-code that replaced making a temp copy of a partition for
the ResizeDialog to said dialog instead of cluttering the
PartitionManagetWidget's call with that.

Call updatePartitions() after exec'ing ResizeDialog() even if the dialog was
not accepted as it might have deleted and re-created unallocated children of
extended partitions anyway -- and that would crash us later.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115191
2010-04-15 15:30:08 +00:00
Volker Lanz 0bebc1a2d0 Don't update logicals when moving an extended partition:
Moving extended partitions is not allowed if they have logicals and calling the
resizeLogicals() method will remove the unallocated partition the user has with
an 98% probability clicked to drag from under our feet, causing moving to fail.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115167
2010-04-15 14:25:55 +00:00
Volker Lanz ee5f16ad34 don't crash when creating a size dialog: don't set moveAllowed before the
partWidget is created

make sure to always create unallocated partitions when resizing an extended,
not only if it already has one.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115158
2010-04-15 13:41:12 +00:00
Volker Lanz ca76d30c3d Align a partition if it's newly created (or inserted), the one it replaces
was not aligned and aligning is on.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115135
2010-04-15 10:46:36 +00:00
Volker Lanz ee40f89db7 Make PartitionAlignment a shell around static methods only.
Make sure aligning partitions actually works in the part resizer. Could still
need work and even thought.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115134
2010-04-15 10:45:43 +00:00
Volker Lanz 9436c18f69 Do not create a temporary Partition instance for resizing. This does not work
anymore because when aligning the resized partition it is no longer known if an
existing partition is the source of the temporary copy or some other partition.

Let the ResizeDialog modify the original and restore its start and end sector
after the dialog has been executed instead.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115133
2010-04-15 10:38:48 +00:00
Volker Lanz 82f08a4f8b use PartitionAlignment::sectorAlignment, not Config::sectorAlignment
let the PartResizerWidget know the state of the align checkbox

use the toggled, not the stateChanged signal from the align checkbox

make sure PartResizerWidget::setMoveAllowed is called before PartResizerWidget::init


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115131
2010-04-15 10:32:12 +00:00
Volker Lanz 65500ac0f3 change arg name so it doesn't clash with a method name
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115130
2010-04-15 10:26:51 +00:00
Volker Lanz 9426e3afec add new class PartitionAlignment and move all alignment related stuff there
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114380
2010-04-13 10:04:01 +00:00
Volker Lanz 3d6b74453e check the constraints (first and last sector min and max) again after aligning
a partition to make sure we're not going over those. of course
PartitionTable::alignPartition() shouldn't move first and last sector to
anywhere it's not allowed to, but currently it seems buggy enough to do so and
the check won't hurt.

PartitionTable::alignPartition() still needs to be fixed, of course.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114084
2010-04-12 18:20:14 +00:00
Volker Lanz d349fbd591 don't try to move a partition if first sector or last sector don't change
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114076
2010-04-12 17:51:21 +00:00
Volker Lanz f1bc4afde8 also set PartWidgets to visible
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114071
2010-04-12 17:29:29 +00:00
Volker Lanz ea2e6cba9f move more code from setupConstraints to setupDialog as another workaround. this
really needs fixing.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114067
2010-04-12 17:05:10 +00:00
Volker Lanz ec44af261e move childWidgets() from PartWidget and PartTableWidget to the common base
class

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114051
2010-04-12 16:22:14 +00:00
Volker Lanz 92a9bd2878 make PartWidgetBase a QWidget
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114049
2010-04-12 16:14:10 +00:00
Volker Lanz 22978e66b8 don't keep a list of our children in PartTableWidget either; like in
PartWidget, we can just let Qt handle that for us

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114047
2010-04-12 16:08:13 +00:00
Volker Lanz c1a6713e45 Remember the active PartWidget in the widget, not in the PartTableWidget. This
means the PartWidget doesn't need to know its PartTableWidget anymore.

Don't keep a list of child widgets, Qt will do that for us.

Remove the showChildren param and property from PartWidget, it wasn't used
anymore.

Rename active() to isActive() in PartWidget for consistency.


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1114033
2010-04-12 14:35:02 +00:00
Volker Lanz 3f1b211df9 no one is calling the code in drawPartition() but the paint event so move it to
the paint event handler. also, remove a superflous assert in the ctor.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113987
2010-04-12 12:48:17 +00:00
Volker Lanz 0d2f3ccc84 clean up partwidget class: don't use qpointers, don't use a pointer for access
to the partition property. still needs more work.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113951
2010-04-12 10:55:13 +00:00
Volker Lanz f2e216cb43 check if there actually is a partition in the partwidget before accessing it
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113935
2010-04-12 10:15:30 +00:00
Volker Lanz 72775ba8a0 this is surely const
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113930
2010-04-12 09:45:14 +00:00
Volker Lanz aabeab1d54 show an ok-icon if smart status is ok and hide the icon label if smart status
is unknown

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113927
2010-04-12 09:23:55 +00:00
Volker Lanz 6d8192b18e use the icons the kstandardguiitem would use in all kguiitems we create
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113772
2010-04-11 18:19:24 +00:00
Volker Lanz 2f822dd21b check if device has more than 2^32 sectors if user wants to create an msdos
partition table on it and show a warning in that case. also make the default
GPT.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113771
2010-04-11 18:06:47 +00:00
Volker Lanz cf9ecebd1f turns out which sector alignment is used on import is determined by the app
wide default in the settings. well. for now, include the information in the
export, but ignore it on import.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113752
2010-04-11 17:16:43 +00:00
Volker Lanz 10bc881dfd use KIO for file IO where appropriate
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113737
2010-04-11 16:12:16 +00:00
Volker Lanz 216868d8ee use KTemporaryFile
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113723
2010-04-11 15:41:35 +00:00
Volker Lanz 4180318c41 remove kdebug line we apparently forgot to remove ;-)
use KIO to save files (actually, use a temp file and copy it with KIO::move)


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1113694
2010-04-11 14:29:20 +00:00
Volker Lanz 180fa4643d extend smart stuff, add its own dialog, add action to trigger it etc.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1108004
2010-03-27 13:47:32 +00:00
Volker Lanz c29ce45cc8 add an icon if the smart status is bad
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1107721
2010-03-26 16:02:55 +00:00
Volker Lanz 28efbee2ec add smart status information
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1107708
2010-03-26 15:06:33 +00:00
Volker Lanz 10efee63d1 don't add, subtract from the new first sector to make minimum size work
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1107491
2010-03-25 19:58:35 +00:00
Volker Lanz 6b4aa38bcd replace numPendingOperations() with operationStack().size()
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1107160
2010-03-24 23:32:20 +00:00
Volker Lanz 74db24753b warn if user changes backend and operations are pending
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1107157
2010-03-24 23:30:20 +00:00
Volker Lanz b28a66bc3f don't assume idx 0 is the default file system
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1106842
2010-03-24 00:20:35 +00:00