Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial network drag and drop #1493

Closed
totaam opened this issue Apr 10, 2017 · 10 comments
Closed

initial network drag and drop #1493

totaam opened this issue Apr 10, 2017 · 10 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Apr 10, 2017

Issue migrated from trac ticket # 1493

component: client | priority: major | resolution: fixed

2017-04-10 08:27:33: antoine created the issue


This is different from intra application drag-n-drop (#770), which was difficult enough to enable.

The html5 client already supports drag and drop of files since r15370.

We should support at least as much in the python client.

@totaam
Copy link
Collaborator Author

totaam commented Apr 10, 2017

2017-04-10 08:42:59: antoine changed owner from antoine to afarr

@totaam
Copy link
Collaborator Author

totaam commented Apr 10, 2017

2017-04-10 08:42:59: antoine commented


Done in r15546.

Here's the "-d dragndrop" output from the client as I drop 2 files onto a client window:

drag_motion_cb(ClientWindow(1), <gtk.gdk.DragContext object at 0x7fa3f1f81d70 (GdkDragContext at 0x5632c2d8d1c0)>, 354, 123, 70261214)
(..)
drag_drop_cb(ClientWindow(1), <gtk.gdk.DragContext object at 0x7fa3f1f81d70 (GdkDragContext at 0x5632c2d8d1c0)>, 354, 122, 70261240) \
    targets=['x-special/gnome-icon-list', 'text/uri-list', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'STRING', 'text/plain;charset=utf-8', 'text/plain']
drag_got_data_cb(ClientWindow(1), <gtk.gdk.DragContext object at 0x7fa3f1f81a50 (GdkDragContext at 0x5632c2d8d1c0)>, 354, 122, <GtkSelectionData at 0x7fff184037e0>, 80, 70261240)
drag_got_data_cb context: source_window=0x3a98d79, dest_window=0x2a00098, suggested_action=<flags GDK_ACTION_COPY of type GdkDragAction>, \
    actions=<flags GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK of type GdkDragAction>, \
    targets=['x-special/gnome-icon-list', 'text/uri-list', 'UTF8_STRING', 'COMPOUND_TEXT', 'TEXT', 'STRING', 'text/plain;charset=utf-8', 'text/plain']
drag_got_data_cb selection: data type=text/uri-list, format=8, length=110, target=text/uri-list, text=None, \
    uris=('file:_home/antoine/Fiber-Internet-201606-201607-2568THB.png', 'file:/_home/antoine/thailand-weather-map.png')
drag_got_data_cb: will try to upload: ['/home/antoine/Fiber-Internet-201606-201607-2568THB.png', '/home/antoine/thailand-weather-map.png']
got_file_info(<__main__.GLocalFile at 0x7fa3f1f81e10: file:///home/antoine/Fiber-Internet-201606-201607-2568THB.png>, <__main__.GTask object at 0x7fa3f1f81d70 (GTask at 0x5632c2da7440)>)
file_info(/home/antoine/thailand-weather-map.png)=<gio.FileInfo object at 0x7fa3f1f81f00 (GFileInfo at 0x7fa3d4005210)> ctype=image/png, size=1152655
got_file_info(<__main__.GLocalFile at 0x7fa3f1f81d70: file:///home/antoine/thailand-weather-map.png>, <__main__.GTask object at 0x7fa3f1f81e10 (GTask at 0x5632c2da7100)>)
file_info(/home/antoine/thailand-weather-map.png)=<gio.FileInfo object at 0x7fa3f1f81fa0 (GFileInfo at 0x7fa3d4005800)> ctype=image/png, size=1463040
got_file_data(<__main__.GLocalFile at 0x7fcee4b79910: file:///home/antoine/Fiber-Internet-201606-201607-2568THB.png>, <__main__.GTask object at 0x7fcee4b79780 (GTask at 0x55a26eb0e440)>, ('/home/antoine/thailand-weather-map.png', True)) entity=1491198624:747710
sending file Fiber-Internet-201606-201607-2568THB.png (1152655 bytes)
got_file_data(<__main__.GLocalFile at 0x7fcee4b79910: file:///home/antoine/thailand-weather-map.png>, <__main__.GTask object at 0x7fcee4b799b0 (GTask at 0x55a26eb0e2a0)>, ('/home/antoine/thailand-weather-map.png', True)) entity=1483876226:373767
sending file thailand-weather-map.png (1463040 bytes)

The two files I had dropped immediately showed up in new windows as the server had been started with --open-files=yes.

@afarr: just a FYI, not sure you care about this feature.
Will follow up in #1494

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:07:11: maxmylyn commented


Before I close this:

Is this meant to work with applications? As in, if I drag an image locally and send it remotely into a word processor, will the image show up? Same thing for uploading a photo to...somewhere.

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:56:26: antoine changed owner from afarr to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:56:26: antoine commented


Is this meant to work with applications? As in, if I drag an image locally and send it remotely into a word processor, will the image show up? Same thing for uploading a photo to...somewhere.
No. To handle drag and drop interactively with the remote application, you want #1494.

What this allows you to do is to drop files onto an xpra window and have them uploaded and opened with the default system application for this type of file type - the application window you drop it onto is not used for anything.

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:57:44: maxmylyn commented


Okay, then noted. (seems to do exactly that) Closing.

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:57:56: maxmylyn changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:57:56: maxmylyn set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jun 20, 2017

2017-06-20 21:57:56: maxmylyn commented


(okay actually doing the close)

@totaam totaam closed this as completed Jun 20, 2017
@totaam
Copy link
Collaborator Author

totaam commented Nov 15, 2017

2017-11-15 12:04:00: antoine commented


Wiki page: [/wiki/DragAndDrop drag and drop]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant