Skip to content

Commit

Permalink
Fix whitespace in newer linter
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 3, 2024
1 parent 993694d commit 79a7398
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 21 deletions.
24 changes: 12 additions & 12 deletions internal/icon/fdo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ func setTestEnv(t *testing.T) {
}
}

//applications/app1.desktop and icons/default_theme/apps/32x32/app1.png
// applications/app1.desktop and icons/default_theme/apps/32x32/app1.png
func TestFdoLookupDefaultTheme(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app1")
assert.Equal(t, true, exists(data))
}

//applications/com.fyne.app.desktop and icons/default_theme/apps/scalable/app2.svg
// applications/com.fyne.app.desktop and icons/default_theme/apps/scalable/app2.svg
func TestFdoFileNameMisMatchAndScalable(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app2")
assert.Equal(t, true, exists(data))
}

//check the category from app1
// check the category from app1
func TestFdoIconCategory(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app1")
Expand All @@ -61,7 +61,7 @@ func TestFdoIconCategory(t *testing.T) {
assert.Equal(t, "Utility", data.(*fdoApplicationData).mainCategory())
}

//applications/app3.desktop and applications/app3.png
// applications/app3.desktop and applications/app3.png
func TestFdoIconNameIsPath(t *testing.T) {
setTestEnv(t)
dataLocation := os.Getenv("XDG_DATA_DIRS")
Expand All @@ -75,56 +75,56 @@ func TestFdoIconNameIsPath(t *testing.T) {
assert.Equal(t, true, exists(data))
}

//check NoDisplay from app4
// check NoDisplay from app4
func TestFdoIconHide(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app4")
assert.Equal(t, true, data.Hidden())
}

//applications/app4.desktop and pixmaps/app4.png
// applications/app4.desktop and pixmaps/app4.png
func TestFdoIconInPixmaps(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app4")
assert.Equal(t, true, exists(data))
}

//applications/app5.desktop and icons/hicolor/32x32/apps/app5.png
// applications/app5.desktop and icons/hicolor/32x32/apps/app5.png
func TestFdoIconHicolorFallback(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app5")
assert.Equal(t, true, exists(data))
}

//applications/app6.desktop and icons/hicolor/scalable/apps/app6.svg
// applications/app6.desktop and icons/hicolor/scalable/apps/app6.svg
func TestFdoIconHicolorFallbackScalable(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app6")
assert.Equal(t, true, exists(data))
}

//applications/app7.desktop and icons/default_theme/apps/16x16/app7.png
// applications/app7.desktop and icons/default_theme/apps/16x16/app7.png
func TestFdoLookupDefaultThemeDifferentSize(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app7")
assert.Equal(t, true, exists(data))
}

//applications/app8.desktop and icons/third_theme/apps/32/app8.png
// applications/app8.desktop and icons/third_theme/apps/32/app8.png
func TestFdoLookupAnyThemeFallback(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("app8")
assert.Equal(t, true, exists(data))
}

//applications/xterm.desktop and icons/third_theme/emblems/16x16/app9.png
// applications/xterm.desktop and icons/third_theme/emblems/16x16/app9.png
func TestFdoLookupIconNotInApps(t *testing.T) {
setTestEnv(t)
data := NewFDOIconProvider().(*fdoIconProvider).lookupApplication("xterm")
assert.Equal(t, true, exists(data))
}

//missing - not able to match
// missing - not able to match
func TestFdoLookupMissing(t *testing.T) {
setTestEnv(t)
provider := NewFDOIconProvider()
Expand Down
4 changes: 2 additions & 2 deletions internal/ui/baricon.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type barIcon struct {
windowData *appWindow // The window data associated with this icon (if it is a task window)
}

//Tapped means barIcon has been clicked
// Tapped means barIcon has been clicked
func (bi *barIcon) Tapped(*fyne.PointEvent) {
bi.onTapped()
}
Expand Down Expand Up @@ -112,7 +112,7 @@ func removeFromBar(icon fynedesk.AppData) {
settings.(*deskSettings).setLauncherIcons(icons)
}

//TappedSecondary means barIcon has been clicked by a secondary binding
// TappedSecondary means barIcon has been clicked by a secondary binding
func (bi *barIcon) TappedSecondary(*fyne.PointEvent) {
app := bi.appData
if app == nil && bi.windowData != nil {
Expand Down
6 changes: 3 additions & 3 deletions internal/ui/barlayout.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ const (
separatorWidth = 2
)

//barLayout returns a layout used for zooming linear groups of icons
// barLayout returns a layout used for zooming linear groups of icons
type barLayout struct {
bar *bar

mouseInside bool // Is the mouse inside of the layout?
mousePosition fyne.Position // Current coordinates of the mouse cursor
}

//setPointerInside tells the barLayout that the mouse is inside of the Layout.
// setPointerInside tells the barLayout that the mouse is inside of the Layout.
func (bl *barLayout) setPointerInside(inside bool) {
bl.mouseInside = inside
}

//setPointerPosition tells the barLayout that the mouse position has been updated.
// setPointerPosition tells the barLayout that the mouse position has been updated.
func (bl *barLayout) setPointerPosition(position fyne.Position) {
bl.mousePosition = position
}
Expand Down
9 changes: 6 additions & 3 deletions modules/systray/generated/notifier/status_notifier_item.go

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

3 changes: 2 additions & 1 deletion modules/systray/generated/watcher/status_notifier_watcher.go

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

0 comments on commit 79a7398

Please sign in to comment.