From 7c4144b696475261ea9297f05a91bde22f1718e8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 17 Feb 2011 11:48:04 +0100 Subject: gui-wizard-gtk: display proper reason field value Signed-off-by: Denys Vlasenko --- src/gui-wizard-gtk/main.c | 5 +++++ src/gui-wizard-gtk/wizard.c | 10 ++++++++++ src/gui-wizard-gtk/wizard.glade | 20 ++++++++------------ src/gui-wizard-gtk/wizard.h | 3 +++ 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c index 0b6b3122..a8991fcb 100644 --- a/src/gui-wizard-gtk/main.c +++ b/src/gui-wizard-gtk/main.c @@ -42,6 +42,11 @@ int main(int argc, char **argv) dd_close(dd); GtkWidget *assistant = create_assistant(); + + const char *reason = get_crash_item_content_or_NULL(cd, FILENAME_REASON); + if (reason) + gtk_label_set_text(g_lbl_cd_reason, reason); + gtk_widget_show_all(assistant); /* Enter main loop */ diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index 0fd957a7..0ac56ee7 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -23,6 +23,9 @@ #define DEFAULT_WIDTH 800 #define DEFAULT_HEIGHT 500 +GtkLabel *g_lbl_cd_reason; +GtkVBox *g_vb_analyzers; + static const gchar *const page_names[] = { "page_1", @@ -100,14 +103,21 @@ static void add_pages() g_print("added page: %s\n", page_names[i]); } + + /* Set pointer to fields we might need to change */ + g_lbl_cd_reason = GTK_LABEL(gtk_builder_get_object(builder, "lbl_cd_reason")); + + g_vb_analyzers = GTK_VBOX(gtk_builder_get_object(builder, "vb_analyzers")); } GtkWidget *create_assistant() { assistant = gtk_assistant_new(); gtk_window_set_default_size(GTK_WINDOW(assistant), DEFAULT_WIDTH, DEFAULT_HEIGHT); + g_signal_connect(G_OBJECT(assistant), "cancel", G_CALLBACK(gtk_main_quit), NULL); g_signal_connect(G_OBJECT(assistant), "close", G_CALLBACK(gtk_main_quit), NULL); + builder = gtk_builder_new(); add_pages(); gtk_builder_connect_signals(builder, NULL); diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade index b0b15b71..c2d67938 100644 --- a/src/gui-wizard-gtk/wizard.glade +++ b/src/gui-wizard-gtk/wizard.glade @@ -20,9 +20,9 @@ 750 True - 0.05000000074505806 - 0.05000000074505806 - There has been a problem detected on your computer: + 0 + 0 + A problem was detected on your computer: fill True @@ -31,12 +31,10 @@ - + 750 True - 0.05000000074505806 - 0.05000000074505806 - Process /usr/bin/transmission-gtk was killed by signal 11 (SIGSEGV) + (no description) center True @@ -53,11 +51,9 @@ 750 True - 0.05000000074505806 - 0.05000000074505806 - Please review the information that follows and modify it as needed to ensure your bug report does not contain any sensitive data you would rather not share. - -Select where you would like to analyze the bug, and press 'Forward' to continue. + 0 + 0 + Select how you would like to analyze the problem: fill True diff --git a/src/gui-wizard-gtk/wizard.h b/src/gui-wizard-gtk/wizard.h index 888c2df3..2633351a 100644 --- a/src/gui-wizard-gtk/wizard.h +++ b/src/gui-wizard-gtk/wizard.h @@ -1,3 +1,6 @@ GtkWidget *create_assistant(void); +extern GtkLabel *g_lbl_cd_reason; +extern GtkVBox *g_vb_analyzers; + extern char *g_glade_file; -- cgit