Skip to content

Commit

Permalink
places: Fix updating devices mount paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tchx84 committed Aug 11, 2023
1 parent c450a29 commit 74b60ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/place.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ class PortfolioPlace(Adw.ActionRow):
uuid = ""
encrypted = None
device = None

def set_subtitle_sately(self, subtitle):
if subtitle is not None:
self.set_subtitle(subtitle)
4 changes: 2 additions & 2 deletions src/places.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def _add_place(self, group, icon, name, path):
place = PortfolioPlace()
place.set_icon_name(icon)
place.set_title(name)
place.set_subtitle(path)
place.set_subtitle_sately(path)
place.path = path
place.props.activatable = True
place.connect("activated", self._on_place_activated)
Expand Down Expand Up @@ -287,7 +287,7 @@ def _update_place_from_device(self, place, device):

place.path = device.mount_point
place.set_title(device.label)
place.set_subtitle(device.mount_point)
place.set_subtitle_sately(device.mount_point)

def _on_place_activated(self, place):
if place.path is not None:
Expand Down

0 comments on commit 74b60ac

Please sign in to comment.