def _on_screenshot_download_complete(self, loader, screenshot_path):
try:
self.screenshot_pixbuf = GdkPixbuf.Pixbuf.new_from_file(
screenshot_path)
except Exception, e:
LOG.exception("Pixbuf.new_from_file() failed")
self.loader.emit('error', GObject.GError, e)
return False
#context = self.button.get_style_context()
tw, th = self.MAX_SIZE_CONSTRAINTS
pb = self._downsize_pixbuf(self.screenshot_pixbuf, tw, th)
self.button.image.set_from_pixbuf(pb)
self.ready = True
self.display_image()
评论列表
文章目录