4 ms·
Unless I’m misunderstanding, 1, 2 and 3 all work the same way on Linux, at least in GTK and I think Qt too
by ubercow13 5y ago
Unless I’m misunderstanding, 1, 2 and 3 all work the same way on Linux, at least in GTK and I think Qt too
- klodolph 5y agoI think you're going to have to provide some more details, because I'm trying 1, 2, and 3 in GTK and I can't get ANY of the three options to work. 1. I have a folder open in Gnome's "Files" app. I can't drag it into the dialog--there's nothing draggable. I could go up a level to the enclosing folder, drag the child folder into the save folder, and then go back down a level to the child folder... these extra steps seem a bit unnecessary. So it's doable, but clunky. 2. I saved a file in GEdit somewhere else. How do I move it? There is nothing to drag. On macOS, there is an icon in the title bar of the window (called the proxy icon) that can be dragged where you like. 3. I saved the file in GEdit on the desktop as ~/Desktop/file.txt, then moved it to ~/.../.../file.txt. Then I made some more changes in GEdit, and saved it again... now I have two files! GEdit was not aware that the file had moved, and when I saved it, it created a second copy of the file, which is unexpected and wrong. If this is working for you, perhaps you could share the exact steps? I think one of the problems here is that on Linux, there is no real way to drag an open object... you can only drag things out of containers, but you can't drag things without first opening the container. For example, you can't drag an open folder into a save window, you have to first open the parent folder. You also can't drag an open document into an open window, you have to open the parent folder. There's not even a clear way to do that--on macOS, you can command-click the name in the title bar of the window and select the parent folder from the drop-down... not saying this is intuitive, but it does work which is a massive step up from not working at all.
- ubercow13 5y agoWith 1 I think you're right, but you can also drag any file in the folder and it will just locate and highlight it in the GTK filepicker, not actually open it, which achieves the same thing. In Thunar I can also drag the currently open folder (or any parent) from the breadcrumb bar, but this doesn't work in Dolphin. With 2 and 3 - yes you're right I didn't realise that was how it worked on macos! Those are both interesting features I haven't seen elsewhere. Although I think 3 would be possible to implement say in gedit, as the inode of the file you save shouldn't change when you move it in the file manager, everything in Linux is usually path-based so this might be kind of unexpected.
- klodolph 5y agoOn macOS, there's something which I think is called a "bookmark" these days but which used to be called an "alias", and it's used to record a reference to a file. It's basically a data structure that contains a bunch of metadata for a file, so if the file moves, there's a fallback process which locates the file and updates the data structure with the new metadata. It's fairly simple as you'd expect, although it's much more than just an inode. The data structure can just be an object in memory or it can be serialized to a file on disk. You could implement this yourself on Linux, for sure, but it's been around on macOS since System 7 appeared in 1991 and everything uses it.