Commits

Ikey Doherty  committed a909959

Add factory method (demo code)

  • Participants
  • Parent commits 1d30d14

Comments (0)

Files changed (1)

File src/core/disk/schemes.vala

 
    /** Construct a new PartitionScheme */
    public PartitionScheme (string? name) {
+	GETTEXT_INIT ();
 	this.name = name;
    }
 
+   /** Construct a new PartitionScheme for the given disk */
+   public static PartitionScheme[] for_disk (Installer.Disk disk) {
+	// We need to query the size and what not of the disk in future.
+	return new PartitionScheme[] {
+		new PartitionScheme (_("Use entire disk")),
+		new PartitionScheme (_("Partition manually")) // could probably nuke this in future, demo purpose atm.
+	};
+   }
+
 } // End class def
 
 } // End namespace Installer