mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-12 17:22:28 +03:00
add eog support for Ubuntu Image Viewer
This commit is contained in:
parent
929d165d8d
commit
2bb78e54f3
|
@ -156,17 +156,20 @@ else:
|
||||||
|
|
||||||
# implementations
|
# implementations
|
||||||
|
|
||||||
# The default Image Viewer of Ubuntu using the command "eog" in the terminal.
|
|
||||||
# Reference: https://help.gnome.org/users/eog/stable/commandline.html.en
|
|
||||||
|
|
||||||
class DisplayViewer(UnixViewer):
|
class DisplayViewer(UnixViewer):
|
||||||
def get_command_ex(self, file, **options):
|
def get_command_ex(self, file, **options):
|
||||||
command = executable = "display" or "eog"
|
command = executable = "display"
|
||||||
return command, executable
|
return command, executable
|
||||||
|
|
||||||
|
class EogViewer(UnixViewer):
|
||||||
|
def get_command_ex(self, file, **options):
|
||||||
|
command = executable = "eog"
|
||||||
|
return command, executable
|
||||||
|
|
||||||
if which("display" or "eog"):
|
if which("display"):
|
||||||
register(DisplayViewer)
|
register
|
||||||
|
elif which("eog"):
|
||||||
|
register(EogViewer)
|
||||||
|
|
||||||
class XVViewer(UnixViewer):
|
class XVViewer(UnixViewer):
|
||||||
def get_command_ex(self, file, title=None, **options):
|
def get_command_ex(self, file, title=None, **options):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user