def set_image_from_path(self, path): if not os.path.isfile(path): return self.set_from_resource(path) logging.debug("Change icon path %s" % path) self.pixbuf = create_pixbuf_from_path(path, self.size) self.set_from_pixbuf(self.pixbuf)
def _set_image_from_path(self, path, size): if not os.path.isfile(path): path = get_foobnix_resourse_path_by_name(path) self._pixbuf = create_pixbuf_from_path(path, size) logging.debug("Change icon path %s" % path) self._resource = path
def append_icon(self, calling_object, icon_path, active=False): try: pixbuf = create_pixbuf_from_path(icon_path, self.ICON_SIZE) self.model.append([pixbuf, icon_path]) if active: calling_object.combobox.set_active(len(self.model) - 1) except Exception as e: logging.error(e)
def set_image_from_path(self, path): self.pixbuf = create_pixbuf_from_path(path, self.size) self.set_from_pixbuf(self.pixbuf)