aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--monitor.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 7189c5f..8e6bc4c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -17,8 +17,18 @@
static void show_error(struct qemu_window *win, char *cmd, char *reply)
{
- /* FIXME: show error dialog */
- fprintf(stderr, "ERROR: %s: %s\n", cmd, reply);
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new(GTK_WINDOW(win->toplevel),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ "ERROR: %s", reply);
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+ "monitor command was:\n%s\n", cmd);
+ g_signal_connect_swapped(dialog, "response",
+ G_CALLBACK (gtk_widget_destroy),
+ dialog);
+ gtk_widget_show_all(dialog);
}
static int monitor_parse(struct qemu_window *win, char *buf, int len)