This repository has been archived on 2025-09-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
alsa-scarlett-gui/src/error.c
Geoffrey D. Bennett b2823e79be Bump copyright year
2024-02-08 18:08:34 +10:30

24 lines
522 B
C

// SPDX-FileCopyrightText: 2022-2024 Geoffrey D. Bennett <g@b4.vu>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "error.h"
void show_error(GtkWindow *w, char *s) {
if (!w) {
printf("%s\n", s);
return;
}
GtkWidget *dialog = gtk_message_dialog_new(
w,
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"%s",
s
);
gtk_widget_set_visible(dialog, TRUE);
g_signal_connect(dialog, "response", G_CALLBACK(gtk_window_destroy), NULL);
}