Commit Graph

55 Commits

Author SHA1 Message Date
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 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 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 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 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 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 791377f176 only return true from PartResizerWidget::movePartition() if the partition was
actually moved.

set single step for the sector spinboxes to align value

add a checkbox to turn off aligning the partition


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1105207
2010-03-19 14:13:04 +00:00
Volker Lanz c384fdaf21 refactor the part resizer and the size dialog base so they're less ugly, less
confusing and don't use free sectors before and after the partition but just
plain start and end.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1103958
2010-03-16 11:40:54 +00:00
Volker Lanz 7ebfbdb597 remove amps from kguiitems in message boxes, let KDE handle shortcuts
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1102034
2010-03-11 16:55:27 +00:00
Volker Lanz 54def83c4e wording fix
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1102031
2010-03-11 16:45:59 +00:00
Volker Lanz f2f55e00fa improve wording
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1102027
2010-03-11 16:43:00 +00:00
Volker Lanz 4d6b168474 add a context menu to the log output to allow saving and clearing the log
refactor some code for context menu stuff.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1100535
2010-03-07 19:02:02 +00:00
Volker Lanz 5aceae05fc negate the THREADED define so threaded device scanning is on by default
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098818
2010-03-04 11:52:37 +00:00
Volker Lanz 899d27fb34 introduce a define to disable threaded device scanning in case we don't find a
workaround for the solid problem.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098456
2010-03-03 18:58:14 +00:00
Volker Lanz 55a9af5a8d don't call updatePartitions() any more after pushing operations on the stack,
the push method itself emits a signal that will lead to updateOperations()
being called now.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098237
2010-03-03 10:09:51 +00:00
Volker Lanz 845f44ccef make sure we still have a selected partition when trying to use it (now that
the signal handler for operationsChanged in MainWindow calls updatePartitions,
this is required)

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098148
2010-03-02 23:56:21 +00:00
Volker Lanz f1ab5d8d7f fix off by one
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1096696
2010-02-27 12:52:00 +00:00
Volker Lanz a8b19642fc rename "snapping" to "aligning" partitions
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1095443
2010-02-24 11:06:32 +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 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 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 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 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 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 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 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 40a8e43747 make sure the info pane shows the new partition table type name
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1081932
2010-01-29 11:35:07 +00:00
Volker Lanz 87f2f41e1f add basic support for GPT disk labels
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1081931
2010-01-29 11:25:28 +00:00
Volker Lanz 275dfde876 revert r1077006: don't show all devices in partition tree. it's just too
confusing.

but do keep the code to show the first device by default. also add code to make
sure the devices list shows the selected devices as indeed selected in the list
widget.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1081532
2010-01-28 16:43:27 +00:00
Volker Lanz 8b6f51e0f1 add minimal dbus support
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1080818
2010-01-27 00:28:43 +00:00
Volker Lanz a6427ee3ce rename log class to Log to avoid clashes with the C math lib function of the
same name

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1080742
2010-01-26 21:12:42 +00:00
Volker Lanz f67ca33866 move setSelectedDevice method to a more suitable position in the file
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1077016
2010-01-19 10:34:53 +00:00
Volker Lanz e16357d14b show all devices in the tree widget
show the first device per default

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1077006
2010-01-19 10:23:20 +00:00
Volker Lanz 908bfe3669 add "shred partition" feature
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1076584
2010-01-18 12:31:00 +00:00
Volker Lanz c250deab55 update partitions after mount point dialog has been accepted
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1075807
2010-01-16 20:18:32 +00:00
Volker Lanz 5b7cfd7f8b begin integration of MountManager dialogs
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1075244
2010-01-15 18:08:01 +00:00
Volker Lanz 8058585d49 Improved device discovery via Solid.
Use the Solid-provided icon name for devices.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1074953
2010-01-15 01:46:45 +00:00
Volker Lanz 71ed639866 set size hints for list items to 32 pixel height to make the app look less
condensed

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1071251
2010-01-07 19:23:34 +00:00
Volker Lanz 72b0cdac0d Don't disable updates for the partition widget while applying operations. This
leads to corrupted graphics unter Qt4.6 and should not be necessary anymore as
executing operations will not delete any partition objects.

BUG:218685

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1062710
2009-12-15 18:43:30 +00:00
Volker Lanz 5036af3e5d cleanup some stuff: whitespace fixes, add some q_disable_copy macros, add some
initialisations to class headers

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1046678
2009-11-09 13:51:08 +00:00
Volker Lanz f77ffc9964 use qpointers for modal dialogs, as discussed here:
http://www.kdedevelopers.org/node/3919


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1006484
2009-08-03 20:08:38 +00:00