Skip to content

Commit

Permalink
check if the partition has a supported filesystem on it
Browse files Browse the repository at this point in the history
  • Loading branch information
muhdsalm authored and taukakao committed Nov 27, 2024
1 parent 9e3b657 commit 18bafef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vanilla_installer/defaults/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PartitionRow(Adw.ActionRow):

__siblings: list

__partition_fs_types = ["unformatted", "btrfs", "ext4", "ext3", "fat32", "xfs"]
__partition_fs_types = ["btrfs", "ext4", "ext3", "fat32", "xfs"]

def __init__(self, page, parent, partition, modifiable, default_fs, **kwargs):
super().__init__(**kwargs)
Expand All @@ -83,7 +83,10 @@ def __init__(self, page, parent, partition, modifiable, default_fs, **kwargs):
self.__add_dropdown()

def __add_dropdown(self):
fs_dropdown = Gtk.DropDown.new_from_strings(self.__partition_fs_types)
if self.__partition.fs_type in self.__partition_fs_types:
fs_dropdown = Gtk.DropDown.new_from_strings(["unformatted"] + self.__partition_fs_types)
else:
fs_dropdown = Gtk.DropDown.new_from_strings(self.__partition_fs_types)
fs_dropdown.set_valign(Gtk.Align.CENTER)
fs_dropdown.set_visible(False)

Expand Down

0 comments on commit 18bafef

Please sign in to comment.