Skip to content

Commit

Permalink
feat: Show overview for btrfs setup in overview page and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilez0 committed Apr 13, 2024
1 parent 043acb9 commit 80bca81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions live-installer/frontend/gtk_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,15 @@ def bold(strvar):
if p.mount_as:
model.append(top, (bold(_("Mount %(path)s as %(mount)s") % {
'path': p.path, 'mount': p.mount_as}),))
for p in self.setup.partitions:
if (p.type == "btrfs" or p.format_as == "btrfs") and p.subvolumes != []:
for subvol in p.subvolumes:
model.append(top, (bold(_("Create btrfs subvolume %(path)s under %(parentPath)s ") % {
'path': subvol.name, 'parentPath': p.path}),))
for subvol in p.subvolumes:
if subvol.mount_as:
model.append(top, (bold(_("Mount %(path)s subvolume as %(mount)s") % {
'path': subvol.name, 'mount': subvol.mount_as}),))
if config.get("lvm_enabled", True):
_lvm = self.builder.get_object("check_lvm").get_active()
_lux = self.builder.get_object("check_encrypt").get_active()
Expand Down
4 changes: 2 additions & 2 deletions live-installer/frontend/partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def partitions_popup_menu(widget, event):
menu.append(menuItem)

# if the selected "partition" is a subvolume then show a custom menu
if partition_type == "btrfs subvolume":
if partition_type == _("btrfs subvolume"):
mount_points = ["/", "/home", "/var", "/tmp", "/srv", "/opt"]
for mount_point in mount_points:
menuItem = Gtk.MenuItem(_("Assign to %s") % mount_point)
Expand Down Expand Up @@ -802,7 +802,7 @@ def __init__(self, path, mount_as, format_as, typevar, read_only=False):
def show_chkbtn_btrfs_subvols(self,widget):
w = self.builder.get_object("combobox_use_as")
format_as = w.get_model()[w.get_active()][0]
if format_as == _("btrfs"):
if format_as == "btrfs":
self.builder.get_object("checkbutton_default_btrfs_subvols").set_visible(True)
else:
self.builder.get_object("checkbutton_default_btrfs_subvols").set_visible(False)
Expand Down

0 comments on commit 80bca81

Please sign in to comment.