-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Decouple the Clipboard API from fyne.Window #5121
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
83427a8
Add fyne.App.Clipboard method, fixes #4418
2999a08
add missing Clipboard for various platforms; update tests
dd612d7
test: return proper Clipboard
3482cae
Clipboard: remove singleton
992f113
app: add missing NewClipboard()
616fff2
app: instantiate a window to initialize glfw for clipboard tests
d6a142f
app: Clipboard: use test.NewTempApp and NewTempWindow
395444b
app: remove duplicat import decl
a26d502
Clipboard: do not return pointer for a clipboard instance
6cdb472
internal/driver/mobile: use NewClipboard() instead of returning a new…
pierrec da68bb0
Fix an indexing error on Darwin introduced some time ago
andydotxyz f8f8717
Remember last location and go back to it when file dialog is opened a…
andydotxyz 5136aa3
Add test for remembering start dir
andydotxyz f83fd29
Fix order when code requests a starting directory
andydotxyz 06ced73
Add missing doc for the last two additions
andydotxyz c277e9b
Bring calendar in from fyne-x
andydotxyz 916592c
Add basic DateEntry type with a static format for picking or typing a…
andydotxyz 36ff5fd
Add missed icon
andydotxyz c2b04f7
Fix accidental import loop
andydotxyz 23f0724
Allow Date to be nil
andydotxyz 106cdeb
Fix warnings
andydotxyz 7064f5c
Localise weekday names
andydotxyz 18fe7b3
Don't assume disablable
andydotxyz bfc8ecc
Only create the minSize label once
andydotxyz 1d90c9f
Remove a few excess whitelines
andydotxyz 144528e
widget.Entry: validate when pasting from clipboard
fb10b2b
Fix issue where about replace code could cause items to remove if ref…
andydotxyz 6be64f2
cache: use one lock/unclock cycle to remove expired items.
72e7179
test: Add RenderObjectToMarkup and RenderToMarkup functions
flimzy 32a9423
Work around Windows line endings in tests
flimzy 4802592
Fix possible crash with badly formatted json translation
andydotxyz dfdf8f7
Add installDir (-o) option to get
afh 8d2017e
Add data binding to Select widget
jimorc 54e11f6
Update TeastNewSelectWithData
jimorc 7eb3402
Add Since line to public APIs
jimorc fff9c45
Change Since to 2.6 from 2.0
jimorc 453d3cb
Change Since 2.6 to Since: 2.6
jimorc e30975a
Added translation using Weblate (Swedish)
prifre 7738644
Translated using Weblate (Swedish)
prifre 7b6f833
internal/driver/mobile: return storage.ErrNotExists instead of custom…
219e798
Update root package GoDoc to include internal links
flimzy b764796
Improve doc strings for file dialogs
ErikKalkoken 54a2d88
Further improve comments for file dialogs
ErikKalkoken 70984a8
Update to the latest breaking API changes in go-text
andydotxyz ddf4252
Modernise CI infrastructure with Go 1.22
Jacalz 7ba5aa5
Update CI and code to use Staticcheck v0.5.1
Jacalz 4bfe10d
Add a missing import
Jacalz 5e52896
Bump Go version in CI to 1.23
Jacalz c2cdd54
Fix staticcheck error for deprecation
Jacalz 70576c8
Merge remote-tracking branch 'upstream/develop' into issue4418
Jacalz 50b23bb
cmd/fyne_demo: set the clipboard for Copy/Cut/Paste shortcuts
pierrec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Removing this code looks like it is possible that the shortcut for copy.paste etc could some times be missing the clipboard info which as previously there..?
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.
From what I can tell from the code, it was always setting the clipboard twice. First when creating the struct and then this function made a type switch and set it again?
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.
@andydotxyz the shortcut is already setup with the clipboard at instanciation. No need to do it a second time right?
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.
In the instantiation you make, yes - but check other usages too - like in Entry...
e.shortcut.AddShortcut(&fyne.ShortcutCopy{}, ...)
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 see. It may be better to get ShortcutCopy/Cut/Paste from the App though instead of relying on the user to properly instantiate it. In the meantime, I will restore the check in the fyne_demo app.
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 agree with this statement, however having the fields be
nil
would be a breaking change, so thanks for re-instating it.