Blob Blame History Raw
commit 82ab98c161e01de5a41902ea1961016b4d4bccca
Author: Jiri Moskovcak <jmoskovc@redhat.com>
Date:   Sun Mar 27 18:43:33 2011 +0200

    gui-wizard-gtk: don't allow user to continue if analyzer fails

diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 31c7bb2..33a6911 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -780,8 +780,12 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
                 char *msg = xasprintf(evd->end_msg, retval);
                 gtk_label_set_text(evd->status_label, msg);
                 free(msg);
-                /* Unfreeze assistant */
-                gtk_assistant_set_page_complete(g_assistant, evd->page_widget, true);
+                /* Unfreeze assistant
+                 * we can't allow user to continue if analyze action fails
+                 * i.e: if gdb fails to generate backtrace
+                */
+                if (retval == 0 || (strncmp(evd->event_name, "analyze", strlen("analyze")) != 0))
+                    gtk_assistant_set_page_complete(g_assistant, evd->page_widget, true);
 
                 /*g_source_remove(evd->event_source_id);*/
                 close(evd->fd);