Commit 852b847c authored by Jakub Janků's avatar Jakub Janků Committed by Frediano Ziglio
Browse files

spice-gtk-session: add clipboard_get_open_webdav()

File copy&paste functionality will only be enabled when there is an open
webdav channel.
Signed-off-by: Jakub Janků's avatarJakub Janků <>
Acked-by: Frediano Ziglio's avatarFrediano Ziglio <>
parent c1b54338
......@@ -565,6 +565,32 @@ static gpointer free_weak_ref(gpointer data)
return object;
static SpiceWebdavChannel *clipboard_get_open_webdav(SpiceSession *session)
GList *list, *l;
SpiceChannel *channel = NULL;
gboolean open = FALSE;
g_return_val_if_fail(session != NULL, NULL);
list = spice_session_get_channels(session);
for (l = g_list_first(list); l != NULL; l = g_list_next(l)) {
channel = l->data;
if (!SPICE_IS_WEBDAV_CHANNEL(channel)) {
g_object_get(channel, "port-opened", &open, NULL);
return open ? SPICE_WEBDAV_CHANNEL(channel) : NULL;
static void clipboard_get_targets(GtkClipboard *clipboard,
GdkAtom *atoms,
gint n_atoms,
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