11386 Commits

Author SHA1 Message Date
Mitchell Hashimoto
297e9cb8ab new suppressions to deal solely with showing the about window 2025-07-25 12:19:34 -07:00
Mitchell Hashimoto
02e6ef7e9b apprt/gtk-ng: setup action maps in app and window 2025-07-25 12:10:30 -07:00
Mitchell Hashimoto
e865535f6e apprt/gtk-ng: simple headerbar 2025-07-25 12:10:11 -07:00
Mitchell Hashimoto
b8dd767fe4 apprt/gtk: fix double-free if quit action is used (#8068)
This fixes a double-free that Valgrind found when the quit action was
used (the keybinding to quit or the menu item). This fixes it in both
the gtk and gtk-ng apprts.

The issue stems from the fact that our quit action worked by traversing
the toplevels and destroying all windows. When all windows are
destroyed, GTK exits the main loop.

When fcitx is used as the input method editor (IME), it appears to hold
its own `gtk.Window` widget as a property (probably for the IME popup).
Unfortunately this does not react well to being destroyed externally and
triggers a double-free when the IME widget also tries to dispose itself.

I think this is probably a bug somewhere in the GTK IME widget because
it should be resilient to this kind of destruction. But, we can't
tolerate a double free in the mean time.

We can still quit by destroying only OUR windows (which cascades to
destroy everything else).
2025-07-25 12:01:54 -07:00
Mitchell Hashimoto
a477921b80 apprt/gtk: fix double-free if quit action is used
This fixes a double-free that Valgrind found when the quit action was
used (the keybinding to quit or the menu item). 

The issue stems from the fact that our quit action worked by traversing the 
toplevels and destroying all windows. When all windows are destroyed,
GTK exits the main loop.

When fcitx is used as the input method editor (IME), it appears to hold
its own `gtk.Window` widget as a property (probably for the IME popup).
Unfortunately this does not react well to being destroyed externally and
triggers a double-free when the IME widget also tries to dispose itself.

I think this is probably a bug somewhere in the GTK IME widget because
it should be resilient to this kind of destruction. But, we can't
tolerate a double free in the mean time.

We can still quit by destroying only OUR windows (which cascades to
destroy everything else).
2025-07-25 11:53:22 -07:00
Jeffrey C. Ollie
abfab82ef7 gtk-ng: add debug warning banner (#8057) 2025-07-25 13:18:58 -05:00
Jeffrey C. Ollie
f390941fd6 gtk-ng: move debug property to window 2025-07-25 12:46:56 -05:00
Jeffrey C. Ollie
33135f19dc gtk-ng: add debug warning banner 2025-07-25 12:46:55 -05:00
Mitchell Hashimoto
3cdd6f4f5e apprt/gtk-ng: surface inheritance, new window (#8067)
This makes the `new_window` action properly inherit properties from the
parent surface that initiated the action. Today, that is only the pwd
and font size.
2025-07-25 10:29:45 -07:00
Mitchell Hashimoto
830d49c185 apprt/gtk-ng: surface inheritance, new window
This makes the `new_window` action properly inherit properties from the
parent surface that initiated the action. Today, that is only the pwd
and font size.
2025-07-25 10:17:08 -07:00
Mitchell Hashimoto
787960e56d apprt/gtk-ng: hook up bell ringing (#8065)
For now, this just emits a signal that an embedding widget will react to
to do something like flashing the window.

I think we should implement the audio bell in the actual surface view
but I don't currently have audio drivers hooked up in my Linux VM and
I'm away from my desktop PC. :)

cc @jcollie if you're interested, pretty tightly scoped.
2025-07-25 09:29:16 -07:00
Mitchell Hashimoto
b36b7031a1 apprt/gtk-ng: hook up bell ringing
For now, this just emits a signal that an embedding widget will react to
to do something like flashing the window. 

I think we should implement the audio bell in the actual surface view
but I don't currently have audio drivers hooked up in my Linux VM and
I'm away from my desktop PC. :)
2025-07-25 09:01:45 -07:00
Mitchell Hashimoto
6d6b911fad macos: add more Tahoe menu item icons from SF Symbols (#8050)
This is a follow up to https://github.com/ghostty-org/ghostty/pull/7594
<img width="487" height="318" alt="Screenshot 2025-07-24 at 23 10 20"
src="https://github.com/user-attachments/assets/83491b18-ef64-4a8f-b63d-a0001352cc31"
/>
<img width="544" height="295" alt="Screenshot 2025-07-24 at 23 11 01"
src="https://github.com/user-attachments/assets/10922879-ac1b-409d-8a3b-c298a1411813"
/>
2025-07-25 07:24:11 -07:00
Weizhao Ouyang
b7f6da7857 macos: add more Tahoe menu item icons from SF Symbols
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2025-07-25 22:14:13 +08:00
trag1c
03ea024bc1 i18n: Updated translation for nl_NL (#8040) 2025-07-24 21:29:40 +02:00
Mitchell Hashimoto
8016e0be6d Fix tab titles not being preserved with window-save-state (#8037)
Fixes #7938



https://github.com/user-attachments/assets/766a5d7a-f660-428f-b82b-3eafea83eff3
2025-07-23 16:48:35 -07:00
Mitchell Hashimoto
70f6e8b03f apprt/gtk-ng: surface progress bar (#8045)
Straightforward port of existing functionality. No memory leaks
detected.
2025-07-23 16:39:19 -07:00
Mitchell Hashimoto
00cce91dc4 apprt/gtk-ng: surface progress bar 2025-07-23 16:29:56 -07:00
Mitchell Hashimoto
eb3f3fff83 apprt/gtk-ng: keep child_exited property up to date 2025-07-23 16:03:27 -07:00
Mitchell Hashimoto
9a3239ba9f apprt/gtk-ng: child exited overlay (#8044)
This ports the child exited overlay.

We're able to use Zig comptime and Blueprint templates to use the same
Surface blueprint for this even if libadwaita is too old to support
banners (< 1.3) by inheriting from `gtk.Widget` instead and not
instantiating the blueprint. Its a bit noisy to maintain the `noop`
version but we should be able to test that compilation in CI (we do via
Debian 12).
2025-07-23 16:01:35 -07:00
Mitchell Hashimoto
cd664078ad apprt/gtk-ng: child exited overlay 2025-07-23 15:47:44 -07:00
Jeffrey C. Ollie
8571bd67f9 devshell: add deps that allow GTK to load SVG resources (#8041)
GTK dynamically loads librsvg when it needs to convert a SVG-only icon
(or any other SVG-only resource) for display. This PR adds the libraries
that GTK needs so that running programs from within the developer shell
can display those SVG resources.
2025-07-23 16:09:20 -05:00
Jeffrey C. Ollie
3dc45fcd55 devshell: add deps that allow GTK to load SVG resources
GTK dynamically loads librsvg when it needs to convert a SVG-only icon
(or any other SVG-only resource) for display. This PR adds the libraries
that GTK needs so that running programs from within the developer shell
can display those SVG resources.
2025-07-23 15:48:00 -05:00
Merijntje Tak
e8ab00aa4b Added translation for nl_NL 2025-07-23 22:37:03 +02:00
Mitchell Hashimoto
f7424c8a76 apprt/gtk-ng: surface drag and drop (#8039) 2025-07-23 12:48:43 -07:00
Mitchell Hashimoto
550d29d930 apprt/gtk-ng: surface drag and drop 2025-07-23 12:35:31 -07:00
Mitchell Hashimoto
9ea87ec096 New icon for Linux GTK app that aligns with the Gnome HIG (#8038)
This adds a new icon for the GTK-based application that adheres (mostly)
to the Gnome Human Interface Guidelines (HIG). The icon is designed to
fit in better with other Gnome applications.

While there isn't a single standard "native" style amongst Linux
applications, I believe this better fits the general Linux desktop
ecosystem over our macOS icon.

The icon itself is undeniably Ghostty. The core design language is the
same and I don't think ayone will mistake it for anything else. I wanted
to keep the brand the same, but making it fit in better aligns with
Ghostty's goal of being "platform native".

As of this PR, you can't use the macOS icon on Linux without modifying
the source. We may provide a compile-time option to swap icons in the
future (unfortunately Linux desktop applications require hardcoding an
icon path in the desktop files, so making it runtime selectable is...
messy!)

<img width="2048" height="2048" alt="2048"
src="https://github.com/user-attachments/assets/0b15e6db-bb6d-424c-8a83-ca809759b0c4"
/>
2025-07-23 10:06:19 -07:00
Mitchell Hashimoto
b50c1c4fa0 New icon for Linux GTK app that aligns with the Gnome HIG
This adds a new icon for the GTK-based application that adheres (mostly)
to the Gnome Human Interface Guidelines (HIG). The icon is designed to
fit in better with other Gnome applications. 

While there isn't a single standard "native" style amongst Linux
applications, I believe this better fits the general Linux desktop
ecosystem over our macOS icon.

The icon itself is undeniably Ghostty. The core design language is the
same and I don't think ayone will mistake it for anything else. I wanted
to keep the brand the same, but making it fit in better aligns with
Ghostty's goal of being "platform native".
2025-07-23 10:00:55 -07:00
Bryan Lee
852eb2e0d5 Fix tab titles not being preserved with window-save-state
Add serialization for tab titles in SurfaceView to persist user-set titles across app restarts. Bump TerminalRestorableState version to 4 to handle the new format.
2025-07-23 23:21:44 +08:00
Mitchell Hashimoto
df57f17be8 apprt/gtk-ng: bind template callbacks so we can connect signals in blp (#8035)
This creates a helper so that we can call
[`gtk_widget_class_bind_template_callback_full`](https://docs.gtk.org/gtk4/class_method.Widget.bind_template_callback_full.html)
and register signal handlers directly in our Blueprint file. This gets
rid of a LOT of boilerplate!

A draft, since there are TODOs:

- [x] Add comptime verification of the `func` param
- [x] Convert more blueprint files
2025-07-23 07:30:25 -07:00
Mitchell Hashimoto
010e9199ca apprt/gtk-ng: bind template callbacks so we can connect signals in blp 2025-07-23 07:24:00 -07:00
Mitchell Hashimoto
2e68f0a4d4 update zig-gobject pick up fix for ianprime0509/zig-gobject#111 (#8036) 2025-07-23 07:01:48 -07:00
Jeffrey C. Ollie
80b72dd6cb update zig-gobject pick up fix for ianprime0509/zig-gobject#111 2025-07-22 23:45:19 -05:00
Mitchell Hashimoto
eae4124ed8 build(deps): bump namespacelabs/nscloud-cache-action from 1.2.12 to 1.2.13 (#8034)
Bumps
[namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action)
from 1.2.12 to 1.2.13.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9ff6d4004d"><code>9ff6d40</code></a>
Merge pull request <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/27">#27</a>
from namespacelabs/niklas-go-single-command</li>
<li><a
href="11812fa33c"><code>11812fa</code></a>
Use a single <code>go env</code> invocation in <code>go</code> cache
mode.</li>
<li><a
href="5dd70d607c"><code>5dd70d6</code></a>
Merge pull request <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/26">#26</a>
from namespacelabs/niklas-doc</li>
<li><a
href="834227b234"><code>834227b</code></a>
document brew mode</li>
<li>See full diff in <a
href="c343d6c4c2...9ff6d4004d">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=namespacelabs/nscloud-cache-action&package-manager=github_actions&previous-version=1.2.12&new-version=1.2.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2025-07-22 19:28:30 -07:00
dependabot[bot]
72220bb69f build(deps): bump namespacelabs/nscloud-cache-action
Bumps [namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action) from 1.2.12 to 1.2.13.
- [Release notes](https://github.com/namespacelabs/nscloud-cache-action/releases)
- [Commits](c343d6c4c2...9ff6d4004d)

---
updated-dependencies:
- dependency-name: namespacelabs/nscloud-cache-action
  dependency-version: 1.2.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-23 01:02:04 +00:00
Mitchell Hashimoto
c979ece916 build-system: Replace deprecated usages of root_source_file on addTests (#8031)
Yet another low-hanging fruit
2025-07-22 15:28:11 -07:00
Mitchell Hashimoto
95ccf3abb2 apprt/gtk-ng: move overlays and event controllers into Blueprint (#8032)
I became far less stupid and figured out how to figure this out by
reading the source code and since then I've been enlightened and can
clean up our Blueprints quite a bit. Yay!

I learned that you can add overlays to a `gtk.Overlay` with the
`[overlay]` child type. And if you embed event controllers directly,
`gtk.Widget` adds them
(https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkwidget.c#L8805-8808).

cc @tristan957 yay!
2025-07-22 15:27:29 -07:00
Mitchell Hashimoto
2544c1fb22 apprt/gtk-ng: move overlays and event controllers into Blueprint
I became far less stupid and figured out how to figure this out by
reading the source code and since then I've been enlightened and can
clean up our Blueprints quite a bit. Yay!
2025-07-22 15:19:50 -07:00
Jayson Reis
d5995ac45c build-system: Replace deprecated usages of root_source_file on addTests 2025-07-23 00:03:44 +02:00
Jayson Reis
acc2ea724f build-system: Replace deprecated usages of addStaticLibrary with addLibrary (#8029)
Hi there, this is just a low-hanging fruit and it also prepares the way
for the future 0.15, which removes addStaticLibrary.
Please, let me know what to do on the `// TODO` comments.
2025-07-22 14:47:18 -07:00
Mitchell Hashimoto
c903754b70 apprt/gtk-ng: clipboard support (#8030)
This ports over read/write clipboard to gtk-ng.

This was a surprisingly massive amount of work! The clipboard
confirmation dialog is non-trivial: it supports multiple read/write
types, blurring, remember choice, and spans multiple Adw versions. I was
able to port all of the functionality into a single
`CloseConfirmationDialog` class and make use of a good amount of
Blueprint binds to simplify some stuff.
2025-07-22 14:45:26 -07:00
Mitchell Hashimoto
04143645f2 apprt/gtk-ng: fixed missing icon for hide button 2025-07-22 14:38:36 -07:00
Mitchell Hashimoto
2855c44118 typos 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
5c21d9a123 prettier 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
7e329d3e4c apprt/gtk-ng: paste can't remember 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
4d39f2728a apprt/gtk-ng: implement remember 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
58a5f3f1f8 apprt/gtk-ng: emit signal when clipboard read/write 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
a6e0878b11 apprt/gtk-ng: hook up all the dialogs 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
b11dadafb1 apprt/gtk-ng: clipboard confirm 2025-07-22 14:36:21 -07:00
Mitchell Hashimoto
46e395055d apprt/gtk-ng: implement blur 2025-07-22 14:36:21 -07:00