Merge pull request #2233 from tristan957/about

apprt/gtk: use AdwAboutDialog if available
This commit is contained in:
Mitchell Hashimoto
2024-09-12 16:23:56 -07:00
committed by GitHub

View File

@ -537,20 +537,43 @@ fn gtkActionAbout(
) callconv(.C) void { ) callconv(.C) void {
const self: *Window = @ptrCast(@alignCast(ud orelse return)); const self: *Window = @ptrCast(@alignCast(ud orelse return));
c.gtk_show_about_dialog( const name = "Ghostty";
self.window, const icon = "com.mitchellh.ghostty";
"program-name", const website = "https://github.com/ghostty-org/ghostty";
"Ghostty",
"logo-icon-name", if (self.isAdwWindow()) {
"com.mitchellh.ghostty", c.adw_show_about_dialog(
"title", @ptrCast(self.window),
"About Ghostty", "application-name",
"version", name,
build_config.version_string.ptr, "developer-name",
"website", "Ghostty Developers",
"https://github.com/ghostty-org/ghostty", "application-icon",
@as(?*anyopaque, null), icon,
); "version",
build_config.version_string.ptr,
"issue-url",
"https://github.com/ghostty-org/ghostty/issues",
"website",
website,
@as(?*anyopaque, null),
);
} else {
c.gtk_show_about_dialog(
self.window,
"program-name",
name,
"logo-icon-name",
icon,
"title",
"About Ghostty",
"version",
build_config.version_string.ptr,
"website",
website,
@as(?*anyopaque, null),
);
}
} }
fn gtkActionClose( fn gtkActionClose(