Commit Graph

337 Commits

Author SHA1 Message Date
Volker Lanz bd1f7b8c5d allow changing the msdos partition alignment from the device properties
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095438
2010-02-24 10:47:22 +00:00
Volker Lanz 6dba1bbbd1 remove unused signal
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095437
2010-02-24 10:45:26 +00:00
Volker Lanz fe975b9dfb check for correct alignment only after the partition table type has been set
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095436
2010-02-24 10:44:11 +00:00
Volker Lanz ed5c0da0ba fix typos in comment
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095435
2010-02-24 10:43:06 +00:00
Volker Lanz df26044041 rename LibParted class to LibPartedBackend (plus files)
introduce a CoreBackend superclass for all future backends


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095129
2010-02-23 18:04:45 +00:00
Volker Lanz 488178c823 remove KCM: it isn't building, it won't work after the refactoring and it
appears no one really wants it.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095115
2010-02-23 17:25:53 +00:00
Volker Lanz ccdf62fe1e add information about status of KCM and KPart
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095114
2010-02-23 17:17:08 +00:00
Volker Lanz 2eb8c42c1d Remove the few lines related to dbus stuff as long as we're not using any of it
anyway.

Refactor PartitionManagerWidget() and MainWindopw(), moving lots of stuff not
directly related to the PartTableWidget/TreePartition-combo from the former to
the latter. This completely breaks the KCM for now.

Remember the currently selected device across rescans.

Use the partition and device container widget for the context menus of
partitions and devices.

Use QMegatObject::connectSlotByName() where possible, even setting object names
where required to make that work.

Emit operationsChanged() and devicesChanged() in OperationStack because only
that makes any sense.

Add devices properties to toolbar.

Rename itemActivated signal in PartTableWidget to itemDoubleClicked.

DeviceScanner, OperationRunner and OperationStack are child QObjects of
MainWindow now.


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095086
2010-02-23 16:30:05 +00:00
Volker Lanz 5d278d64b8 make sure not to show our own status bar if we're a kpart
init m_ActionCollection first so isKPart() is guaranteed to work as early as
possible

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1093899
2010-02-21 17:54:52 +00:00
Volker Lanz 4d036f7783 clean up xml gui file and copy changes to kpart's rc file, too
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1093893
2010-02-21 17:38:24 +00:00
Volker Lanz f8a79b009d save and restore dialog sizes for edit mount points and mount options
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1093882
2010-02-21 17:07:47 +00:00
Volker Lanz 9c73e8f052 save and restore size for configure dialog
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1093877
2010-02-21 17:03:22 +00:00
Volker Lanz 241ae7105e add action to hide/show menu bar
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1093874
2010-02-21 16:58:27 +00:00
Volker Lanz baa03c4d78 don't pass a pointer to the selected device to ListDevice::updateDevices: this
doesn't have any effect anyway.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1092963
2010-02-19 21:25:48 +00:00
Volker Lanz 51f3be7690 don't connect do itemActivated for listDevies, connect to itemDoubleClicked.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1092961
2010-02-19 21:09:14 +00:00
Volker Lanz 10c32cdb87 Work around a libparted bug when comittint changes to Linux found by the
GParted authors.

See
http://git.gnome.org/browse/gparted/commit/?id=bf86fd3f9ceb0096dfe87a8c9a38403c13b13f00

and

http://lists.alioth.debian.org/pipermail/parted-devel/2010-February/003394.html


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1092788
2010-02-19 14:44:12 +00:00
Yuri Chornoivan fb63e4886f typo fix
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1092260
2010-02-18 16:43:04 +00:00
Volker Lanz e8e8796d46 add action for device properties to collection.
add the device properties action to device context menu.

open device properties when double clicking device in tree widget.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091984
2010-02-18 00:06:36 +00:00
Volker Lanz 16861abe7d The available and used colors in the config aren't part of the file system color array.
Actually do use these colors in the part widget.

Improve the look of the selection in the part widget.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091952
2010-02-17 23:00:55 +00:00
Volker Lanz b7a0b4c4e1 set the uuid when copying a FileSystem
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091925
2010-02-17 22:07:28 +00:00
Volker Lanz 4849ec5ff8 Add colors to identify each individual type of file system plus a config page
to change these colors.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091881
2010-02-17 19:39:24 +00:00
Volker Lanz 06e7a29038 Add some more columns to the partition tree now that columns can easily be
hidden. Pick a sane set of columns to show by default, too.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091807
2010-02-17 16:11:16 +00:00
Volker Lanz 51faaebb38 Add some basic configuration dialog stuff.
Remove the option to create msdos-vista-compatible partition tables. Instead,
use a global config to determine which alignment to use.

Add a device properties dialog.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091755
2010-02-17 13:18:25 +00:00
Volker Lanz 360131aba1 don't format Byte with decimal digits
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091656
2010-02-17 10:27:42 +00:00
Volker Lanz 1f3ed68b34 add read-only flag to PartTableWidget
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091653
2010-02-17 10:06:23 +00:00
Volker Lanz 26365e1079 allow turning on and off columns in the partition tree; save and restore the
settings in the config

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1091219
2010-02-16 20:07:33 +00:00
Volker Lanz 3c41deeeab no longer necessary to include libparted headers
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1090037
2010-02-14 14:23:27 +00:00
Volker Lanz 95ace6b7d3 make first and last usable sector methods static to libparted, no one else is
using them

move the code used to map libparted partition flags to our own flags from the
job to LibParted

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1090002
2010-02-14 12:35:01 +00:00
Volker Lanz bfbe3eed58 clean up includes and doxygen comments
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089994
2010-02-14 11:42:44 +00:00
Volker Lanz f8b36e35b5 move the code to detect if we're a KPart to its own method
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089609
2010-02-13 14:21:05 +00:00
Volker Lanz d0a66f66e1 use the modal window attribute to disable the main window while a progress
dialog is running instead of the hackish way we did that

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089565
2010-02-13 12:31:29 +00:00
Volker Lanz d9fd184c9d Add some basic read-write-locking to the previewDevices.
Remove comment about race conditions when setting the selected device. Turns
out this wasn't at all the case. It was a signal loop, instead.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089499
2010-02-13 11:25:56 +00:00
Volker Lanz 8ee33739c6 use previewDevices(), not the property itself, in OperationStack
use operationStack().previewDevices() where possible in the pm widget

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089122
2010-02-12 13:30:28 +00:00
Volker Lanz eca8342e75 Clean up ListOperations.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089102
2010-02-12 11:49:35 +00:00
Volker Lanz 7991de7fef Clean up ListDevices and, in the process, also MainWindow and the KCM.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1089088
2010-02-12 11:29:12 +00:00
Volker Lanz 921d6b18e6 add some config values for advanced stuff:
- allow applying operations for non-root users if
  "allowApplyOperationsForNonRoot" is set to true (default is false)

- hide the radio button to create vista msdos partition tables unless
  "allowCreateVistaPartitionTable" is true (default is false). The reason for
  this is that there are, of course, no "vista msdos partition tables" in
  reality, it's just a Microsoft stupidity that only works as long as there is
  actually a partition starting at sector 2048 in that partition table. If the
  partition table is just created empty, we have no way to determine it was
  meant to be a "vista msdos partition table".

- allow settings the sector alignment for msdos-vista partition tables (default
  is 2048, just like vista).


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1088920
2010-02-11 22:26:51 +00:00
Volker Lanz bead785279 don't include headers no longer needed
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1088860
2010-02-11 20:11:57 +00:00
Volker Lanz 6f5680866c Add a DeviceScanner class. Move code to scan for devices from
core/libparted.cpp to this new class and use this class in
PartitionManagerWidget

Move the libparted-specific code to inspect _one_ device to a static method in
LibParted.

Make scanning for devices asynchronous with the new DeviceScanner class.

Introduce a progress dialog to show progress while scanning.

Rename the progress dialog for applying operations to something less generic.

Remove the signal emitted when the status bar should change: It's the same
logic used for the signal emitted when operations change.

Remove the onFinished() method in PartitionManagerWidget and directly connect
the finished signal from the apply-progress-dialog to the scanDevices slot.

Rename the PartitionManagerWidget::selectionChanged() signal to the less generic
PartitionManagerWidget::selectedPartitionChanged().

Rename PartitionManagerWidget::clearSelection() to the less generic
PartitionManagerWidget::clearSelectedPartition().

NOTE: The DeviceScanner class is a thread and exposes some race conditions if
not used with caution (aka workarounds). See comments in
PartitionManagerWidget::onScanDevicesFinished().

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1088844
2010-02-11 18:47:51 +00:00
Volker Lanz 75181b6d2f add method to change icon name after instantiation
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1088835
2010-02-11 18:34:09 +00:00
Volker Lanz 3ba56f1fd1 make sectorAlignment signed (all sector numbers throughout the application are
signed)

adjust createUnallocated() so that it leaves sectorAlignment sectors free after
the start of an extended partition for a vista disk label, not sectorsPerTrack

check for the right minimum size for vista and msdos

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1084213
2010-02-02 18:04:38 +00:00
Volker Lanz 9f2ff10e2f Check if we can actually access the device via libparted and don't just segfault if that fails.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1084199
2010-02-02 17:39:58 +00:00
Volker Lanz 6438c7172d remove requirement for msdos_vista partitions to start at xxxxxxx2048 and end
at xxxxxx2047 -- the vista installer seems to act that way but it's apparently
not really required.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1084191
2010-02-02 17:16:47 +00:00
Volker Lanz 896d31e179 make snapping rules for start and end of partitions more abstract and begin
implementing vista's weird snapping rules.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1083886
2010-02-02 08:40:24 +00:00
Volker Lanz c809be064a begin work on new disk label type for msdos(vista)
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1083614
2010-02-01 16:32:45 +00:00
Volker Lanz 058f79debd emit devicesChanged() on undo: the disk label type might change
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1083488
2010-02-01 10:40:28 +00:00
Volker Lanz 85a0a22a27 make sure snapping to the front works even if the partition's first sector
before snapping is between firstUsable and the first cylinder boundary

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1083411
2010-02-01 09:50:30 +00:00
Volker Lanz e7d7283a22 actually use the calculated value, snappedFirst and don't calc it again
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1083355
2010-02-01 09:08:33 +00:00
Volker Lanz 8ecc3ccdf3 fix off by one in getting the first usable sector
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1083353
2010-02-01 09:08:06 +00:00
Volker Lanz 17f37760ae use information from KDiskFreeSpaceInfo only if the partition is mounted
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1082385
2010-01-30 11:52:37 +00:00
Yuri Chornoivan fe08f80bb6 typo: partitin->partition
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1082238
2010-01-30 07:03:57 +00:00