Open bitaruka opened 5 years ago
Duplication of #139
It's not a duplicate of #139, the issue still persists.
Yes, search results in explorer is a different beastie.
I'm not exactly sure how this is enabled but the expected behavior can be seen with Windows Photo Viewer (the one present since Vista/7, not the Photos app).
Steps:
Results: Windows Photo Viewer will go to the next/previous image in the search results or Saved Search. This is a flat view of all images that match the search query, regardless of what folder they are in, using the folder that was searched from as the root for additional images.
When repeating the same with ImageGlass (and the "Find images in child folder" option enabled), it uses the folder of the first opened image as the root, rather than the folder that was searched from, and displays all images from that folder and lower, including images that had been filtered out by the search query.
Bump. I found another request for this dating 2020, can we please add it soon? Literally the one thing missing from ImageGlass, I hate having to constantly go back to using Windows Photos because of the lack of this basic necessary functionality.
Would also like to see this being done. Any plans for doing so?
Would also like to see this being done. Any plans for doing so?
I haven't found any resources/API to retrieve the search result.
I'm not 100% positive but I think it might be related to the IFolderView2 interface
IFolderView2::GetItems? It's inherited from IFolderView but, I assume, with the extra stuff from Vista and newer (search folders/search results in an Explorer view). May or may not also need IFolderView2::GetSortColumns depending on if the collection is sorted or not.
I'm primarily a web developer rather than working with Windows apps so I'm not entirely sure but it seems like that should get all the items in the view. Take this with a grain of salt though as I don't have a dev environment to test it out myself.
The guts of the "support Window Explorer sort order" code can be found at:
It's in C++ because for the life of me, I could not get the necessary C# bindings to the COM functions to work.
Here is the primary challenge for supporting Search results:
Which Explorer window is ImageGlass supposed to pull the list from?
The current algorithm is:
ImageGlass
has been invoked to show an image. The filename includes the path to the image.ExplorerSortOrder
iterates through the active Explorer windows. looking for the window whose Location property matches the provided image path.A known limitation of this algorithm is the first Explorer window pointing at that folder is used. It may not be the window the user actually used to view said image file!
To support Search results will require something like this:
ImageGlass
has been invoked to show an image. The filename includes the path to the image.ExplorerSearchResults
iterates through the active Explorer windows. This has the same limitation: the first window containing the full image path in its list of items would be used, not necessarily the window actually used by the user.
ImageGlass would need at least the following changes:
ExplorerSortOrder
returns no results, try invoking ExplorerSearchResults
.All that said, I have no motivation or interest in creating ExplorerSearchResults
. I am no longer actively participating in ImageGlass
development.
So, if I'm understanding it correctly, this could work by adding GetItems to what's already there and using that instead of searching the directory/subdirectories of the opened image file IF (and only if) we know we have the correct Explorer window?
If we did know we had the correct window, then using GetItems would work for both search results (which already includes subdirectories) and regular folders (without subdirectories). The only difference would be for getting images in subdirectories when using a regular folder instead of a search.
Displaying the explorer search results in correct order would be just great. for my specific workflow this would be gold.
When I open file from Explorer's search results the navigation in ImageGlass is different from search window. Seems it just navigate all images in folder that contain opened file.
Expected behavior: ImageGlass file navigation is the same as I see in search results window.
To reproduce just try to search images through Explorer, then explore results through ImageGlass.