mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +02:00
screenshots button
This commit is contained in:
@@ -247,3 +247,10 @@ class SoftwareManager(ABC):
|
||||
@abstractmethod
|
||||
def launch(self, pkg: SoftwarePackage):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_screenshots(self, pkg: SoftwarePackage) -> List[str]:
|
||||
"""
|
||||
:return: screenshot urls for the given package
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -169,6 +169,12 @@ class SoftwarePackage(ABC):
|
||||
"""
|
||||
pass
|
||||
|
||||
def has_screenshots(self) -> bool:
|
||||
"""
|
||||
:return: if there are screenshots to be displayed
|
||||
"""
|
||||
return not self.installed
|
||||
|
||||
def __str__(self):
|
||||
return '{} (id={}, name={})'.format(self.__class__.__name__, self.id, self.name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user