Skip to content

Commit

Permalink
Merge branch 'develop' into feature/desktopfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Oct 27, 2024
2 parents a6b9e8b + 354e4c4 commit 9673b85
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 41 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<a href="https://godoc.org/fyshos.com/fynedesk" title="GoDoc Reference" rel="nofollow"><img src="https://img.shields.io/badge/go-documentation-blue.svg?style=flat" alt="GoDoc Reference"></a>
<a href="https://github.com/fyshos/fynedesk/releases/tag/v0.3.0" title="0.3.0 Release" rel="nofollow"><img src="https://img.shields.io/badge/version-0.3.0-blue.svg?style=flat" alt="0.3.0 release"></a>
<a href='http://gophers.slack.com/messages/fyne'><img src='https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=blue' alt='Join us on Slack' /></a>
<a href="https://github.com/fyshos/fynedesk/releases/tag/v0.4.0" title="0.4.0 Release" rel="nofollow"><img src="https://img.shields.io/badge/version-0.4.0-blue.svg?style=flat" alt="0.4.0 release"></a>
<a href='http://gophers.slack.com/messages/fynedesk'><img src='https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=blue' alt='Join us on Slack' /></a>

<br />
<a href="https://goreportcard.com/report/fyshos.com/fynedesk"><img src="https://goreportcard.com/badge/fyshos.com/fynedesk" alt="Code Status" /></a>
Expand All @@ -16,19 +16,15 @@ It is built using the [Fyne](https://fyne.io) toolkit and is designed to be
easy to use as well as easy to develop. We use the Go language and welcome
any contributions or feedback for the project.

<<<<<<< HEAD
[![FyneDesk v0.4](https://img.youtube.com/vi/82Wu5k0xZOI/0.jpg)](https://www.youtube.com/watch?v=82Wu5k0xZOI)

## Dependencies

### Compiling

Compiling requires the same dependencies as Fyne. See the [Getting Started](https://developer.fyne.io/started/) documentation for installation steps.

### Running
=======
[![FyneDesk v0.4](https://img.youtube.com/vi/82Wu5k0xZOI/0.jpg)](https://www.youtube.com/watch?v=82Wu5k0xZOI)

# Dependencies
>>>>>>> c4b4c54 (Updated docs and embed video of release)

For a full desktop experience you will also need the following external tools installed:

Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module fyshos.com/fynedesk
go 1.19

require (
fyne.io/fyne/v2 v2.5.1-0.20240815191931-e5989189e655
fyne.io/fyne/v2 v2.5.3-0.20241018190600-e02dad22c257
github.com/BurntSushi/xgb v0.0.0-20201008132610-5f9e7b3c49cd
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e
github.com/FyshOS/backgrounds v0.0.0-20230616202904-0a8b6ebaa184
github.com/Knetic/govaluate v3.0.0+incompatible
github.com/disintegration/imaging v1.6.2
github.com/fyne-io/image v0.0.0-20221020213044-f609c6a24345
github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964
github.com/fyshos/fyles v0.0.0-20240105185750-ba0c41e1f720
github.com/godbus/dbus/v5 v5.1.0
github.com/jackmordaunt/icns v1.0.1-0.20200413110149-9e181b441ab2
Expand All @@ -25,7 +25,7 @@ require (
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49 // indirect
github.com/nicksnyder/go-i18n/v2 v2.4.0 // indirect
github.com/rymdport/portal v0.2.2 // indirect
github.com/rymdport/portal v0.2.6 // indirect
)

require (
Expand All @@ -34,18 +34,18 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298 // indirect
github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fredbi/uri v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect
github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a // indirect
github.com/fyne-io/terminal v0.0.0-20240728203942-56c3b98b9208
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect
github.com/go-text/render v0.1.1-0.20240418202334-dd62631dae9b // indirect
github.com/go-text/typesetting v0.1.0 // indirect
github.com/go-text/render v0.2.0 // indirect
github.com/go-text/typesetting v0.2.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
Expand Down
30 changes: 15 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
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.5.1-0.20240815191931-e5989189e655 h1:o+g1Yb0fzLJGFqy1lgf5KbRoy+6Ww1pLzYpwsoEHnbw=
fyne.io/fyne/v2 v2.5.1-0.20240815191931-e5989189e655/go.mod h1:FJqxIqtPduJbHOSHnLVQtHoTiuO34+IvRL9EkKdlaxs=
fyne.io/fyne/v2 v2.5.3-0.20241018190600-e02dad22c257 h1:1ng5ycmy6auaTCRqNCi6Ygn5nyInfa6x0e21YRDJK98=
fyne.io/fyne/v2 v2.5.3-0.20241018190600-e02dad22c257/go.mod h1:26gqPDvtaxHeyct+C0BBjuGd2zwAJlPkUGSBrb+d7Ug=
fyne.io/systray v1.11.0 h1:D9HISlxSkx+jHSniMBR6fCFOUjk1x/OOOJLa9lJYAKg=
fyne.io/systray v1.11.0/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
github.com/ActiveState/termtest/conpty v0.5.0 h1:JLUe6YDs4Jw4xNPCU+8VwTpniYOGeKzQg4SM2YHQNA8=
Expand Down Expand Up @@ -79,8 +79,9 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand All @@ -101,8 +102,8 @@ github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe h1:A/wiwvQ0CAjPkuJyt
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe/go.mod h1:d4clgH0/GrRwWjRzJJQXxT/h1TyuNSfF/X64zb/3Ggg=
github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a h1:ybgRdYvAHTn93HW79bLiBiJwVL4jVeyGQRZMgImoeWs=
github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a/go.mod h1:gsGA2dotD4v0SR6PmPCYvS9JuOeMwAtmfvDE7mbYXMY=
github.com/fyne-io/image v0.0.0-20221020213044-f609c6a24345 h1:ONkcbJmsWUOHyjUm0wlnkFc/uaacFFtStVbsG6qJfew=
github.com/fyne-io/image v0.0.0-20221020213044-f609c6a24345/go.mod h1:eO7W361vmlPOrykIg+Rsh1SZ3tQBaOsfzZhsIOb/Lm0=
github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964 h1:0pTELtjlVAVGSazfwRNcqTVzqmkWb1GsNozCmmZfdZA=
github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964/go.mod h1:J9Uunu842kOcTjzQj4Eq8XIDmF55szvT1PTS1cUb1UE=
github.com/fyne-io/terminal v0.0.0-20240728203942-56c3b98b9208 h1:ZMTEq3IAv6EQv6XuMpF6KSBT+c0/ou/O9uxoQvPyA2c=
github.com/fyne-io/terminal v0.0.0-20240728203942-56c3b98b9208/go.mod h1:uTxDe2dNdJWfmUAgWwG+leivgNxSfCY50t+AiNdPmiM=
github.com/fyne-io/xgbutil v0.0.0-20191220152344-7d838166824d h1:8+poQtDqiRfAZmeyYRlInuaIBsQEflmxtpJeZklvNuE=
Expand All @@ -117,11 +118,11 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a h1:vxnBhFDDT+xzxf1jTJKMKZw3H0swfWk9RpWbBbDK5+0=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-text/render v0.1.1-0.20240418202334-dd62631dae9b h1:daoFn+Aw8EIQZO9kYWwHL01FqwwpCl2nTeVEYbsgRHk=
github.com/go-text/render v0.1.1-0.20240418202334-dd62631dae9b/go.mod h1:jqEuNMenrmj6QRnkdpeaP0oKGFLDNhDkVKwGjsWWYU4=
github.com/go-text/typesetting v0.1.0 h1:vioSaLPYcHwPEPLT7gsjCGDCoYSbljxoHJzMnKwVvHw=
github.com/go-text/typesetting v0.1.0/go.mod h1:d22AnmeKq/on0HNv73UFriMKc4Ez6EqZAofLhAzpSzI=
github.com/go-text/typesetting-utils v0.0.0-20240329101916-eee87fb235a3 h1:levTnuLLUmpavLGbJYLJA7fQnKeS7P1eCdAlM+vReXk=
github.com/go-text/render v0.2.0 h1:LBYoTmp5jYiJ4NPqDc2pz17MLmA3wHw1dZSVGcOdeAc=
github.com/go-text/render v0.2.0/go.mod h1:CkiqfukRGKJA5vZZISkjSYrcdtgKQWRa2HIzvwNN5SU=
github.com/go-text/typesetting v0.2.0 h1:fbzsgbmk04KiWtE+c3ZD4W2nmCRzBqrqQOvYlwAOdho=
github.com/go-text/typesetting v0.2.0/go.mod h1:2+owI/sxa73XA581LAzVuEBZ3WEEV2pXeDswCH/3i1I=
github.com/go-text/typesetting-utils v0.0.0-20240317173224-1986cbe96c66 h1:GUrm65PQPlhFSKjLPGOZNPNxLCybjzjYBzjfoBGaDUY=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down Expand Up @@ -226,8 +227,8 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e h1:LvL4XsI70QxOGHed6yhQtAU34Kx3Qq2wwBzGFKY8zKk=
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 h1:YLvr1eE6cdCqjOe972w/cYF+FjW34v27+9Vo5106B4M=
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
Expand Down Expand Up @@ -275,8 +276,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/rymdport/portal v0.2.2 h1:P2Q/4k673zxdFAsbD8EESZ7psfuO6/4jNu6EDrDICkM=
github.com/rymdport/portal v0.2.2/go.mod h1:kFF4jslnJ8pD5uCi17brj/ODlfIidOxlgUDTO5ncnC4=
github.com/rymdport/portal v0.2.6 h1:HWmU3gORu7vWcpr7VSwUS2Xx1HtJXVcUuTqEZcMEsIg=
github.com/rymdport/portal v0.2.6/go.mod h1:kFF4jslnJ8pD5uCi17brj/ODlfIidOxlgUDTO5ncnC4=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
Expand All @@ -303,7 +304,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
Expand Down
7 changes: 7 additions & 0 deletions icons.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ type AppData interface {
Categories() []string // Categories is a list of categories that the app fits in (platform specific)
Hidden() bool // Hidden specifies whether instances of this app should be hidden
Icon(theme string, size int) fyne.Resource // Icon returns an icon for the app in the requested theme and size

Source() *AppSource // Source will return the location of the app source code from metadata, if known
}

// AppSource represents the source code informtion of an application
type AppSource struct {
Repo, Dir string
}

// ApplicationProvider describes a type that can locate icons and applications for the current system
Expand Down
26 changes: 23 additions & 3 deletions internal/icon/fdo.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ type fdoApplicationData struct {
categories []string
hide bool
iconCache fyne.Resource

source *fynedesk.AppSource
}

// Name returns the name associated with an fdo app
Expand All @@ -55,7 +57,7 @@ func (data *fdoApplicationData) IconName() string {
return data.iconName
}

// IconPath returns the path of the icon that an fdo app wishes to use
// Icon returns the path of the icon that an fdo app wishes to use
func (data *fdoApplicationData) Icon(theme string, size int) fyne.Resource {
if data.iconCache != nil {
return data.iconCache
Expand All @@ -73,6 +75,10 @@ func (data *fdoApplicationData) Icon(theme string, size int) fyne.Resource {
return data.iconCache
}

func (data *fdoApplicationData) Source() *fynedesk.AppSource {
return data.source
}

// extractArgs sanitises argument parameters from an Exec configuration
func extractArgs(args []string) []string {
var ret []string
Expand Down Expand Up @@ -106,7 +112,7 @@ func (data *fdoApplicationData) Run(env []string) error {
return cmd.Start()
}

func (data fdoApplicationData) mainCategory() string {
func (data *fdoApplicationData) mainCategory() string {
if len(data.Categories()) == 0 {
return fallbackCategory
}
Expand Down Expand Up @@ -457,7 +463,21 @@ func newFdoIconData(desktopPath string) fynedesk.AppData {
if strings.HasPrefix(line, "[") {
currentSection = line
}
if currentSection != "[Desktop Entry]" {
switch currentSection {
case "[X-Fyne Source]":
if fdoApp.source == nil {
fdoApp.source = &fynedesk.AppSource{}
}
if strings.HasPrefix(line, "Repo=") {
name := strings.SplitAfter(line, "=")
fdoApp.source.Repo = name[1]
}
if strings.HasPrefix(line, "Dir=") {
name := strings.SplitAfter(line, "=")
fdoApp.source.Dir = name[1]
}
case "[Desktop Entry]": // fall through to code below
default:
continue
}
if strings.HasPrefix(line, "Name=") {
Expand Down
10 changes: 10 additions & 0 deletions internal/icon/fdo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ func TestFdoIconHicolorFallbackScalable(t *testing.T) {
assert.Equal(t, true, exists(data))
}

// applications/com.fyne.app.desktop
func TestFdoIconSource(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app2")

assert.NotNil(t, data.Source())
assert.Equal(t, "https://example.com/repo", data.Source().Repo)
assert.Equal(t, "cmd/dir", data.Source().Dir)
}

// applications/app7.desktop and icons/default_theme/apps/16x16/app7.png
func TestFdoLookupDefaultThemeDifferentSize(t *testing.T) {
setTestEnv(t)
Expand Down
4 changes: 4 additions & 0 deletions internal/icon/macos.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func (m *macOSAppBundle) Run([]string) error {
return exec.Command("open", "-a", m.runPath).Start()
}

func (m *macOSAppBundle) Source() *fynedesk.AppSource {
return nil
}

func loadAppBundle(name, path, category string) fynedesk.AppData {
buf, err := os.Open(filepath.Join(path, "Contents", "Info.plist"))
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions internal/icon/testdata/applications/com.fyne.app.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
Name=App2
Exec=app2
Icon=app2

[X-Fyne Source]
Repo=https://example.com/repo
Dir=cmd/dir
2 changes: 1 addition & 1 deletion internal/ui/about_bundled.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions internal/ui/bar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"image/color"
"testing"

"fyshos.com/fynedesk"

"fyne.io/fyne/v2"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/test"
Expand Down Expand Up @@ -40,6 +42,11 @@ func (d *dummyIcon) Run([]string) error {
return nil
}

func (d *dummyIcon) Source() *fynedesk.AppSource {
// no-op
return nil
}

func testBar(icons []string) *bar {
testBar := newBar(wmTest.NewDesktopWithWM(&embededWM{}))
testBar.children = []fyne.CanvasObject{} // remove divider, then we add it again later
Expand Down
Loading

0 comments on commit 9673b85

Please sign in to comment.