Skip to content
Commit 7a4a375e authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Remove Set_Data() from the copy, resize/move and new dialog class APIs

The copy, resize/move and new dialog classes (Dialog_Partition_Copy,
Dialog_Partition_Resize_Move and Dialog_Partition_New respectively) had
to be used like this:

    construct dialog object passing some parameters
    call Set_Data() to pass more parameters
    run() dialog
    call Get_New_Partition()

There is nothing in the classes which forces Set_Data() to be called,
but it must be called for the dialogs to work and prevent GParted from
crashing.

Make these class APIs safer by making it impossible to program
incorrectly in this regard.  Move all the additional parameters from
each Set_Data() method to each constructor.  The constructors just call
the now private set_data() methods.
parent 32a5ace1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment