Moved mirage2 to use newer GTK template structure patterns
This commit is contained in:
@@ -18,8 +18,8 @@ class Image(Gtk.EventBox):
|
||||
def __init__(self, path: str):
|
||||
super(Image, self).__init__()
|
||||
|
||||
self._thumbnail_with = settings.get_thumbnail_with()
|
||||
self._thumbnail_height = settings.get_thumbnail_height()
|
||||
self._thumbnail_with = settings_manager.settings.config.thumbnail_with
|
||||
self._thumbnail_height = settings_manager.settings.config.thumbnail_height
|
||||
self.is_loaded = False
|
||||
self.image = None
|
||||
self.path = path
|
||||
@@ -45,7 +45,7 @@ class Image(Gtk.EventBox):
|
||||
|
||||
def set_image_to_view(self, widget = None, eve = None):
|
||||
if eve.button == 1:
|
||||
event_system.emit("handle_file_from_dnd", (self.path, ))
|
||||
event_system.emit("handle-file-from-dnd", (self.path, ))
|
||||
|
||||
def load_pixbuf(self):
|
||||
self.set_from_pixbuf( self.get_pixbuf_data(self.path, \
|
||||
@@ -56,7 +56,7 @@ class Image(Gtk.EventBox):
|
||||
def set_from_pixbuf(self, pixbuf):
|
||||
self.image.set_from_pixbuf(pixbuf)
|
||||
|
||||
def get_pixbuf_data(self, path, w = 126, h = 126):
|
||||
def get_pixbuf_data(self, path: str, w: int = 126, h: int = 126):
|
||||
path = self.path if not path else path
|
||||
pixbuf = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user