Initial revision

This commit is contained in:
Geoffrey D. Bennett
2022-03-14 09:24:43 +10:30
commit 17b4d2f055
89 changed files with 40806 additions and 0 deletions

22
src/error.c Normal file
View File

@@ -0,0 +1,22 @@
// SPDX-FileCopyrightText: 2022 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
);
gtk_widget_show(dialog);
g_signal_connect(dialog, "response", G_CALLBACK(gtk_window_destroy), NULL);
}