[gnome-boxes] spice-display: Show progress for SPICE file transfers
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] spice-display: Show progress for SPICE file transfers
- Date: Mon, 5 Feb 2018 14:56:58 +0000 (UTC)
commit 63f9b30c34b6934c9bf7d589dbbcf762f134c26c
Author: Visarion Alexandru <viorel visarion gmail com>
Date: Sat Nov 11 20:19:16 2017 +0200
spice-display: Show progress for SPICE file transfers
Display the UI for a new file transfer, using the UI elements
implemented in previous patches
https://bugzilla.gnome.org/show_bug.cgi?id=762321
Fixes #81
src/spice-display.vala | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 3dd02eaf..37369a93 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -89,10 +89,12 @@ private string get_box_name () {
});
can_grab_mouse = main_channel.mouse_mode != 2;
+ new_file_transfer_id = main_channel.new_file_transfer.connect (on_new_file_transfer);
}
}
ulong main_event_id;
ulong main_mouse_mode_id;
+ ulong new_file_transfer_id;
private void main_cleanup () {
if (main_channel == null)
@@ -103,6 +105,8 @@ private void main_cleanup () {
main_event_id = 0;
o.disconnect (main_mouse_mode_id);
main_mouse_mode_id = 0;
+ o.disconnect (new_file_transfer_id);
+ new_file_transfer_id = 0;
main_channel = null;
}
@@ -500,6 +504,11 @@ public override void transfer_files (GLib.List<string> uris) {
main_file_copy_async.begin (main_channel, files, FileCopyFlags.NONE, null, null);
}
+ private void on_new_file_transfer (Spice.MainChannel main_channel, Object transfer_task) {
+ DisplayPage page = machine.window.display_page;
+ page.add_transfer (transfer_task);
+ }
+
public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
var list = new List<Boxes.Property> ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]