diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-02-19 19:02:48 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-02-19 19:02:48 +0000 |
commit | 5403a5be85b5b8a207a704a5298c7f76d8312d0e (patch) | |
tree | 087ba7abbcf84ed12141b49373a56e9d253266eb /src/util.c | |
parent | f827028d29f6e463c8aeaa329603047d3ac80da1 (diff) |
reannounce, blocklist enable/url/update
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -33,6 +33,20 @@ #include "util.h" #include "dispatch.h" +void trg_error_dialog(GtkWindow *parent, int status, JsonObject *response) +{ + const gchar *msg = make_error_message(response, status); + GtkWidget *dialog = gtk_message_dialog_new(parent, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, "%s", + msg); + gtk_window_set_title(GTK_WINDOW(dialog), "Error"); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); + g_free((gpointer) msg); +} + const gchar *make_error_message(JsonObject * response, int status) { if (status == FAIL_JSON_DECODE) { |