Skip to content
  • Felipe Borges's avatar
    shared-folders: Decouple from SpiceDisplay · 99887552
    Felipe Borges authored
    The current implementation of Shared Folders was strictly tied to
    the Spice Display, because spice-webdav is the bridge that makes
    this feature possible with libvirt machines. But now we could also
    have shared folders in RDP Remote Machines. Therefore decoupling
    the shared folders implementation from the spice-display class was
    a natural choice.
    
    The way it works now is that there's a central singleton object
    named SharedFoldersManager that interfaces everything that is
    necessary for the feature to work in the host side (saving the
    gsettings, creating the symlinks, etc...).
    
    The basic API for the SharedFoldersManager is to query for shared
    folders with SharedFoldersManager.get_folders (machine_uuid), and
    add/remove items, since SharedFoldersManager implements the
    Boxes.Collection interface.
    
    These changes also make the use of cleaner methods of implementing
    the functionality, such as decoupling the logic and view with Gtk
    widget templates, and the use of GLib.ListStore models to back the
    Gtk.ListBox views (giving us free ordering, sorting, and row
    updates).
    99887552