gtk: only show clipboard toast when content isn't empty
parent
d3f40d70e2
commit
a7b7c10474
|
|
@ -1259,9 +1259,13 @@ pub fn setClipboardString(
|
||||||
// We only toast if we are copying to the standard clipboard.
|
// We only toast if we are copying to the standard clipboard.
|
||||||
if (clipboard_type == .standard and
|
if (clipboard_type == .standard and
|
||||||
self.app.config.@"app-notifications".@"clipboard-copy")
|
self.app.config.@"app-notifications".@"clipboard-copy")
|
||||||
{
|
toast: {
|
||||||
if (self.container.window()) |window|
|
const window = self.container.window() orelse break :toast;
|
||||||
window.sendToast(i18n._("Copied to clipboard"));
|
|
||||||
|
if (val.len > 0)
|
||||||
|
window.sendToast(i18n._("Copied to clipboard"))
|
||||||
|
else
|
||||||
|
window.sendToast(i18n._("Cleared clipboard"));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue