mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-03 20:10:08 +03:00
Rename class and add skeleton for windows and mac
Renamed Class to SimpleCommandViewer, and added instances for windows and mac. Currently thos classes work the same as the default behaviour.
This commit is contained in:
parent
0b5e2f3e7e
commit
79e091c880
|
@ -48,7 +48,7 @@ def show(image, title=None, command=None, **options):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def _showWithCommand(image,command,**options):
|
def _showWithCommand(image,command,**options):
|
||||||
viewer = CustomCommandViewer(command)
|
viewer = SimpleCommandViewer(command)
|
||||||
#TODO: Should we register these viewers and see if there is already a
|
#TODO: Should we register these viewers and see if there is already a
|
||||||
#viewer for this command?
|
#viewer for this command?
|
||||||
viewer.show(image,**options)
|
viewer.show(image,**options)
|
||||||
|
@ -113,6 +113,9 @@ if sys.platform == "win32":
|
||||||
|
|
||||||
register(WindowsViewer)
|
register(WindowsViewer)
|
||||||
|
|
||||||
|
class SimpleCommandViewer(WindowsViewer):
|
||||||
|
pass
|
||||||
|
|
||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
|
|
||||||
class MacViewer(Viewer):
|
class MacViewer(Viewer):
|
||||||
|
@ -126,6 +129,9 @@ elif sys.platform == "darwin":
|
||||||
|
|
||||||
register(MacViewer)
|
register(MacViewer)
|
||||||
|
|
||||||
|
class SimpleCommandViewer(MacViewer):
|
||||||
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
# unixoids
|
# unixoids
|
||||||
|
@ -150,10 +156,9 @@ else:
|
||||||
|
|
||||||
# implementations
|
# implementations
|
||||||
|
|
||||||
class CustomCommandViewer(UnixViewer):
|
class SimpleCommandViewer(UnixViewer):
|
||||||
|
|
||||||
def __init__(self,command):
|
def __init__(self,command):
|
||||||
super(CustomCommandViewer, self).__init__()
|
super(SimpleCommandViewer, self).__init__()
|
||||||
self._command = command
|
self._command = command
|
||||||
|
|
||||||
def get_command_ex(self, file, **options):
|
def get_command_ex(self, file, **options):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user