geeqie icon indicating copy to clipboard operation
geeqie copied to clipboard

Integrate Collections into main window

Open caclark opened this issue 9 years ago • 8 comments

I would like collections to appear as a set of pseudo-folders in the main folder pane. The contents of the collection should be able to be accessed as though it were a normal folder. Being able to access the files in the same way as any other folder, or in split-windows alongside other folders would be an advantage, I think.

e.g. the folder tree would be: / bin boot etc etc Collections MyCollection1 MyCollection2

I vaguely recall the Windows program ThumbsPlus had this feature (called Galleries). Here is a screenshot of the folder display: http://www.cerious.com/help8sp1/folder_tree.html

I first considered implementing collections simply as a set of symbolic links in a special folder. However that would not work across file systems, and would not permit multiple files with the same name.

I have no idea how this could be implemented.

caclark avatar Dec 20 '16 20:12 caclark

Have you used darktable? I believe its concept of collections somewhat matches what you have in mind. That said, my experiences is that the collections that aren't anchored in the filesystem are somewhat difficult to use, specifically because there's no common UI pattern to organize and access them, and the UI patterns that exist don't make it obvious that there's a layer of indirection above "filesystem hierarchy"

That said, this certainly isn't going to be feasible in Geeqie without switching to the model of having a central metadata DB. Otherwise, you have no way of knowing what Collections even exist.

xsdg avatar Jan 08 '17 15:01 xsdg

Let me bump this. I like this idea and dislike those separate windows a lot. even on my 23" external display.

I'm not that proficient at C++ but willing to learn and had a look. Let me know if I got it right:

ViewDir.vd_get_fd_from_tree_path() uses GTK's TreeModel to read the directory and build up the FileData list. Wether those files are all in the same directory as is now or the list is compiled by parsing a gqv file shouldn't matter to any other part of the view. Only other thing to change is the behaviour when clicking a collection (gqv) file.

TomK32 avatar Jan 09 '25 12:01 TomK32

@TomK32 Thanks for the offer. But I believe there is a lot of tedious detail in something that might appear to be straightforward....

I did some work on this some time ago, but it got forgotten about. I have updated the changes to compile from the latest sources, and I have attached a .diff. The code is a mess, with parts that I no longer remember what I was trying to do. However, if you run it, it will give you an idea of what I was trying to achieve.

Using an existing version of geeqie, create a few collections, and ensure they are in $HOME/.local/share/geeqie/collections Run ./build/src/geeqie and set the directories pane to View As List Set the files pane to Images As List The Shortcuts box in the directories pane should have a shortcut to $HOME/.local/share/geeqie/collections. If not, create one. Click on the shortcut to Collections. You will see that in the directories pane for each collection there is a read-only (virtual) directory for each Collection. Click on any of those icons, and you can navigate around the Collection as a normal directory.

There are other things to be considered: Icon view needs to have a manual sort option The Sort Manager side bar needs work Drag-and-drop from a Collection in one layout window to a Collection in another layout window must be possible

443-1.diff.gz

caclark avatar Jan 09 '25 16:01 caclark

That's quite a big diff. I can click a collection, it does change both windows but doesn't show anything in the tree view or the lower left view (btw I still can't find a graphic that names all parts of the layout. Would be really handy as I'm easily confused. You know, we Rails devs love our simple naming schemes). It's at least changing it to blank.

Actually I didn't consider changing the tree view as well. What is it supposed to show? The actual directories that those images are from? Makes the most sense for me, and a nice filter

Image

TomK32 avatar Jan 22 '25 08:01 TomK32

btw I still can't find a graphic that names all parts of the layout

Absolutely. Originally Plugins were called Editors.... Over the years I have many times thought about creating a diagram for the intro. of the Help file. I'll get it done.

caclark avatar Jan 22 '25 10:01 caclark

the two major problems in computer science: naming things, invalidating cache and off-by-one errors

TomK32 avatar Jan 22 '25 11:01 TomK32

Actually I didn't consider changing the tree view as well. What is it supposed to show? The actual directories that those images are from?

My idea was that Collections would be presented to the user as sub-directories within the normal tree structure (although that might be implemented via sym. limks) e.g. $HOME ....Pictures ,,,,,,Nikon ......Collections .........Collection1 .........Collection2

In the .diff I created, any .gqv files in the default Collections directory have a pseudo read-only directory created for each one. If the user selects one of these pseudo directories, the Files Pane shows the thumbnails of the files within the .gqv file - and allows the user to operate on these files just as with a normal directory.

The directory tree was the starting point for how I was thinking about the problem.

The disadvantage is that if the user has .gqv files scattered around, that situation is not handled.

caclark avatar Jan 24 '25 11:01 caclark

btw I still can't find a graphic that names all parts of the layout

https://www.geeqie.org/help/GuideMainWindow.html

It might help. It might not. It seemed the easiest way, but not necessarily the best way.

caclark avatar Jan 24 '25 17:01 caclark