[gparted] Add comment summarising current operation merging rules (#755214)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add comment summarising current operation merging rules (#755214)
- Date: Tue, 29 Sep 2015 18:43:04 +0000 (UTC)
commit 27e5bbeeceff47539cbad1a3d228a7a0187c95cb
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Sep 19 09:17:43 2015 +0100
Add comment summarising current operation merging rules (#755214)
This information is already documented in the existing comments
associated with the calls to merge_operations() and assignments to the
mergetype variables. The table just summaries the rules together in one
place.
Bug 755214 - Refactor operation merging
src/Win_GParted.cc | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 5f03c65..18d642b 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -758,6 +758,30 @@ bool Win_GParted::merge_two_operations( unsigned int first, unsigned int second
return false;
}
+// Try to merge pending operations in the operations[] vector using the specified merge
+// type.
+//
+// Summary of all the operation merging rules for each operation type coded into the
+// ::activate_*() methods:
+//
+// Operation type Partition status Merge type Method
+// ----------------- ---------------- -------------------- -----------------
+// resize/move Real MERGE_LAST_WITH_PREV activate_resize()
+// resize/move New MERGE_LAST_WITH_ANY activate_resize()
+// paste * none activate_paste()
+// new * none activate_new()
+// delete Real none activate_delete()
+// delete New MERGE_ALL_ADJACENT activate_delete()
+// format Real MERGE_LAST_WITH_PREV activate_format()
+// format New MERGE_LAST_WITH_ANY activate_format()
+// check Real [1] MERGE_LAST_WITH_ANY activate_check()
+// label file system Real [1] MERGE_LAST_WITH_ANY activate_label_filesystem()
+// name partition Real [1] MERGE_LAST_WITH_ANY activate_name_partition()
+// new UUID Real [1] MERGE_LAST_WITH_ANY activate_change_uuid()
+//
+// [1] The UI only allows these operations to be applied to real partitions; where as the
+// other mergeable operations can be applied to both real partitions and new, pending
+// create partitions.
void Win_GParted::merge_operations( MergeType mergetype )
{
unsigned int num_ops = operations.size();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]