Skip to content
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

WIP: Add translate command #5167

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
a7b1055
Add test for entry undo redo containing runes with more than one byte
NicolasPerrenoud Jul 19, 2024
24e0b11
fix undo/redo for runes with more than one byte
NicolasPerrenoud Jul 19, 2024
bc238d0
Use app ID from metadata where present in go build/run
andydotxyz Jul 19, 2024
7321a78
Correctly shape input before truncating
andydotxyz Jul 19, 2024
d696fdd
Merge pull request #5013 from andydotxyz/fix/appidmeta
andydotxyz Jul 22, 2024
ec35e08
Use utf8.RuneCountInString instead of len([]Rune())
NicolasPerrenoud Jul 22, 2024
a3376a4
it's -> its
MarkRosemaker Jul 26, 2024
2f7a9d7
Save undo and redo as rune slices to reduce allocation
NicolasPerrenoud Jul 26, 2024
411c1e1
Clear undostack when Append is called to have the same behavior as Se…
NicolasPerrenoud Jul 26, 2024
1ad26b3
Merge pull request #5033 from MarkRosemaker/develop
dweymouth Jul 26, 2024
0ec4b1a
Update the size and position of Entry accessories to be more consiste…
andydotxyz Jul 31, 2024
c2ff846
Add a note for our next release about ActionItems
andydotxyz Aug 2, 2024
18b4aa7
Merge branch 'release/v2.5.x' into develop
andydotxyz Aug 2, 2024
958d27e
Added translation using Weblate (Ukrainian)
Jul 23, 2024
5a5dfce
Translated using Weblate (Ukrainian)
Jul 23, 2024
ea5f145
Added translation using Weblate (Polish)
rad756 Jul 28, 2024
60d9300
Translated using Weblate (Polish)
rad756 Jul 28, 2024
9b40db3
Added translation using Weblate (German)
Sharrnah Jul 29, 2024
7c90880
Translated using Weblate (German)
Sharrnah Jul 29, 2024
498981d
Merge branch 'develop' into fix/4430
andydotxyz Aug 2, 2024
1aef367
Don't refresh if no sizes changed
andydotxyz Jul 19, 2024
7d635e8
Don't blindly read map indexes that may be unset
andydotxyz Jul 19, 2024
b743ca7
Update so we call the systray functions on main thread
andydotxyz Aug 6, 2024
9b1494f
Merge branch 'release/v2.5.x' into develop
andydotxyz Aug 6, 2024
b11e118
Merge branch 'develop' into fix/5039
andydotxyz Aug 6, 2024
9b3da8a
Simplify locking now it's using main
andydotxyz Aug 6, 2024
c6531bc
Merge branch 'develop' into fix/4430
andydotxyz Aug 6, 2024
f79f1f6
Merge branch 'develop' into fix/5007
andydotxyz Aug 7, 2024
80a9542
Merge pull request #5012 from andydotxyz/fix/5007
andydotxyz Aug 8, 2024
89bbd9a
Merge pull request #5055 from andydotxyz/fix/5039
andydotxyz Aug 8, 2024
6f6f098
Fix color lookup not working as expected on Linux
Jacalz Aug 9, 2024
4cb145e
Merge pull request #5048 from andydotxyz/fix/4430
andydotxyz Aug 9, 2024
a1e6071
Run initial theme setup within goroutine
Jacalz Aug 9, 2024
80561b3
Simplify sync.Pool code using generics
Jacalz Aug 9, 2024
a1d685d
Add a test for the new pool struct
Jacalz Aug 9, 2024
824c69d
Merge pull request #5063 from Jacalz/generic-async-pool
Jacalz Aug 9, 2024
25dd2b4
Merge pull request #5061 from Jacalz/improve-linux-theme-watching
Jacalz Aug 14, 2024
29484a0
Translated using Weblate (Polish)
Aug 13, 2024
7472e22
Translated using Weblate (Polish)
rad756 Aug 13, 2024
dfcb226
Update serve mode to accept --tags and --metadata flags
flimzy Aug 15, 2024
b66cea1
Merge pull request #5072 from weblate/weblate-fyne-fyne
andydotxyz Aug 15, 2024
b1506ae
Merge pull request #5010 from NicolasPerrenoud/fix-undo-with-multi-by…
andydotxyz Aug 17, 2024
2f64472
Merge pull request #5075 from flimzy/serveMetadata
andydotxyz Aug 17, 2024
f48c41c
Don't watch theme for test mode
andydotxyz Aug 20, 2024
4182cb2
Correct test theme watch fix
andydotxyz Aug 20, 2024
b3c087c
use float comparison within delta
dweymouth Aug 23, 2024
de71490
Merge branch 'release/v2.5.x' into develop
andydotxyz Aug 24, 2024
6535a2b
Fixes an issue where adjusting the tree and then making it visible wo…
williambrode Aug 27, 2024
3689a40
Merge pull request #5096 from williambrode/issue-5095
dweymouth Aug 28, 2024
7aa9c4e
Merge pull request #5087 from dweymouth/gradient-float-comparison
dweymouth Aug 28, 2024
d96c578
Correctly count the runes in a multi-run wrap
andydotxyz Aug 30, 2024
b358f8e
Merge branch 'develop' into fix/4998
andydotxyz Aug 30, 2024
93d4d60
Correct ellipse tests numbers
andydotxyz Sep 1, 2024
5fb3d75
Merge pull request #5014 from andydotxyz/fix/4998
andydotxyz Sep 1, 2024
110aba7
Avoid deadlock in button renderer by aquiring read lock twice.
williambrode Sep 5, 2024
367ea0a
Merge pull request #5115 from williambrode/issue-5114
dweymouth Sep 5, 2024
6cd21c8
Bring calendar in from fyne-x
andydotxyz Sep 6, 2024
4d7ff84
Add basic DateEntry type with a static format for picking or typing a…
andydotxyz Sep 6, 2024
53f7c79
More safety for theme watching
andydotxyz Sep 7, 2024
c0c9744
Actually remember the test window title when created in the normal ma…
andydotxyz Sep 6, 2024
35cb432
missed web file
andydotxyz Sep 7, 2024
3d6d809
Merge branch 'develop' into feature/datepicker
andydotxyz Sep 7, 2024
40d5123
Add missed icon
andydotxyz Sep 7, 2024
6ea393e
Improving border docs
andydotxyz Sep 7, 2024
81e1dde
Fix accidental import loop
andydotxyz Sep 7, 2024
d7c5389
Add data binding to Select widget
jimorc Sep 8, 2024
6bf7d46
Update TeastNewSelectWithData
jimorc Sep 8, 2024
03d1862
Merge branch 'develop' into issue2836
jimorc Sep 8, 2024
fdfd169
Add Since line to public APIs
jimorc Sep 8, 2024
97f4740
Change Since to 2.6 from 2.0
jimorc Sep 9, 2024
38be364
test: Add RenderObjectToMarkup and RenderToMarkup functions
flimzy Sep 9, 2024
99f2183
Update root package GoDoc to include internal links
flimzy Sep 9, 2024
41d75d8
Fix an indexing error on Darwin introduced some time ago
andydotxyz Sep 12, 2024
ee2691a
Remember last location and go back to it when file dialog is opened a…
andydotxyz Sep 12, 2024
2fdbd3a
Add test for remembering start dir
andydotxyz Sep 12, 2024
5d30300
Fix order when code requests a starting directory
andydotxyz Sep 12, 2024
37d7e41
Allow Date to be nil
andydotxyz Sep 12, 2024
4252ce8
Fix warnings
andydotxyz Sep 12, 2024
9cb68e7
Localise weekday names
andydotxyz Sep 12, 2024
31a378c
Don't assume disablable
andydotxyz Sep 12, 2024
7105f46
Only create the minSize label once
andydotxyz Sep 12, 2024
f7b6615
Add missing doc for the last two additions
andydotxyz Sep 12, 2024
a6d5837
Merge pull request #5138 from andydotxyz/feature/rememberfolder
andydotxyz Sep 12, 2024
3d65633
Remove a few excess whitelines
andydotxyz Sep 13, 2024
ef35454
Merge pull request #5119 from andydotxyz/feature/datepicker
andydotxyz Sep 13, 2024
d459ecb
Work around Windows line endings in tests
flimzy Sep 13, 2024
cf9ed85
widget.Entry: validate when pasting from clipboard
Sep 14, 2024
18fc125
Merge pull request #5145 from pierrec/issue5058
andydotxyz Sep 14, 2024
e764ff7
cache: use one lock/unclock cycle to remove expired items.
Sep 14, 2024
3a1f8c0
Fix issue where about replace code could cause items to remove if ref…
andydotxyz Sep 15, 2024
d4c3099
Merge pull request #5146 from pierrec/issue5129
andydotxyz Sep 17, 2024
c2cc495
Merge pull request #5126 from flimzy/markup
andydotxyz Sep 17, 2024
6196b03
internal/driver/mobile: return storage.ErrNotExists instead of custom…
Sep 17, 2024
e58a9b4
Add installDir (-o) option to get
afh Sep 20, 2024
4bc6a6f
Fix possible crash with badly formatted json translation
andydotxyz Sep 22, 2024
f9d3fed
Change Since 2.6 to Since: 2.6
jimorc Sep 23, 2024
56901bb
Merge pull request #5154 from afh/get-installDir-option
andydotxyz Sep 24, 2024
a275574
Merge pull request #5123 from jimorc/issue2836
andydotxyz Sep 24, 2024
d80eb55
Added translation using Weblate (Swedish)
prifre Sep 23, 2024
4ee979f
Translated using Weblate (Swedish)
prifre Sep 23, 2024
1ea14f7
Merge pull request #5151 from pierrec/issue3353
Jacalz Sep 25, 2024
119d2f8
Merge pull request #5127 from flimzy/godocLinks
Jacalz Sep 25, 2024
cced842
WIP: command to scan for new translation
sdassow Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
This file lists the main changes with each version of the Fyne toolkit.
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).

## 2.6.0 - Ongoing

### Added

### Changed

* ActionItems in an Entry should now match the standard button size

### Fixed

* Odd looking SelectEntry with long PlaceHolder (#4430)


## 2.5.1 - 24 August 2024

### Fixed
Expand Down Expand Up @@ -1352,7 +1365,7 @@ The import path is now `fyne.io/fyne/v2` when you are ready to make the update.
* Don't add a button bar to a form if it has no buttons
* Moved driver/gl package to internal/driver/gl
* Clicking/Tapping in an entry will position the cursor
* A container with no layout will not change the position or size of it's content
* A container with no layout will not change the position or size of its content
* Update the fyne_demo app to reflect the expanding feature set

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion animation.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Animation struct {
}

// NewAnimation creates a very basic animation where the callback function will be called for every
// rendered frame between time.Now() and the specified duration. The callback values start at 0.0 and
// rendered frame between [time.Now] and the specified duration. The callback values start at 0.0 and
// will be 1.0 when the animation completes.
//
// Since: 2.0
Expand Down
12 changes: 6 additions & 6 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

// An App is the definition of a graphical application.
// Apps can have multiple windows, by default they will exit when all windows
// have been closed. This can be modified using SetMaster() or SetCloseIntercept().
// To start an application you need to call Run() somewhere in your main() function.
// Alternatively use the window.ShowAndRun() function for your main window.
// have been closed. This can be modified using SetMaster or SetCloseIntercept.
// To start an application you need to call Run somewhere in your main function.
// Alternatively use the [fyne.io/fyne/v2.Window.ShowAndRun] function for your main window.
type App interface {
// Create a new window for the application.
// The first window to open is considered the "master" and when closed
Expand All @@ -27,7 +27,7 @@ type App interface {
// SetIcon sets the icon resource used for this application instance.
SetIcon(Resource)

// Run the application - this starts the event loop and waits until Quit()
// Run the application - this starts the event loop and waits until [App.Quit]
// is called or the last window closes.
// This should be called near the end of a main() function as it will block.
Run()
Expand All @@ -43,7 +43,7 @@ type App interface {
Driver() Driver

// UniqueID returns the application unique identifier, if set.
// This must be set for use of the Preferences() functions... see NewWithId(string)
// This must be set for use of the [App.Preferences]. see [NewWithID].
UniqueID() string

// SendNotification sends a system notification that will be displayed in the operating system's notification area.
Expand Down Expand Up @@ -75,7 +75,7 @@ type App interface {
CloudProvider() CloudProvider // get the (if any) configured provider

// SetCloudProvider allows developers to specify how this application should integrate with cloud services.
// See `fyne.io/cloud` package for implementation details.
// See [fyne.io/cloud] package for implementation details.
//
// Since: 2.3
SetCloudProvider(CloudProvider) // configure cloud for this app
Expand Down
2 changes: 1 addition & 1 deletion app/app_desktop_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ func themeChanged() {
fyne.CurrentApp().Settings().(*settings).setupTheme()
}

func watchTheme() {
func watchTheme(_ *settings) {
C.watchTheme()
}
2 changes: 1 addition & 1 deletion app/app_goxjs.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var themeChanged = js.FuncOf(func(this js.Value, args []js.Value) interface{} {
return nil
})

func watchTheme() {
func watchTheme(_ *settings) {
js.Global().Call("matchMedia", "(prefers-color-scheme: dark)").Call("addEventListener", "change", themeChanged)
}
func stopWatchingTheme() {
Expand Down
2 changes: 1 addition & 1 deletion app/app_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ func (a *fyneApp) SendNotification(_ *fyne.Notification) {
fyne.LogError("Refusing to show notification for unknown operating system", nil)
}

func watchTheme() {
func watchTheme(_ *settings) {
// no-op
}
5 changes: 3 additions & 2 deletions app/app_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func runScript(name, script string) {
fyne.LogError("Failed to launch windows notify script", err)
}
}
func watchTheme() {
go internalapp.WatchTheme(fyne.CurrentApp().Settings().(*settings).setupTheme)

func watchTheme(s *settings) {
go internalapp.WatchTheme(s.setupTheme)
}
6 changes: 3 additions & 3 deletions app/app_xdg.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@ func rootConfigDir() string {
return filepath.Join(desktopConfig, "fyne")
}

func watchTheme() {
func watchTheme(s *settings) {
go func() {
// Theme lookup hangs on some desktops. Update theme variant cache from within goroutine.
internalapp.CurrentVariant.Store(uint64(findFreedesktopColorScheme()))
fyne.CurrentApp().Settings().(*settings).setupTheme()
s.setupTheme()

portalSettings.OnSignalSettingChanged(func(changed portalSettings.Changed) {
if changed.Namespace == "org.freedesktop.appearance" && changed.Key == "color-scheme" {
themeVariant := colorSchemeToThemeVariant(appearance.ColorScheme(changed.Value.(uint32)))
internalapp.CurrentVariant.Store(uint64(themeVariant))
fyne.CurrentApp().Settings().(*settings).setupTheme()
s.setupTheme()
}
})
}()
Expand Down
5 changes: 4 additions & 1 deletion app/settings_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ func watchFile(path string, callback func()) *fsnotify.Watcher {
func (s *settings) watchSettings() {
s.watcher = watchFile(s.schema.StoragePath(), s.fileChanged)

watchTheme()
a := fyne.CurrentApp()
if a != nil && s != nil && a.Settings() == s { // ignore if testing
watchTheme(s)
}
}

func (s *settings) stopWatching() {
Expand Down
2 changes: 1 addition & 1 deletion app/settings_goxjs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func watchFile(path string, callback func()) {
}

func (s *settings) watchSettings() {
watchTheme()
watchTheme(s)
}

func (s *settings) stopWatching() {
Expand Down
4 changes: 2 additions & 2 deletions canvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package fyne

import "image"

// Canvas defines a graphical canvas to which a CanvasObject or Container can be added.
// Canvas defines a graphical canvas to which a [CanvasObject] or Container can be added.
// Each canvas has a scale which is automatically applied during the render process.
type Canvas interface {
Content() CanvasObject
Expand Down Expand Up @@ -31,7 +31,7 @@ type Canvas interface {
// Size returns the current size of this canvas
Size() Size
// Scale returns the current scale (multiplication factor) this canvas uses to render
// The pixel size of a CanvasObject can be found by multiplying by this value.
// The pixel size of a [CanvasObject] can be found by multiplying by this value.
Scale() float32

// Overlays returns the overlay stack.
Expand Down
18 changes: 9 additions & 9 deletions canvasobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ type CanvasObject interface {
Refresh()
}

// Disableable describes any CanvasObject that can be disabled.
// Disableable describes any [CanvasObject] that can be disabled.
// This is primarily used with objects that also implement the Tappable interface.
type Disableable interface {
Enable()
Disable()
Disabled() bool
}

// DoubleTappable describes any CanvasObject that can also be double tapped.
// DoubleTappable describes any [CanvasObject] that can also be double tapped.
type DoubleTappable interface {
DoubleTapped(*PointEvent)
}

// Draggable indicates that a CanvasObject can be dragged.
// Draggable indicates that a [CanvasObject] can be dragged.
// This is used for any item that the user has indicated should be moved across the screen.
type Draggable interface {
Dragged(*DragEvent)
DragEnd()
}

// Focusable describes any CanvasObject that can respond to being focused.
// Focusable describes any [CanvasObject] that can respond to being focused.
// It will receive the FocusGained and FocusLost events appropriately.
// When focused it will also have TypedRune called as text is input and
// TypedKey called when other keys are pressed.
Expand All @@ -75,18 +75,18 @@ type Focusable interface {
TypedKey(*KeyEvent)
}

// Scrollable describes any CanvasObject that can also be scrolled.
// Scrollable describes any [CanvasObject] that can also be scrolled.
// This is mostly used to implement the widget.ScrollContainer.
type Scrollable interface {
Scrolled(*ScrollEvent)
}

// SecondaryTappable describes a CanvasObject that can be right-clicked or long-tapped.
// SecondaryTappable describes a [CanvasObject] that can be right-clicked or long-tapped.
type SecondaryTappable interface {
TappedSecondary(*PointEvent)
}

// Shortcutable describes any CanvasObject that can respond to shortcut commands (quit, cut, copy, and paste).
// Shortcutable describes any [CanvasObject] that can respond to shortcut commands (quit, cut, copy, and paste).
type Shortcutable interface {
TypedShortcut(Shortcut)
}
Expand All @@ -95,12 +95,12 @@ type Shortcutable interface {
//
// Since: 2.1
type Tabbable interface {
// AcceptsTab() is a hook called by the key press handling logic.
// AcceptsTab is a hook called by the key press handling logic.
// If it returns true then the Tab key events will be sent using TypedKey.
AcceptsTab() bool
}

// Tappable describes any CanvasObject that can also be tapped.
// Tappable describes any [CanvasObject] that can also be tapped.
// This should be implemented by buttons etc that wish to handle pointer interactions.
type Tappable interface {
Tapped(*PointEvent)
Expand Down
2 changes: 1 addition & 1 deletion cloud.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fyne

// CloudProvider specifies the identifying information of a cloud provider.
// This information is mostly used by the `fyne.io/cloud ShowSettings' user flow.
// This information is mostly used by the [fyne.io/cloud.ShowSettings] user flow.
//
// Since: 2.3
type CloudProvider interface {
Expand Down
9 changes: 8 additions & 1 deletion cmd/fyne/internal/commands/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ func Get() *cli.Command {
Usage: "For darwin and Windows targets an appID in the form of a reversed domain name is required, for ios this must match a valid provisioning profile",
Destination: &g.AppID,
},
&cli.StringFlag{
Name: "installDir",
Aliases: []string{"o"},
Usage: "A specific location to install to, rather than the OS default.",
Destination: &g.installDir,
},
},
Action: func(ctx *cli.Context) error {
if ctx.Args().Len() != 1 {
Expand All @@ -50,6 +56,7 @@ func Get() *cli.Command {
// Getter is the command that can handle downloading and installing Fyne apps to the current platform.
type Getter struct {
*appData
installDir string
}

// NewGetter returns a command that can handle the download and install of GUI apps built using Fyne.
Expand Down Expand Up @@ -98,7 +105,7 @@ func (g *Getter) Get(pkg string) error {
path = filepath.Join(path, dir)
}

install := &Installer{appData: g.appData, srcDir: path, release: true}
install := &Installer{appData: g.appData, installDir: g.installDir, srcDir: path, release: true}
if err := install.validate(); err != nil {
return fmt.Errorf("failed to set up installer: %w", err)
}
Expand Down
Loading