Пример #1
0
 def pathFor(self, filename):
     dst = Meta.newThumbnail(filename)
     self._zipobj.extract(filename, os.path.dirname(dst))
     os.rename(os.path.join(os.path.dirname(dst), filename), dst)
     return dst
Пример #2
0
 def dropEvent(self, event):
     src = event.mimeData().urls()[0].toLocalFile()
     dst = Meta.newThumbnail(src)
     shutil.copyfile(src, dst)
     cmd = commands.ChangeConfigurationThumbnailCommand(configuration=self.configuration(), filename=dst)
     self.history().run(cmd)