Commit 37c973e1 authored by Harish Fulara's avatar Harish Fulara Committed by Alexandru Băluț

greeter: Defer loading of project thumbnails

parent cb47d926
Pipeline #21014 passed with stage
in 48 minutes and 30 seconds
......@@ -24,6 +24,7 @@ from gettext import gettext as _
from gi.repository import Gdk
from gi.repository import GES
from gi.repository import Gio
from gi.repository import GLib
from gi.repository import Gtk
from pitivi.configure import get_ui_dir
......@@ -58,13 +59,20 @@ class ProjectInfoRow(Gtk.ListBoxRow):
# show it during projects removal screen.
self.select_button.hide()
builder.get_object("project_thumbnail").set_from_pixbuf(Project.get_thumb(self.uri))
self.__thumb = builder.get_object("project_thumbnail")
# Defer loading of thumbnail.
GLib.idle_add(self.__load_thumb_cb)
builder.get_object("project_name_label").set_text(self.name)
builder.get_object("project_uri_label").set_text(
beautify_project_path(recent_project_item.get_uri_display()))
builder.get_object("project_last_updated_label").set_text(
beautify_last_updated_timestamp(recent_project_item.get_modified()))
def __load_thumb_cb(self):
self.__thumb.set_from_pixbuf(Project.get_thumb(self.uri))
return False
# pylint: disable=too-many-instance-attributes
class GreeterPerspective(Perspective):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment