Skip to content
  • Mike Fleetwood's avatar
    Display messages for encrypted file systems (#760080) · 2d910494
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    At the moment any messages for an encrypted file system aren't shown,
    only messages from the outer PartitionLUKS object are shown.  Also in
    Win_GParted::activate_paste() the selected Partition object, possibly
    a derived PartitionLUKS, is cloned and the messages cleared.
    
    Therefore a set of accessor methods must be provided to query and modify
    partition messages.  Messages will be stored in the Partition object to
    which they are added and retrieved from all.  So in the case of a
    derived PartitionLUKS they will be retrieved from the messages vector of
    the PartitionLUKS object itself and the messages vector for the
    encrypted file system it contains.
    
    To replace code like this in GParted_Core:
    
        partition_temp->messages = messages;
    
    We might naturally provide a set_messages() method which assigns the
    messages vector and is used like this:
    
        partition_temp->set_messages( messages );
    
    However on a PartitionLUKS object what should set_messages() do?  By the
    name it will replace any existing messages in the PartitionLUKS object
    itself, but what should happen to the messages for the contained
    encrypted Partition object?  Should they be cleared or left alone?
    Rather than implement set_messages() with unclear semantics implement
    append_messages(), which in the PartitionLUKS object case will clearly
    leave any messages for the contained encrypted Partition object alone.
    Append_messages() is then used to add messages as the Partition or
    PartitionLUKS objects when populating the data in GParted_Core.
    
    Bug 760080 - Implement read-only LUKS support
    2d910494