Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 4 additions & 2 deletions internal/project/picker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Binary file modified rsrc_windows_amd64.syso
Binary file not shown.