From d3df0f0aecae213284d710c89de1f0fd8776be07 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sun, 27 Jul 2025 12:07:32 -0300 Subject: [PATCH] :wrench: chore(bar/apps, bar/focused-client): use onClicked prop instead of connecting to signal, fix str being null sometimes --- ags/widget/bar/Apps.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ags/widget/bar/Apps.tsx b/ags/widget/bar/Apps.tsx index 56553fa..92f1abd 100644 --- a/ags/widget/bar/Apps.tsx +++ b/ags/widget/bar/Apps.tsx @@ -5,12 +5,8 @@ import { tr } from "../../i18n/intl"; export const Apps = () => - `apps ${Object.hasOwn(openWindows, "apps-window") ? "open" : ""}` - )} $={(self) => { - const conns: Array = [ - self.connect("clicked", (_) => Windows.getDefault().open("apps-window")), - self.connect("destroy", (_) => conns.forEach(id => self.disconnect(id))) - ]; - }} iconName={"applications-other-symbolic"} halign={Gtk.Align.CENTER} - hexpand={true} tooltipText={tr("apps")} + `apps ${Object.hasOwn(openWindows, "apps-window") ? "open" : ""}` + )} iconName={"applications-other-symbolic"} halign={Gtk.Align.CENTER} + hexpand tooltipText={tr("apps")} onClicked={() => + Windows.getDefault().open("apps-window")} />;