Skip to content

Commit

Permalink
fix attachments paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvladus committed May 12, 2024
1 parent 295b328 commit d6109a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions errands/widgets/shared/attachments_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __confirm(dialog: Gtk.FileDialog, res) -> None:
try:
file: Gio.File = dialog.open_finish(res)
except Exception as e:
Log.debug(f"Attachments: Cancelled. {e}")
Log.debug(f"Attachments: Selecting file cancelled. {e}")
return

path: str = file.get_path()
Expand Down Expand Up @@ -126,7 +126,8 @@ def __build_ui(self) -> None:
self.connect("activated", self.__on_click)

def __on_click(self, *_args):
os.system(f"xdg-open {self.path}")
file: Gio.File = Gio.File.new_for_path(self.path)
Gtk.FileLauncher(file=file).launch(State.main_window, None)

def __on_delete_btn_clicked(self, _btn: ErrandsButton):
task: Task = State.attachments_window.task
Expand Down
1 change: 0 additions & 1 deletion errands/widgets/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ def __build_ui(self):
icon_name="errands-attachment-symbolic",
css_classes=["flat"],
on_click=lambda *_: State.attachments_window.show(self),
visible=False,
)

# Menu button
Expand Down
1 change: 0 additions & 1 deletion errands/widgets/today/today_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def __build_ui(self):
icon_name="errands-attachment-symbolic",
css_classes=["flat"],
on_click=lambda *_: State.attachments_window.show(self),
visible=False,
)

# Menu button
Expand Down
3 changes: 2 additions & 1 deletion io.github.mrvladus.List.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"--talk-name=org.freedesktop.secrets",
"--talk-name=org.freedesktop.Flatpak",
"--talk-name=org.gnome.OnlineAccounts",
"--filesystem=xdg-config/autostart"
"--filesystem=xdg-config/autostart",
"--filesystem=home"
],
"cleanup": [
"/lib/debug",
Expand Down

0 comments on commit d6109a1

Please sign in to comment.