[gnome-boxes] actions-popover: Add "Send file" option



commit 5386d2d7e723313229f3829f38dc30b1ce0e2b09
Author: Visarion Alexandru <viorel visarion gmail com>
Date:   Wed Nov 1 16:22:04 2017 +0200

    actions-popover: Add "Send file" option
    
    The problem is that with the current file transferring
    DnD mechanism, users may not be aware of the fact that they
    are able to send files to guests which have this ability.
    
    Using this option, in following patches users will also be
    able to transfer files to a SPICE guest using a more intuitive
    click of a button.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762321

 src/actions-popover.vala | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/actions-popover.vala b/src/actions-popover.vala
index 3c5c16f3..7a9e3d8c 100644
--- a/src/actions-popover.vala
+++ b/src/actions-popover.vala
@@ -9,7 +9,9 @@
         {"delete",          delete_activated},
         {"clone",           clone_activated},
         {"properties",      properties_activated},
-        {"restart",         restart_activated}
+        {"restart",         restart_activated},
+        {"send_file",       send_file_activated}
+
     };
 
     private AppWindow window;
@@ -43,6 +45,11 @@ public void update_for_item (CollectionItem item) {
             var action = action_group.lookup_action ("open-in-new-win") as GLib.SimpleAction;
             action.set_enabled (!importing);
         } else {
+            // Send files
+            section.append (_("Send Fileā€¦"), "box.send_file");
+            var action = action_group.lookup_action ("send_file") as GLib.SimpleAction;
+            action.set_enabled (machine.display.can_transfer_files);
+
             // Take Screenshot
             section.append (_("Take Screenshot"), "box.take_screenshot");
         }
@@ -154,6 +161,10 @@ private void clone_activated () {
         (window.current_item as Machine).clone.begin ();
     }
 
+    private void send_file_activated () {
+    }
+
+
     private void properties_activated () {
         window.show_properties ();
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]