-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Open selected result in quicklook #859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting freezing with any query I type. This seems to be the error:
System.Windows.Data Error: 23 : Cannot convert '' from type '' to type 'System.Windows.Media.ImageSource' for 'en-US' culture with default conversions; consider using Converter property of Binding. NotSupportedException:'System.NotSupportedException: ImageSourceConverter cannot convert from (null).
at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)'
Does it say what line is triggering this exception? |
Nah sorry, that's why I didn't dig into it, I will leave it with you since I want to continue onto other prs. You can replicate the issue right? |
I never got this error. Is this from the CI build? |
it's coming from local run in visual studio |
Tested with the CI build, it's happening there as well. Simply type 'a' or jpg causes flow to hang indefinitely. |
Found the issue! If QuickLook is unavailable and Flow tries to open a pipe and gets stuck. Adding a timeout helps but isn't the full solution. An Async option would be best. |
When would quick look not be available? Is it when the file is not an image? |
so this needs quicklook installed before can be used? do we want to use Droplex to handle it? |
I'm unsure. I originally designed this so it would just work no matter if it was installed or not. @Flow-Launcher/team any opinions? |
I wonder if there is a way we can set QL to stay on top, hide and set window size via the code? This will help make QL usage feel more integrated with flow. |
As far as I can tell there is no API to pragmatically control QuickLook other than simply toggling it and switching files. |
TODO: need to check if window is open to avoid wasting CPU time. |
You can set QL to stay on top on each launch by setting QuickLook.config's attribute TopMost to true |
Quicklook author seems to think detecting the window is more cpu time then just sending the pipe and failing. I haven't tested this but it seems logical. |
I got the impression from the linked issue the author meant better to check window exists so to avoid wasting CPU, where did you see sending the pipe and failing is better? If failing is better than yeah that would be good. |
You’re correct. I must have misread his intentions. |
Closing in favor of #2082 |
F1 Opens Quicklook on your selection.
Right now it's just a proof of concept.... Logic and features will be added soon™Todo:
...and more
Preview:
2021-12-03.13-12-00.mp4