Skip to content

Commit

Permalink
Merge branch 'release/v2.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 6, 2021
2 parents 94cadda + d53450b commit 75be542
Show file tree
Hide file tree
Showing 58 changed files with 860 additions and 369 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
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.1.2 - Ongoing

### Fixed

* Scrolling list bound to data programmatically causes nil pointer dereference (#2549)
* Rich text from markdown can get newlines wrong (#2589)
* Fix crash on 32bit operating systems (#2603)
* Compile failure on MacOS 10.12 Sierra (#2478)
* Don't focus widgets on mobile where keyboard should not display (#2598)
* storage.List doesn't return complete URI on Android for "content:" scheme (#2619)
* Last word of the line and first word of the next line are joined in markdown parse (#2647)
* Support for building `cmd/fyne` on Windows arm64
* Fixed FreeBSD requiring installed glfw library dependency (#1928)
* Apple M1: error when using mouse drag to resize window (#2188)
* Struct binding panics in reload with slice field (#2607)
* File Dialog favourites can break for certain locations (#2595)
* Define user friendly names for Android Apps (#2653)
* Entry validator not updating if content is changed via data binding after SetContent (#2639)
* CenterOnScreen not working for FixedSize Window (#2550)
* Panic in boundStringListItem.Get() (#2643)
* Can't set an app/window icon to be an svg. (#1196)
* SetFullScreen(false) can give error (#2588)


## 2.1.1 - 22 October 2021

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion app/app_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package app

/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Foundation -framework UserNotifications
#cgo LDFLAGS: -framework Foundation
#include <stdbool.h>
#include <stdlib.h>
Expand Down
17 changes: 13 additions & 4 deletions app/app_darwin.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
// +build !ci

#import <Foundation/Foundation.h>
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
#import <UserNotifications/UserNotifications.h>
#endif

static int notifyNum = 0;

extern void fallbackSend(char *cTitle, char *cBody);

bool isBundled() {
return [[NSBundle mainBundle] bundleIdentifier] != nil;
}

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
void doSendNotification(UNUserNotificationCenter *center, NSString *title, NSString *body) {
UNMutableNotificationContent *content = [UNMutableNotificationContent new];
[content autorelease];
Expand All @@ -24,10 +32,6 @@ void doSendNotification(UNUserNotificationCenter *center, NSString *title, NSStr
}];
}

bool isBundled() {
return [[NSBundle mainBundle] bundleIdentifier] != nil;
}

void sendNotification(char *cTitle, char *cBody) {
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
NSString *title = [NSString stringWithUTF8String:cTitle];
Expand All @@ -49,3 +53,8 @@ void sendNotification(char *cTitle, char *cBody) {
}
}];
}
#else
void sendNotification(char *cTitle, char *cBody) {
fallbackSend(cTitle, cBody);
}
#endif
9 changes: 9 additions & 0 deletions app/app_notlegacy_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// +build !ci
// +build !legacy

package app

/*
#cgo LDFLAGS: -framework Foundation -framework UserNotifications
*/
import "C"
4 changes: 1 addition & 3 deletions app/app_xdg.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ func (a *fyneApp) SendNotification(n *fyne.Notification) {
}

func rootConfigDir() string {
homeDir, _ := os.UserHomeDir()

desktopConfig := filepath.Join(homeDir, ".config")
desktopConfig, _ := os.UserConfigDir()
return filepath.Join(desktopConfig, "fyne")
}

Expand Down
6 changes: 5 additions & 1 deletion cmd/fyne/internal/commands/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ func (p *Packager) Package() error {
return err
}

err = p.doPackage()
return p.packageWithoutValidate()
}

func (p *Packager) packageWithoutValidate() error {
err := p.doPackage()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/fyne/internal/commands/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (r *Releaser) releaseAction(_ *cli.Context) error {
return err
}

err := r.Packager.Package()
err := r.Packager.packageWithoutValidate()
if err != nil {
return err
}
Expand Down
18 changes: 18 additions & 0 deletions cmd/fyne/internal/mobile/binres/binres.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,24 @@ func resolveElements(elms []*Element, pool, bxPool *Pool) {
sort.Sort(byType(el.attrs))
sort.Sort(byNamespace(el.attrs))
sort.Sort(byName(el.attrs))

if el.Name.Resolve(bxPool) == "application" {
// The android manifest seems to be very delicate - though it may be code in this package
// set the order very carefully... #2653 and others
sort.Slice(el.attrs, func(i, j int) bool {
a := el.attrs[i].Name.Resolve(bxPool)
if a == "configChanges" || a == "debuggable" {
return false
}
if a == "label" {
return true
}

b := el.attrs[j].Name.Resolve(bxPool)
return a < b
})
}

for _, child := range el.Children {
asort(child)
}
Expand Down
1 change: 1 addition & 0 deletions cmd/fyne_demo/FyneApp.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[Details]
Icon = "../../theme/icons/fyne.png"
Name = "Fyne Demo"
ID = "io.fyne.demo"
Build = 6
Loading

0 comments on commit 75be542

Please sign in to comment.