Skip to content

Commit

Permalink
Fixed some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
woehrl01 committed Oct 13, 2019
1 parent 67ca66e commit f8908c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions calendarweek_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestOffsetCalendarWeekToDate_WithNoOffset(t *testing.T) {
expectedStartDate := time.Date(2019, time.October, 7, 0, 0, 0, 0, time.Local)

if week != expectedWeek {
t.Errorf("The startdate was incorrect, got: %d, want: %d.", week, expectedWeek)
t.Errorf("The week was incorrect, got: %d, want: %d.", week, expectedWeek)
}

if startDate != expectedStartDate {
Expand All @@ -58,7 +58,7 @@ func TestOffsetCalendarWeekToDate_WithOneOffset(t *testing.T) {
expectedStartDate := time.Date(2019, time.October, 14, 0, 0, 0, 0, time.Local)

if week != expectedWeek {
t.Errorf("The startdate was incorrect, got: %d, want: %d.", week, expectedWeek)
t.Errorf("The week was incorrect, got: %d, want: %d.", week, expectedWeek)
}

if startDate != expectedStartDate {
Expand Down
2 changes: 1 addition & 1 deletion dpiaware_nonwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

package main

func EnableDpiAwareness() {
func enableDpiAwareness() {
//NoOp
}
2 changes: 1 addition & 1 deletion dpiaware_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ var (
pSetProcessDPIAware = u32.NewProc("SetProcessDPIAware")
)

func EnableDpiAwareness() {
func enableDpiAwareness() {
pSetProcessDPIAware.Call()
}
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func main() {
EnableDpiAwareness()
enableDpiAwareness()

systray.Run(onReady, func() {})
}
Expand All @@ -18,15 +18,16 @@ var menus []*systray.MenuItem
func onReady() {
systray.SetTitle("Kalenderwoche")

addMenuItemsForUpcomingCalendarWeekDates()
const numberOfEntries = 15
addMenuItemsForUpcomingCalendarWeekDates(numberOfEntries)

go keepWeekNumberIconUpToDate()
go quitOnMenu()
}

func addMenuItemsForUpcomingCalendarWeekDates() {
for i := 0; i < 15; i++ {
var index = i
func addMenuItemsForUpcomingCalendarWeekDates(numberOfEntries int) {
for i := 0; i < numberOfEntries; i++ {
index := i
menus = append(menus, systray.AddMenuItem("refresh", ""))
go func() {
for {
Expand Down
2 changes: 1 addition & 1 deletion outlook_nonwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ package main
import "time"

func goToDate(dateToGo time.Time) {

//NoOp
}
2 changes: 1 addition & 1 deletion outlook_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func goToDate(dateToGo time.Time) {
calendar := oleutil.MustCallMethod(ns, "GetDefaultFolder", 9).ToIDispatch()
explorer := oleutil.MustCallMethod(outlook, "ActiveExplorer").ToIDispatch()
if explorer == nil {
/*Start outllok if not started*/
// Start outlook if not started
oleutil.MustCallMethod(calendar, "Display")
explorer = oleutil.MustCallMethod(outlook, "ActiveExplorer").ToIDispatch()
}
Expand Down

0 comments on commit f8908c1

Please sign in to comment.