diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 0279f83..a27cb2d 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -48,6 +48,7 @@ static GtkBox *g_box_analyzers;
static GList *g_list_analyzers;
static GtkLabel *g_lbl_analyze_log;
static GtkTextView *g_tv_analyze_log;
+static GtkProgressBar *g_pb_analyze;
static GtkBox *g_box_collectors;
/* List of event_gui_data's */
@@ -104,6 +105,9 @@ static GtkEntry *g_search_entry_bt;
static GtkBuilder *builder;
static PangoFontDescription *monospace_font;
+static gboolean pb_pulse = false;
+static gint pb_pulse_speed = 150;
+
/* THE PAGE FLOW
* page_0: introduction/summary
@@ -1396,6 +1400,8 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
{
append_to_textview(evd->tv_log, msg);
save_to_event_log(evd, msg);
+ /* cuts off \n from msg */
+ gtk_label_set_text(g_lbl_analyze_log, strtrim(msg));
}
strbuf_clear(line);
@@ -1464,7 +1470,6 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
) {
VERB1 log("done running event on '%s': %d", g_dump_dir_name, retval);
append_to_textview(evd->tv_log, "\n");
-
for (;;)
{
if (!evd->more_events)
@@ -1477,6 +1482,9 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
strbuf_free(line);
line = NULL;
+ /* hide progress bar */
+ pb_pulse = false;
+
/* Enable (un-gray out) navigation buttons */
gtk_widget_set_sensitive(GTK_WIDGET(g_assistant), true);
@@ -1523,6 +1531,16 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
return TRUE; /* "please don't remove this event (yet)" */
}
+/* pulse the progressbar */
+static gboolean pb_pulse_timeout(gpointer data)
+{
+ if (pb_pulse)
+ gtk_progress_bar_pulse(g_pb_analyze);
+ else
+ gtk_widget_hide(GTK_WIDGET(g_pb_analyze));
+ return pb_pulse;
+}
+
static void start_event_run(const char *event_name,
GList *more_events,
GtkWidget *page,
@@ -1536,6 +1554,9 @@ static void start_event_run(const char *event_name,
*/
struct run_event_state *state = new_run_event_state();
+ pb_pulse = true;
+ g_timeout_add(pb_pulse_speed, pb_pulse_timeout, NULL);
+
if (prepare_commands(state, g_dump_dir_name, event_name) == 0)
{
no_cmds:
@@ -2318,6 +2339,7 @@ static void add_pages()
g_box_analyzers = GTK_BOX( gtk_builder_get_object(builder, "vb_analyzers"));
g_lbl_analyze_log = GTK_LABEL( gtk_builder_get_object(builder, "lbl_analyze_log"));
g_tv_analyze_log = GTK_TEXT_VIEW( gtk_builder_get_object(builder, "tv_analyze_log"));
+ g_pb_analyze = GTK_PROGRESS_BAR( gtk_builder_get_object(builder, "pb_analyze"));
g_box_collectors = GTK_BOX( gtk_builder_get_object(builder, "vb_collectors"));
g_lbl_collect_log = GTK_LABEL( gtk_builder_get_object(builder, "lbl_collect_log"));
g_tv_collect_log = GTK_TEXT_VIEW( gtk_builder_get_object(builder, "tv_collect_log"));
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
index 593d1d7..544e56d 100644
--- a/src/gui-wizard-gtk/wizard.glade
+++ b/src/gui-wizard-gtk/wizard.glade
@@ -51,11 +51,14 @@
@@ -108,7 +111,7 @@
True
True
- GTK_SHADOW_OUT
+ out
-
+
False
-
+
True
False
10
3
-
+
True
False
0
- Select how you would like to analyze the problem:
+ Select additional files to attach to the report:
+ True
+ fill
True
@@ -190,7 +195,7 @@
-
+
True
False
@@ -204,11 +209,11 @@
-
+
True
False
-
+
gtk-preferences
True
True
@@ -225,7 +230,7 @@
-
+
True
False
@@ -248,20 +253,20 @@
-
+
False
-
+
True
False
10
3
-
+
True
False
0
- Analyzing did not start yet
+ Collecting did not start yet
True
True
@@ -272,12 +277,12 @@
-
+
True
True
- GTK_SHADOW_OUT
+ out
-
+
True
True
False
@@ -294,22 +299,20 @@
-
+
False
-
+
True
False
10
3
-
+
True
False
0
- Select additional files to attach to the report:
- True
- fill
+ Select how you would like to analyze the problem:
True
@@ -319,7 +322,7 @@
-
+
True
False
@@ -333,11 +336,11 @@
-
+
True
False
-
+
gtk-preferences
True
True
@@ -354,7 +357,7 @@
-
+
True
False
@@ -377,22 +380,22 @@
-
+
False
-
+
True
False
10
3
-
+
True
False
0
- Collecting did not start yet
+ Analyzing did not start yet
True
- True
+ True
False
@@ -401,23 +404,47 @@
-
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
True
True
- GTK_SHADOW_OUT
-
+
True
True
- False
- False
+ out
+
+
+ True
+ True
+ False
+ False
+
+
+
+
+
+
+ True
+ False
+ Show log
True
True
- 1
+ 2
@@ -534,7 +561,7 @@
True
True
- GTK_SHADOW_OUT
+ out
True
@@ -788,7 +815,7 @@
True
True
- GTK_SHADOW_OUT
+ out
@@ -875,7 +902,7 @@
True
True
- GTK_SHADOW_OUT
+ out
True