From 59e3a4855c601996067ead41506e659640232896 Mon Sep 17 00:00:00 2001 From: Makise Kurisu Date: Sun, 8 May 2016 16:17:11 +0200 Subject: [PATCH] GUI: Fixed an error where an error message would re-show the simulation time box --- gui.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui.c b/gui.c index 8f98146..d91b2fc 100644 --- a/gui.c +++ b/gui.c @@ -16,8 +16,11 @@ int showMessage(int message_type, char *text, char *defaultText, char **reply) { GtkWidget *buttonBox; GtkWidget *mainBox; GtkWidget *label; + gboolean ret; char *entryText; + ret = true; + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "model-ghdl"); @@ -71,17 +74,18 @@ int showMessage(int message_type, char *text, char *defaultText, char **reply) { if (MESSAGE_IS_INPUT(message_type)) { entryText = (char*) gtk_entry_get_text(GTK_ENTRY(entry)); if (entryText[0] == 0) { - return false; + ret = false; } else { *reply = realloc(*reply, sizeof(char)*strlen(entryText)); if (*reply != NULL) strcpy(*reply, entryText); - return true; + ret = true; } } gtk_widget_destroy(window); + return ret; } static void okay( GtkWidget *widget,