masneyb / gftp

gFTP is a free multithreaded file transfer client for *NIX based machines. 56 language translations available.
http://www.gftp.org
MIT License
116 stars 21 forks source link

Keyboard shortcut for moving files from remote to local #152

Open agustiner opened 1 year ago

agustiner commented 1 year ago

Hi, thanks for making gftp. I'm running 2.9.1b on Arch Linux. It works very well, but I have a question. When connected to a server, Ctrl-U correctly transfers a file from local to remote. For remote to local transfers, the keyboard shortcut for this seems to be Ctrl-R.

https://github.com/masneyb/gftp/blob/2a35ef7c7a905a8300d40b08fe6e6549a5339206/src/gtk/gftp-gtk.c#L472

However, it instead just refreshes the directory. Here are the logs.

Loading directory listing / from server (LC_TIME=en_US.UTF-8)
PASV
227 Entering Passive Mode (...)
LIST -al
150 Connection accepted.
226 Transfer complete.

Is there another keyboard shortcut I can use? Can I make a custom accels file that gftp would use to read keyboard shortcuts?

wdlkmpx commented 1 year ago

There is a problem Both RetrieveFiles and RemoteRefresh = CTRL-R

    { "TransferRetrieveFiles",NULL,                  N_("_Retrieve Files"),   "<control>R",        NULL, G_CALLBACK(get_files) },
    { "RemoteRefresh",        "gtk-refresh",         N_("_Refresh"),          "<control>R",        NULL, G_CALLBACK(on_remote_gftp_gtk_refresh) },

So yeah, CTRL-R refreshes the remote directory

Maybe CTRL-D should be used instead.. it's currently used to delete a file.. but to delete a file the Delete key (or Alt-Del) should be use instead

So what do you think... what should be done.....

agustiner commented 1 year ago

I'm okay with that. If I could choose, I would use Ctrl-Left to retrieve, Ctrl-Right to put. This agrees with the UI as well.