Commit Graph

557 Commits

Author SHA1 Message Date
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 07d3bcb15c add minimum capacity for btrfs
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1132764
2010-05-31 11:06:20 +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 88494c8607 copy the old partition table pointer from the current op to the pushed op if
we're merging two ops to create partition tables on the same device

add doxygen comments for new merge method

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129889
2010-05-24 04:00:54 +00:00
Volker Lanz ed05e673e0 rename method and make description property non const; it might change, after
all, during the lifetime of the object if some other operation is merged with
this operation (generally speaking, not necessarily true for copyops)

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129885
2010-05-24 03:28:16 +00:00
Volker Lanz 0c15c050da generate the copy operation's description once in the ctor, don't dynamically
create it each time description() is called; this avoids lots of little bugs
when the source partition is, for example, resized after the copy is made or
its file system changes...

this is probably how this generally should be done for all operations.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129879
2010-05-24 02:36:29 +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 15e23d806e backup op does not target a device
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129869
2010-05-24 01:11:57 +00:00
Volker Lanz 5327ca792a compare partition's device path with device's, not partition table pointers
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129867
2010-05-24 01:05:01 +00:00
Volker Lanz f123525c22 fix comment
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129866
2010-05-24 01:04:17 +00:00
Volker Lanz b91e35ca12 remove unused arg
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129821
2010-05-23 21:21:13 +00:00
Volker Lanz bd5accaa16 merge creating a new partition table with previous ops if they target the
device; i.e., if there are ops that target the device where the partition table
is created, delete those ops.

this needs a lot of testing still. also, if the user undoes the creating of the
partition table, the deletes ops don't just magically reappear. this could
probably be solved by not deleting them but moving them to some qlist in the
create partition table op...?

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129812
2010-05-23 20:15:51 +00:00
Volker Lanz ea4031b645 add methods to each operation to return if the op targets a given device or
partition

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129811
2010-05-23 20:13:46 +00:00
Volker Lanz b8d25fa809 add operator==() and operator!=() for partition and device classes
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129809
2010-05-23 20:12:06 +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 94f45fca5c disable resizing for btrfs, i can't get it to work outside partition manager
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129308
2010-05-21 21:41:43 +00:00
Volker Lanz 0422bfcc15 don't overflow, it's signed... also, an EiB of disk storage ought to be big
enough for everyone.. for the next months, at least.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129273
2010-05-21 20:20:39 +00:00
Volker Lanz 90dc6b318b make mfs.extX shup up so it doesn't kill the qt widget with its output
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129270
2010-05-21 20:10:57 +00:00
Volker Lanz 765681d239 fix support tools name and url
fix order of support checks

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129269
2010-05-21 20:10:26 +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 aa065376b3 allow passing device node via command line
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129237
2010-05-21 18:09:55 +00:00
Volker Lanz 2605e75757 properly handle cmd line args when invoking ourselves with root helper
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129224
2010-05-21 17:12:44 +00:00
Volker Lanz 91b3dc546a unmount device as long as we find mountpoints for it, not just once
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129201
2010-05-21 15:29:10 +00:00
Volker Lanz 2d39afad2b suppressing sleep only works as long as we're not root. that's hardly helpful.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128987
2010-05-20 20:56:54 +00:00
Volker Lanz a59062f073 suppress sleep mode while applying operations -- untested
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128978
2010-05-20 20:37:03 +00:00
Volker Lanz 7196b3a37e add copy() and updateUUID() methods to linuxswap
actually make use of the length param in linuxswap::resize()

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128926
2010-05-20 17:27:19 +00:00
Volker Lanz c2f0ff7528 add move() stub
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128924
2010-05-20 17:25:39 +00:00
Volker Lanz 046c9006e0 keep UUID when resizing swap (i.e. recreating it)
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128909
2010-05-20 16:19:34 +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 68ccea7ac2 reiser4 was missing max capacity method. the actual max capacity of reiser4
is "unknown" according to wikipedia. a quick web search also reveals
nothing.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128815
2010-05-20 11:18:01 +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 10fded0d7f add method to print pretty device name
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128591
2010-05-19 18:37:14 +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 6d939c372d ws fix
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128540
2010-05-19 15:25:04 +00:00
Volker Lanz eaf893cc35 use -n option of fsck.msdos to keep it from modifying the file system when
reading usage

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128535
2010-05-19 15:15:18 +00:00
Volker Lanz faa406a201 make API cleaner: don't use out param if a return value will do
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128321
2010-05-18 22:48:56 +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 319a44ae64 add filesystem support for zfs, hpfs, ocfs2, luks and btrfs
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127754
2010-05-17 14:36:18 +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 d82e50e5d5 check return codes from external commands in fs classes
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127069
2010-05-15 13:10:34 +00:00
Volker Lanz bf02314ff3 use libblkid to probe file systems, not libparted
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1127061
2010-05-15 12:32:04 +00:00
Script Kiddy a28a62074a SVN_SILENT made messages (.desktop file)
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1125742
2010-05-12 06:54:18 +00:00
Script Kiddy c2c82a042f SVN_SILENT made messages (.desktop file)
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1124206
2010-05-08 06:37:49 +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 9ec7f7b2e5 don't build the dummy backend by default (or distros will start to ship it)
make building the libparted backend configurable

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1122567
2010-05-04 07:23:19 +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
Script Kiddy 3d8eaf6e48 SVN_SILENT made messages (.desktop file)
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119999
2010-04-28 06:30:33 +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 dbc3da271b fix html: <br> is 1990's
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119670
2010-04-27 16:01:48 +00:00
Volker Lanz be3fbd844a add a method to the backend plugin interface to let backend plugins set fs
command support types

export the fs implementation class symbols to let backend plugins access them

make the static properties holding the command support information in the
implementations public so backend plugins can change them

rename resizeInternal to resizeBackend in the resize filesystem job

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119648
2010-04-27 14:53:04 +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 1b8a5eb6be don't capitalize the color config names
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119578
2010-04-27 12:38:56 +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 0649420740 whitespace
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119522
2010-04-27 10:14:54 +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
Volker Lanz c9a9402fbe add toDouble()
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1118928
2010-04-26 08:43:16 +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 2bbb4ddcb4 move the code to calc the start and end of an unallocated partition to its own
static method

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1116004
2010-04-18 11:35:05 +00:00
Script Kiddy a3d0681d7e SVN_SILENT made messages (.desktop file)
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115953
2010-04-18 06:26:19 +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 067eeb018d Do not merge resize/new/delete ops if an extended partition is involved: Too
many things can go wrong, all of them leading to crashes.

BUG:232092

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115229
2010-04-15 17:34:34 +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 70b47376d3 one friend less, huzzah
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1115202
2010-04-15 16:04:40 +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