Commit Graph

194 Commits

Author SHA1 Message Date
Andrius Štikonas 8e5c1b1ebd Move naturalLessThan function out of util/helpers. 2015-03-28 16:56:39 +00:00
Andrius Štikonas bbb2fa3067 Use GPLv3 copyright notices. 2015-02-07 00:32:25 +00:00
Andrius Štikonas d52ea34cf7 Complete KF5 port:
* Expose backend versions in a similar manner to backend Id.
 * Fix configure dialog signals.
2015-02-05 00:09:39 +00:00
Teo Mrnjavac aa132e1cdb Try to port backend loading away from KAboutData. 2015-02-03 19:53:46 +01:00
Andrius Štikonas 109d35d9f4 Fix build. 2014-11-19 12:05:22 +00:00
Andrius Štikonas cc8e02cb43 Port away from deprecated KF5 methods. 2014-11-03 19:57:25 +00:00
Andrius Štikonas debfbade66 Display KDE Frameworks (KXmlGui) version. 2014-05-29 12:52:33 +01:00
Andrius Štikonas f78c34778e Make shredSource radio button work again. 2014-05-29 02:45:36 +01:00
Andrius Štikonas 7fbae9ee29 Port to new Qt5 macro QStringLiteral and use stricter compile flags
Now compile with:
  -DQT_USE_QSTRINGBUILDER
  -DQT_NO_CAST_TO_ASCII
  -DQT_NO_CAST_FROM_ASCII
  -DQT_STRICT_ITERATORS
  -DQT_NO_URL_CAST_FROM_STRING
  -DQT_NO_CAST_FROM_BYTEARRAY
  -DQT_NO_SIGNALS_SLOTS_KEYWORDS
  -DQT_USE_FAST_OPERATOR_PLUS
2014-05-20 22:33:02 +01:00
Andrius Štikonas f3dd3157a6 Initial port to KDE Frameworks 5.
The port is mostly complete:
    * A few unported items are marked with FIXME: port KF5.
    * KCFG configuration for QGroupBox is not working yet.
2014-05-18 21:41:48 +01:00
Andrius Štikonas d1ae9dc4a7 Port away from KMenu. 2014-05-17 03:20:43 +01:00
Andrius Štikonas 81ce940171 Port away from KAction. 2014-05-17 03:12:10 +01:00
Andrius Štikonas dcdffadc3e Port away from KDialog. 2014-05-17 03:06:58 +01:00
Andrius Štikonas ed431cfcd5 Partially port away from KLocale.
KLocale was replaced with KLocalizedString and QLocale.
Only changes that do not break compilation with KDELibs4 are made.
2014-05-13 23:53:37 +01:00
Andrius Štikonas b2d299e18d Port away from KDebug.
Replace a few more kWarning() that were missed in the last commit.
2014-05-13 23:52:54 +01:00
Andrius Štikonas 59e5a656c5 Fix detection of partitions' paths.
Previously, partition number was added to device path.
However, there are devices with more complicated numbering scheme,
e.g. memory cards may have /dev/mmcblk0p1.
It seems that the easiest way to handle this is to use partition
path instead of device path + partition number .
BUG:256964

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1337488
2013-02-05 00:09:43 +00:00
Volker Lanz 6ab19a9c49 Remove unused slot for menu-bar-removal warning.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1329474
2012-12-22 12:29:36 +00:00
Volker Lanz 7ee70cf9bd Don't offer action to hide menu bar, it's a trap.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1324070
2012-11-05 09:25:27 +00:00
Volker Lanz d80b35382f log backend plugin and version when scanning devices. generally not a bad idea,
but currently required to make sure we run with the correct libparted version
during development.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1274437
2012-01-18 11:17:25 +00:00
Volker Lanz 8c25f446c8 naturally sort the list of devices we have no fs-support for
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1236306
2011-06-12 09:33:11 +00:00
Volker Lanz c4d159e6c5 krazy2 fixes
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1160573
2010-08-08 12:36:05 +00:00
Volker Lanz fe6f80379a make sure not to return false when isSectorBase() is called more than once.
make the heuristic to determine if a partition table is sector aligned a little
less dumb.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1140829
2010-06-21 15:49: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 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 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 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 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 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 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 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 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 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 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 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 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 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 40ae70af25 move config stuff to its own src subdir
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1105772
2010-03-21 11:32:31 +00:00
Volker Lanz 5ca58c6c1c introduce a CoreBackendManager class.
convert the plugins into true KDE plugins with desktop file and all.

let the user pick a backend in the config dialog and load backends on the fly.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1105758
2010-03-21 10:50:44 +00:00
Volker Lanz 9091e883e6 handle default button for custom widgets in configure dialog
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1102086
2010-03-11 19:40:42 +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 34278260f3 some wording and i18n fixes.
don't use amp in ui files, let KDE figure out the shortcuts in dialogs

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1102025
2010-03-11 16:34:48 +00:00
Volker Lanz 2e7510e816 add visibility to the config class
create an instance of the config in main() instead of the main window.

configure the backend plugin to load via the config file

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1101230
2010-03-09 17:13:22 +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 1bc2951102 the progress dialog is set to autoclose so it's not necessary to hide it in the
main window

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098231
2010-03-03 09:48:59 +00:00
Volker Lanz 4427937088 rename all progressChanged signals to progress for consistency
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098220
2010-03-03 09:18:59 +00:00
Volker Lanz 7f33130265 Add a ctor to CreatePartitionTableOperation that takes a PartitionTable
pointer, not a PartitionTable::Type. This is required for the import.

Add a basic import partition table feature to the GUI and make it work.

Add calls to PartitionManagerWidget::updatePartitions(),
MainWindow::enableActions() and the selectedPartitionChanged handler to the
operationsChanged handler to make sure the info pane and actions are always
updated when the operation stack changes (e.g. on undo). TODO: remove all
updatePartition() and similar calls from methods in PartitionManagerWidget.

Make the device properties action disabled per default and enable it only if a
device is selected. It's actually possible for no device to be selected if the
backend doesn't find any devices at all.

Fix status tips and markup.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1098154
2010-03-03 00:15:26 +00:00
Volker Lanz 3392940beb add basic export-partitiontable-feature
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1097939
2010-03-02 13:35:57 +00:00
Volker Lanz 2e82663ca9 update info pane when creating partition table
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1097656
2010-03-01 20:15:10 +00:00
Volker Lanz 856ef859eb rename msdos_vista to msdos and make sure to use sector-based-alignment instead
of vista. also use cylinder based instead of msdos legacy.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1097441
2010-03-01 12:00:07 +00:00
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 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 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 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 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 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 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 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 16dae55d04 revert 1077129: re-add devices list. this is just not usable with >4 devices
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1081529
2010-01-28 16:27:28 +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 4f5253e6a2 remove devices list
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1077129
2010-01-19 12:56:27 +00:00
Volker Lanz c98b1d702b yet another fix for info pane layout
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1077012
2010-01-19 10:31:42 +00:00
Volker Lanz 0ab5b8a0af somehow this little piece of code was lost: update the information pane's
layout when the user modifies the dock position.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1075831
2010-01-16 21:14:19 +00:00
Volker Lanz 8694682e72 Allow the info pane dock to be docked in any dock area.
Adjust to being docked at the top or bottom by layouting the information in
more columns than just two.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1073610
2010-01-12 14:36:16 +00:00
Volker Lanz ed2a78210d Revert the init-with-singleshot-timer hack because it seems to break the kpart
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957959
2009-04-23 07:27:27 +00:00
Volker Lanz d17aca5338 Clean up includes, forward defines and a few other things.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957555
2009-04-22 12:54:37 +00:00
Volker Lanz 1fa99f0341 Move QTreeWidget for the log output to its own class.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957548
2009-04-22 12:41:30 +00:00
Volker Lanz 0ff681dd8d Make the kcm work.
Don't use a hardcoded filename for the configuration; pass a name for the
configuration file to PartitionManagerWidget::init() instead, so the kcm and
the standalone app can each have an rc file of their own.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957525
2009-04-22 10:35:44 +00:00
Volker Lanz 0dc566ae2b remove commented out code
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957467
2009-04-22 07:59:09 +00:00
Volker Lanz 44eef78bc0 * Refactor MainWindow and split it up into several classes for the central
widget and the docks.
* Add a first version of a kcontrol kcm for KDE Partition Manager based on
  these refactored classes. Still a lot left to do, though.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=957231
2009-04-21 16:36:43 +00:00
Volker Lanz 9bda1ce0e4 Init the main window class in a slot called with a single shot timer to speed
up perceived startup time for the application.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=954798
2009-04-16 11:37:00 +00:00
Albert Astals Cid f7177b8319 this is a progress information, so use rescanning and not rescan
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=951849
2009-04-10 12:24:18 +00:00
Volker Lanz b663b3f273 Add context menu to list of operations.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=944420
2009-03-25 14:53:50 +00:00
Andrew Coles 9cbec4ebe4 Plural-form correction.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=941151
2009-03-18 23:27:36 +00:00
Volker Lanz 306667e09e Don't assume a device always has a valid partition table. This is the correct
fix for what I initially tried to fix with commit 898001.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=908045
2009-01-09 07:10:59 +00:00
Volker Lanz 80bee5cfc4 Merge the kpart stuff from branches/work/partitionmanager/kpartstuff and
disable it in the build by default.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=902274
2008-12-27 22:12:42 +00:00
Volker Lanz a7a090381f Fix text capitalization according to
http://techbase.kde.org/Projects/Usability/HIG/Capitalization

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=902032
2008-12-27 12:01:29 +00:00
Volker Lanz b97e5225be Output reason why a mount or unmount might have failed.
Patch by Marcel Partap <mpartap@gmx.net>

CCBUG: 178708


svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=901487
2008-12-25 16:46:40 +00:00
Volker Lanz 0f917174a5 Use itemDoubleClicked() instead of itemActivated() for partition tree widget.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=887243
2008-11-21 13:00:59 +00:00
Laurent Montel 8ae4bd939d Fix includes
svn path=/trunk/kdereview/partitionmanager/; revision=877306
2008-10-29 07:45:19 +00:00
Volker Lanz dcc0525184 Make krazy happy.
svn path=/trunk/playground/sysadmin/partitionmanager/; revision=869258
2008-10-08 16:26:10 +00:00
Volker Lanz 26d914e7c8 Don't allow creating a new partition table on a device with currently mounted
partitions.

svn path=/trunk/playground/sysadmin/partitionmanager/; revision=868375
2008-10-06 07:31:11 +00:00
Albert Astals Cid 58ee52dc31 missing comma
Spotted by mvillarino

svn path=/trunk/playground/sysadmin/partitionmanager/; revision=865408
2008-09-27 13:49:19 +00:00
Volker Lanz d6dc26bd90 import of KDE Partition Manager
svn path=/trunk/playground/sysadmin/partitionmanager/; revision=864431
2008-09-24 19:32:01 +00:00