Skip to content

Add assets#8

Merged
leaanthony merged 1 commit into
masterfrom
Port-Build
Jan 8, 2019
Merged

Add assets#8
leaanthony merged 1 commit into
masterfrom
Port-Build

Conversation

@leaanthony

Copy link
Copy Markdown
Member

No description provided.

@leaanthony leaanthony merged commit ab6e753 into master Jan 8, 2019
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 30, 2022

Copy link
Copy Markdown

Deploying wails with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6d6a488
Status:🚫  Build failed.

View logs

IanVS pushed a commit to IanVS/wails that referenced this pull request Feb 28, 2025
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant