diff --git a/src/installType.py b/src/installType.py index 689110b..b234145 100644 --- a/src/installType.py +++ b/src/installType.py @@ -41,21 +41,6 @@ class Types(): def fstype(self, radiobutton, val): self.ne = val - # if self.ne == "ufs": - # self.none.set_active(True) - # self.grub.set_sensitive(False) - # self.bsd.set_sensitive(False) - # self.none.set_sensitive(True) - # elif self.ne == "custom": - # self.grub.set_active(True) - # self.grub.set_sensitive(True) - # self.bsd.set_sensitive(True) - # self.none.set_sensitive(True) - # elif self.ne == "zfs": - # self.grub.set_active(True) - # self.grub.set_sensitive(True) - # self.bsd.set_sensitive(False) - # self.none.set_sensitive(False) pass_file = open(signal, 'w') pass_file.writelines(self.ne) pass_file.close @@ -67,23 +52,17 @@ class Types(): def get_model(self): return self.vbox1 - def boot_manager(self, radiobutton, val): - self.boot = val - boot = open(boot_file, 'w') - boot.writelines(self.boot) - boot.close() - def __init__(self): self.vbox1 = Gtk.VBox(False, 0) self.vbox1.show() - label = Gtk.Label("Installation Type And Boot Manager", name="Header") + label = Gtk.Label("Installation Type", name="Header") label.set_property("height-request", 40) self.vbox1.pack_start(label, False, False, 0) - bbox = Gtk.VBox() + vbox = Gtk.VBox() hbox = Gtk.HBox() self.vbox1.pack_start(hbox, False, False, 10) full_ufs = Gtk.RadioButton.new_with_label_from_widget(None, "UFS Full Disk Configuration") - bbox.pack_start(full_ufs, False, True, 10) + vbox.pack_start(full_ufs, False, True, 10) full_ufs.connect("toggled", self.fstype, "ufs") self.ne = 'zfs' pass_file = open(signal, 'w') @@ -91,49 +70,12 @@ class Types(): pass_file.close full_ufs.show() custom_ufs = Gtk.RadioButton.new_with_label_from_widget(full_ufs, "UFS Custom Disk Configuration") - bbox.pack_start(custom_ufs, False, True, 10) + vbox.pack_start(custom_ufs, False, True, 10) custom_ufs.connect("toggled", self.fstype, "custom") custom_ufs.show() full_zfs = Gtk.RadioButton.new_with_label_from_widget(custom_ufs, "ZFS Full Disk Configuration(Recommended option for BE)") - bbox.pack_start(full_zfs, False, True, 10) + vbox.pack_start(full_zfs, False, True, 10) full_zfs.connect("toggled", self.fstype, "zfs") full_ufs.show() - hbox.pack_start(bbox, False, False, 50) + hbox.pack_start(vbox, False, False, 50) full_zfs.set_active(True) - # Boot option. - box3 = Gtk.VBox(False, 0) - box3.set_border_width(10) - self.vbox1.pack_start(box3, False, False, 0) - box3.show() - label = Gtk.Label('Boot Manager Option') - label.set_use_markup(True) - box3.pack_start(label, False, False, 10) - hbox = Gtk.HBox() - hbox.show() - box3.pack_start(hbox, True, True, 0) - bbox1 = Gtk.VBox() - bbox1.show() - self.grub = Gtk.RadioButton.new_with_label_from_widget(None, "Install Grub 2") - # bbox1.pack_start(self.grub, False, True, 10) - self.grub.connect("toggled", self.boot_manager, "grub") - self.grub.show() - self.grub.set_sensitive(False) - self.bsd = Gtk.RadioButton.new_with_label_from_widget(None, "Install FreeBSD boot manager + loader(MBR only)") - bbox1.pack_start(self.bsd, False, True, 10) - self.bsd.connect("toggled", self.boot_manager, "bsd") - self.bsd.show() - # self.bsd.set_sensitive(False) - self.none = Gtk.RadioButton.new_with_label_from_widget(self.bsd, "BIOS: loader only UEFI: install Refind") - bbox1.pack_start(self.none, False, True, 10) - self.none.connect("toggled", self.boot_manager, "none") - self.none.show() - hbox.pack_start(bbox1, False, False, 50) - self.none.set_active(True) - self.boot = "none" - boot = open(boot_file, 'w') - boot.writelines(self.boot) - boot.close() - self.box3 = Gtk.VBox(False, 0) - self.box3.set_border_width(0) - self.vbox1.pack_start(self.box3, True, True, 0) - return diff --git a/src/partition.py b/src/partition.py index 3b47a5c..7f5a2c4 100644 --- a/src/partition.py +++ b/src/partition.py @@ -41,7 +41,7 @@ from db_partition import partition_query, label_query, bios_or_uefi from db_partition import autoDiskPartition, autoFreeSpace, first_is_free from db_partition import createLabel, scheme_query, how_partition from db_partition import diskSchemeChanger, createSlice, createPartition -from partition_handler import efi_exist +from db_partition import efi_exist # Folder use pr the installer. @@ -729,4 +729,4 @@ class Partitions(): def get_model(self): self.tree_selection.select_path(0) - return self.box1 + return self.vbox1