mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-23 07:45:20 +00:00
feat: add option to disable the "Reloaded the configuration" notification
This commit is contained in:
committed by
Mitchell Hashimoto
parent
062d596c0a
commit
43e010bf47
@@ -961,7 +961,16 @@ pub const Window = extern struct {
|
||||
_: *gobject.ParamSpec,
|
||||
self: *Self,
|
||||
) callconv(.c) void {
|
||||
self.addToast(i18n._("Reloaded the configuration"));
|
||||
// We only toast if configured to
|
||||
const priv = self.private();
|
||||
const config_obj = priv.config orelse {
|
||||
self.syncAppearance();
|
||||
return;
|
||||
};
|
||||
const config = config_obj.get();
|
||||
if (config.@"app-notifications".@"config-reload") {
|
||||
self.addToast(i18n._("Reloaded the configuration"));
|
||||
}
|
||||
self.syncAppearance();
|
||||
}
|
||||
|
||||
|
||||
@@ -772,7 +772,9 @@ pub fn focusCurrentTab(self: *Window) void {
|
||||
}
|
||||
|
||||
pub fn onConfigReloaded(self: *Window) void {
|
||||
self.sendToast(i18n._("Reloaded the configuration"));
|
||||
if (self.app.config.@"app-notifications".@"config-reload") {
|
||||
self.sendToast(i18n._("Reloaded the configuration"));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sendToast(self: *Window, title: [*:0]const u8) void {
|
||||
|
||||
Reference in New Issue
Block a user