From 7ccb172bc76678be4a60eb3d20621fe214cc01a8 Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Fri, 16 Aug 2024 23:12:38 -0700 Subject: [PATCH] The import Config/Theme dialog no longer restarts HyprPanel on cancellation. (#142) --- widget/settings/shared/FileChooser.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widget/settings/shared/FileChooser.ts b/widget/settings/shared/FileChooser.ts index b24a13f..35d9854 100644 --- a/widget/settings/shared/FileChooser.ts +++ b/widget/settings/shared/FileChooser.ts @@ -122,6 +122,11 @@ export const importFiles = (themeOnly: boolean = false): void => { let response = dialog.run(); + + if (response === Gtk.ResponseType.CANCEL) { + dialog.destroy(); + return; + } if (response === Gtk.ResponseType.ACCEPT) { let filePath = dialog.get_filename(); let file = Gio.File.new_for_path(filePath as string);