| 1 | // SPDX-FileCopyrightText: 2022-2025 Geoffrey D. Bennett <[email protected]> |
| 2 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 3 | |
| 4 | #include "error.h" |
| 5 | |
| 6 | void show_error(GtkWindow *w, char *s) { |
| 7 | if (!w) { |
| 8 | printf("%s\n", s); |
| 9 | return; |
| 10 | } |
| 11 | |
| 12 | GtkAlertDialog *dialog = gtk_alert_dialog_new("%s", s); |
| 13 | gtk_alert_dialog_show(dialog, w); |
| 14 | g_object_unref(dialog); |
| 15 | } |