Skip to content

Commit

Permalink
Merge pull request #84 from Jacalz/next
Browse files Browse the repository at this point in the history
Merge over changes for v3.4.0 release
  • Loading branch information
Jacalz authored Jun 7, 2023
2 parents 82ff072 + b1c039e commit 4c9d9fa
Show file tree
Hide file tree
Showing 27 changed files with 530 additions and 369 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.7.0
- uses: WillAbides/setup-go-faster@v1.8.0
with:
go-version: '1.19.x'
go-version: '1.20.x'

- name: Install build dependencies
run: |
Expand All @@ -24,10 +24,10 @@ jobs:
- name: Install static analysis tools
run: |
go install github.com/securego/gosec/v2/cmd/gosec@v2.15.0
go install github.com/securego/gosec/v2/cmd/gosec@v2.16.0
go install github.com/fzipp/gocyclo/cmd/[email protected]
go install honnef.co/go/tools/cmd/[email protected].2
go install mvdan.cc/gofumpt@v0.4.0
go install honnef.co/go/tools/cmd/[email protected].3
go install mvdan.cc/gofumpt@v0.5.0
- name: Vet
run: go vet ./...
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Tests
on: [push, pull_request]
permissions:
Expand All @@ -10,18 +9,20 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.17, 1.19]
go-version: ['1.17.x', '1.20.x']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.7.0
- uses: WillAbides/setup-go-faster@v1.8.0
with:
go-version: ${{ matrix.go-version }}

- name: Get dependencies
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev libwayland-dev libxkbcommon-dev
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends clang libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
- name: Tests
run: go test ./...
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 3.4.0 - QR code support and backend rewrite
- QR codes can now be generated for easily sending items to [supported apps](https://github.com/Jacalz/rymdport/wiki/Supported-clients#clients-with-qr-code-scanning) (fixes #10).
- Rewrote a large part of the backend for displaying sends and receives.
- Progress bars no longer display the wrong percentage sometimes.
- Fixes a potential crash that could happen sometimes when sending.
- Added support for removing items that have completed the transfer (fixes #32).
- Added keyboard shortcuts for switching between tabs. See the [Keyboard Shortcuts](https://github.com/Jacalz/rymdport/wiki/Keyboard-shortcuts) wiki for more information.
- Added an option to disable update checking on startup for release binaries (fixes #66).
- The receive page now shows which code a received item came from.
- Various improvements to performance and memory usage.
- Updated `fyne` to [v2.3.5](https://github.com/fyne-io/fyne/releases/tag/v2.3.5) for many bug fixes.

## 3.3.6 - Crash fix for copying received text
- Fixed a crash when pressing the copy button in the text receive window (fixes #83).
- Fixed the AppStream metadata not containing the v3.3.5 release information.
Expand Down
4 changes: 2 additions & 2 deletions FyneApp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Website = "https://rymdport.github.io/"
Icon = "internal/assets/icon/icon-512.png"
Name = "rymdport"
ID = "io.github.jacalz.rymdport"
Version = "3.3.6"
Build = 24
Version = "3.4.0"
Build = 25
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ If a new Go compiler version is released with security fixes, we will issue reco

| Version | Supported |
| ------- | ------------------ |
| 3.3.x | :white_check_mark: |
| < 3.3.0 | :x: |
| 3.4.x | :white_check_mark: |
| < 3.4.0 | :x: |

## Reporting a Vulnerability

Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ module github.com/Jacalz/rymdport/v3
go 1.17

require (
fyne.io/fyne/v2 v2.3.4
fyne.io/fyne/v2 v2.3.5
github.com/fynelabs/fyneselfupdate v0.1.0
github.com/fynelabs/selfupdate v0.2.0
github.com/klauspost/compress v1.15.14
github.com/psanford/wormhole-william v1.0.6
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/stretchr/testify v1.8.1
)

require (
fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6 // indirect
fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fredbi/uri v0.1.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
fyne.io/fyne/v2 v2.1.4/go.mod h1:p+E/Dh+wPW8JwR2DVcsZ9iXgR9ZKde80+Y+40Is54AQ=
fyne.io/fyne/v2 v2.3.4 h1:CL8LBUoct2K3EF7Q7NdcDrDMcb3OrNJTghLYTFF400Q=
fyne.io/fyne/v2 v2.3.4/go.mod h1:X2+NrR+62mvAiAt2fwKT7035zQsE77KVV1NlvWo4vW8=
fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6 h1:lHt8dm97Uy9ggtnt9N6XOlsp76wXmRAh3SjReWm1e2Q=
fyne.io/systray v1.10.1-0.20230403195833-7dc3c09283d6/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE=
fyne.io/fyne/v2 v2.3.5 h1:Q8WOtsms+esLrBKJGdj6P+klu+UXzRq63uPxFSQm4nc=
fyne.io/fyne/v2 v2.3.5/go.mod h1:fbrL+kwOQ6sdVhnURktTHIRIEXwysQSLeejyFyABmNI=
fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b h1:MP1cUnIdF1cxrMhK9iw9H0JP3zopyD1zi84BqU6WTsE=
fyne.io/systray v1.10.1-0.20230602210930-b6a2d6ca2a7b/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
Expand Down Expand Up @@ -372,6 +372,8 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
Expand Down
2 changes: 2 additions & 0 deletions internal/assets/debug.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !release && !debug

// Package assets contains bundled static resources.
package assets

Expand Down
2 changes: 1 addition & 1 deletion internal/assets/release.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build ignore && (release || debug)
//go:build release || debug

package assets

Expand Down
15 changes: 15 additions & 0 deletions internal/assets/unix/io.github.jacalz.rymdport.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@
</kudos>

<releases>
<release version="3.4.0" date="2023-06-07" type="stable">
<description>
<ul>
<li>QR codes can now be generated for easily sending items to supported apps.</li>
<li>Progress bars no longer display the wrong percentage sometimes.</li>
<li>Fixed a potential crash that could happen sometimes when sending.</li>
<li>Added support for removing items that have completed the transfer.</li>
<li>Added keyboard shortcuts for switching between tabs.</li>
<li>The receive page now shows which code a received item came from.</li>
<li>Various improvements to performance and memory usage.</li>
<li>Updated fyne to v2.3.5 for many bug fixes.</li>
</ul>
</description>
<url type="details">https://github.com/Jacalz/rymdport/releases/tag/v3.3.5</url>
</release>
<release version="3.3.6" date="2023-05-11" type="stable">
<description>
<ul>
Expand Down
41 changes: 14 additions & 27 deletions internal/transport/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,21 @@ import (
"fyne.io/fyne/v2/widget"
)

// codeDisplay is a label extended to copy the code with a menu popup on rightclick.
type codeDisplay struct {
widget.Label
button *widget.Button
clipboard fyne.Clipboard
}

func (c *codeDisplay) copyOnPress() {
if c.Text != "Waiting for code..." {
c.button.SetIcon(theme.ConfirmIcon())
c.clipboard.SetContent(c.Text)
} else {
c.button.SetIcon(theme.CancelIcon())
}

time.Sleep(500 * time.Millisecond)
c.button.SetIcon(theme.ContentCopyIcon())
}

func newCodeDisplay(window fyne.Window) *fyne.Container {
c := &codeDisplay{
button: &widget.Button{Icon: theme.ContentCopyIcon(), Importance: widget.LowImportance},
clipboard: window.Clipboard(),
codeLabel := &widget.Label{Text: "Waiting for code..."}
copyButton := &widget.Button{Icon: theme.ContentCopyIcon(), Importance: widget.LowImportance}
clipboard := window.Clipboard()
copyButton.OnTapped = func() {
if codeLabel.Text != "Waiting for code..." {
copyButton.SetIcon(theme.ConfirmIcon())
clipboard.SetContent(codeLabel.Text)
} else {
copyButton.SetIcon(theme.CancelIcon())
}

time.Sleep(500 * time.Millisecond)
copyButton.SetIcon(theme.ContentCopyIcon())
}
c.ExtendBaseWidget(c)

c.Text = "Waiting for code..."
c.button.OnTapped = c.copyOnPress

return container.NewHBox(c, c.button)
return container.NewHBox(codeLabel, copyButton)
}
9 changes: 5 additions & 4 deletions internal/transport/bridge/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,24 @@ var maxMinSizeHeight float32 // Keeping all instances of the list layout consist
type listLayout struct{}

func (g *listLayout) Layout(objects []fyne.CanvasObject, size fyne.Size) {
innerPadding := theme.InnerPadding()
doublePadding := 2 * theme.InnerPadding()

objects[0].Move(fyne.NewPos(0, theme.InnerPadding()))
objects[0].Move(fyne.NewPos(0, innerPadding))
objects[0].Resize(fyne.NewSize(size.Height-theme.Padding(), size.Height-doublePadding))

cellSize := (size.Width - size.Height - doublePadding) / (float32(len(objects) - 1))
start, end := size.Height, size.Height+cellSize-theme.InnerPadding()
start, end := size.Height, size.Height+cellSize-innerPadding
for _, child := range objects[1:] {
if _, label := child.(*widget.Label); label {
child.Move(fyne.NewPos(start, (size.Height-child.MinSize().Height)/2))
} else {
child.Move(fyne.NewPos(start, theme.InnerPadding()))
child.Move(fyne.NewPos(start, innerPadding))
}

child.Resize(fyne.NewSize(end-start, size.Height-doublePadding))

start = end + theme.InnerPadding()
start = end + innerPadding
end = start + cellSize
}
}
Expand Down
Loading

0 comments on commit 4c9d9fa

Please sign in to comment.