[gnome-disk-utility] No format option for extended partitions



commit 549169866d9481d6b0a9eb6aa2fa1a98a8121dca
Author: Kai Lüke <kailueke riseup net>
Date:   Sat Oct 14 12:21:29 2017 +0900

    No format option for extended partitions
    
    Formatting extended partitions is not allowed,
    and results in an error message. They have to be
    deleted and recreaded as primary partitions.
    
    Hide the format action for partitions which are
    only containers for other partitions,
    i.e. extended partitions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787231

 src/disks/gduwindow.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/disks/gduwindow.c b/src/disks/gduwindow.c
index 8d2c1a4..e8aa6c5 100644
--- a/src/disks/gduwindow.c
+++ b/src/disks/gduwindow.c
@@ -2609,7 +2609,8 @@ update_device_page_for_block (GduWindow          *window,
           show_flags->volume_menu |= SHOW_FLAGS_VOLUME_MENU_RESTORE_VOLUME_IMAGE;
           if (udisks_block_get_hint_partitionable (block))
             show_flags->drive_menu |= SHOW_FLAGS_DRIVE_MENU_FORMAT_DISK;
-          show_flags->volume_menu |= SHOW_FLAGS_VOLUME_MENU_FORMAT_VOLUME;
+          if (partition == NULL || !udisks_partition_get_is_container (partition))
+            show_flags->volume_menu |= SHOW_FLAGS_VOLUME_MENU_FORMAT_VOLUME;
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]