fix: if background picture is a path and not uri

This commit is contained in:
0xMRTT 2022-09-04 16:57:46 +02:00
parent 8a515e2c0c
commit e1005c7ddd
No known key found for this signature in database
GPG key ID: AC9E06BF3DECB6FB

View file

@ -104,9 +104,9 @@ class GradienceMainWindow(Adw.ApplicationWindow):
"picture-uri")
buglog(picture_uri)
if picture_uri.startswith("file://"):
self.monet_image_file = Gio.File.new_for_path(picture_uri)
else:
self.monet_image_file = Gio.File.new_for_uri(picture_uri)
else:
self.monet_image_file = Gio.File.new_for_path(picture_uri)
image_basename = self.monet_image_file.get_basename()
buglog(image_basename)
self.monet_image_file = self.monet_image_file.get_path()