Add assets#8
Merged
Merged
Conversation
IanVS
pushed a commit
to IanVS/wails
that referenced
this pull request
Feb 28, 2025
Provide path to bindings for plugin
leaanthony
added a commit
that referenced
this pull request
May 16, 2026
- Revert setHidden in menuitem_linux_gtk3.go: widgetSetVisible takes a `hidden` flag (true → gtk_widget_hide, false → gtk_widget_show) — the same convention as the GTK4 (linux_cgo.go) and purego (linux_purego.go) implementations. The original `widgetSetVisible(l.native, hidden)` was correct; the negation introduced in the previous commit inverted behaviour. Bug-bash item #8 in #5465 misread the function name. - Make NewCalloc return *Calloc to match the pointer-receiver String/Free so the API is consistently pointer-semantic and chained calls like `NewCalloc().String(...)` continue to compile. Existing call sites (`c := NewCalloc(); defer c.Free()`) are unchanged. - Update UNRELEASED_CHANGELOG.md accordingly: drop the (incorrect) setHidden line, note the NewCalloc return-type change. Refs #5466 review (Copilot).
leaanthony
added a commit
that referenced
this pull request
May 17, 2026
- Revert setHidden in menuitem_linux_gtk3.go: widgetSetVisible takes a `hidden` flag (true → gtk_widget_hide, false → gtk_widget_show) — the same convention as the GTK4 (linux_cgo.go) and purego (linux_purego.go) implementations. The original `widgetSetVisible(l.native, hidden)` was correct; the negation introduced in the previous commit inverted behaviour. Bug-bash item #8 in #5465 misread the function name. - Make NewCalloc return *Calloc to match the pointer-receiver String/Free so the API is consistently pointer-semantic and chained calls like `NewCalloc().String(...)` continue to compile. Existing call sites (`c := NewCalloc(); defer c.Free()`) are unchanged. - Update UNRELEASED_CHANGELOG.md accordingly: drop the (incorrect) setHidden line, note the NewCalloc return-type change. Refs #5466 review (Copilot).
leaanthony
added a commit
that referenced
this pull request
May 17, 2026
) * fix(v3/linux/gtk3): resolve pre-existing bugs in legacy gtk3 path Cluster of pre-existing bugs in the legacy GTK3 implementation files (now `*_gtk3.go` after #5463). Surfaced by CodeRabbit on #5463; the file rename made them visible but the bugs themselves predate the default-flip. All affect the `-tags gtk3` build path only. application_linux_gtk3.go - run(): drop the early `return nil` on the file-association branch so startup handlers, common event setup, theme/power monitoring, and the GTK main loop still run after `ApplicationOpenedWithFile` is emitted. Restructure the surrounding `else` so the "not a URL, potential file open?" debug log no longer fires after a successful file-association match. - getTheme(): guard `body[2]` access with `len(body) >= 3` and use comma-ok type assertions for `dbus.Variant` and the inner `string`, returning `("", false)` on any mismatch instead of panicking. linux_cgo_gtk3.go - appName(): drop the `defer C.free` on the pointer returned by `g_get_application_name()`. That memory belongs to GLib internal storage; `C.GoString` already copies into Go memory. - clipboardGet(): nil-check the `gchar*` returned by `gtk_clipboard_wait_for_text` and `g_free` it after copying into a Go string. Previously leaked on every call. - Calloc.String / Calloc.Free: change to pointer receivers so the `append(c.pool, ...)` actually grows the original pool. With value receivers the pool stayed empty and Free was a no-op, leaking every `c.String(...)` allocation. - zoomIn / zoomOut: drop the negative `-1.10` multiplier (which `setZoom` then clamped to 1.0) and use the reciprocal of `zoomInFactor` for zoomOut. Promoted the factor to a package-level const and removed the stale "FIXME: assumed to be incorrect" comment. - execJS: reuse the file-level `emptyWorldName` C string instead of allocating a fresh `C.CString("")` per call that was never freed. menuitem_linux_gtk3.go - setHidden: pass `!hidden` to `widgetSetVisible` (previously inverted; hiding a menu item showed it and vice versa). - setAccelerator: drop the development `fmt.Println("setAccelerator", ...)`. The identical `Calloc` value-receiver bug also exists verbatim in `linux_cgo.go` (the now-default GTK4 path); intentionally left for a follow-up to keep this PR scoped to the gtk3 tracking issue. Refs #5465 * fix(v3/linux/gtk3): address Copilot review on #5466 - Revert setHidden in menuitem_linux_gtk3.go: widgetSetVisible takes a `hidden` flag (true → gtk_widget_hide, false → gtk_widget_show) — the same convention as the GTK4 (linux_cgo.go) and purego (linux_purego.go) implementations. The original `widgetSetVisible(l.native, hidden)` was correct; the negation introduced in the previous commit inverted behaviour. Bug-bash item #8 in #5465 misread the function name. - Make NewCalloc return *Calloc to match the pointer-receiver String/Free so the API is consistently pointer-semantic and chained calls like `NewCalloc().String(...)` continue to compile. Existing call sites (`c := NewCalloc(); defer c.Free()`) are unchanged. - Update UNRELEASED_CHANGELOG.md accordingly: drop the (incorrect) setHidden line, note the NewCalloc return-type change. Refs #5466 review (Copilot). * fix(v3/linux): apply Calloc value-receiver fix to the default GTK4 path Mirror the same Calloc fix from linux_cgo_gtk3.go in linux_cgo.go (the now-default GTK4 build). Without pointer receivers, `append(c.pool, ...)` in `String` mutated a copy, so the pool stayed empty and `Free()` was a no-op — every per-window `c.String(...)` allocation in `setupSignalHandlers` and `windowNewWebview` leaked. With value receivers gone, allocations are tracked and released on Free. `NewCalloc` now returns `*Calloc` so the API is consistently pointer-semantic across both build tags. Refs #5466 review (Copilot).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.