diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f65dae91..7815ad7c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- **Windows: the app list and the file picker wear the current icon.** The icon + linked into the executable was still the purple meteor retired two releases + ago, and it is the one Windows draws in two places the window itself never + covers: the Start Menu's app list, and the taskbar button of the native file + picker — the dialog that opens a project. So the window and its taskbar entry + showed the current mark while the app list, one keypress away, showed the old + one. Both now match. + - **The dock now reviews the directory the session is actually working in.** A session that moved — spawned in one checkout and `cd`-ed into another repository — moved its card and the footer with it: both read the live working diff --git a/Taskfile.yml b/Taskfile.yml index 05a98b281..4173befa0 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -28,6 +28,16 @@ tasks: cmds: - cmd: CGO_ENABLED=0 go build {{.GO_BUILD_FLAGS}} -o {{.BIN_DIR}}/{{.APP_NAME}} . + icons:windows: + desc: Regenerate rsrc_windows_amd64.syso from build/windows/lich.ico + cmds: + # The .syso is the resource the Windows executable links, and it is the + # only source of the exe's icon: the Start Menu shortcut and the native + # file picker (an in-process COM dialog) both draw it. Nothing rebuilds + # it automatically, so a new lich.ico that skips this task ships an + # executable still wearing the previous mark. + - cmd: go run github.com/akavel/rsrc@v0.10.2 -ico build/windows/lich.ico -arch amd64 -o rsrc_windows_amd64.syso + build:windows: desc: Cross-compile the Windows binary (experimental) deps: [build:frontend] diff --git a/internal/project/picker.go b/internal/project/picker.go index 9ca36ab24..623835925 100644 --- a/internal/project/picker.go +++ b/internal/project/picker.go @@ -6,8 +6,10 @@ import ( "github.com/ncruces/zenity" ) -// ZenityPicker shells out to zenity/qarma (github.com/ncruces/zenity) — the -// Chromium shell has no native dialog of its own. Cancel maps to ("", nil). +// ZenityPicker opens the OS file chooser through github.com/ncruces/zenity — +// the Chromium shell has no native dialog of its own. Only Linux shells out to +// zenity/qarma; Windows and macOS run the dialog in-process, so there it is a +// window of lich's own and wears the executable's icon. Cancel maps to ("", nil). type ZenityPicker struct{} func (ZenityPicker) PickDirectory(title string) (string, error) { diff --git a/rsrc_windows_amd64.syso b/rsrc_windows_amd64.syso index 5940a8940..3f442e7ba 100644 Binary files a/rsrc_windows_amd64.syso and b/rsrc_windows_amd64.syso differ