summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-02-17 11:48:04 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-02-17 11:48:04 +0100
commit7c4144b696475261ea9297f05a91bde22f1718e8 (patch)
tree34c30da0044fee63d3a1a121c559ecc5468e505f
parent25fe4d12d5770fb184377204aa84f1ab773095b6 (diff)
downloadabrt-7c4144b696475261ea9297f05a91bde22f1718e8.tar.gz
abrt-7c4144b696475261ea9297f05a91bde22f1718e8.tar.xz
abrt-7c4144b696475261ea9297f05a91bde22f1718e8.zip
gui-wizard-gtk: display proper reason field value
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--src/gui-wizard-gtk/main.c5
-rw-r--r--src/gui-wizard-gtk/wizard.c10
-rw-r--r--src/gui-wizard-gtk/wizard.glade20
-rw-r--r--src/gui-wizard-gtk/wizard.h3
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 @@
<object class="GtkLabel" id="lbl_page1">
<property name="width_request">750</property>
<property name="visible">True</property>
- <property name="xalign">0.05000000074505806</property>
- <property name="yalign">0.05000000074505806</property>
- <property name="label" translatable="yes">There has been a problem detected on your computer:</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">A problem was detected on your computer:</property>
<property name="justify">fill</property>
<property name="wrap">True</property>
</object>
@@ -31,12 +31,10 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="lbl_page7">
+ <object class="GtkLabel" id="lbl_cd_reason">
<property name="width_request">750</property>
<property name="visible">True</property>
- <property name="xalign">0.05000000074505806</property>
- <property name="yalign">0.05000000074505806</property>
- <property name="label" translatable="yes">Process /usr/bin/transmission-gtk was killed by signal 11 (SIGSEGV)</property>
+ <property name="label" translatable="yes">(no description)</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<attributes>
@@ -53,11 +51,9 @@
<object class="GtkLabel" id="lbl_page5">
<property name="width_request">750</property>
<property name="visible">True</property>
- <property name="xalign">0.05000000074505806</property>
- <property name="yalign">0.05000000074505806</property>
- <property name="label" translatable="yes">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.</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Select how you would like to analyze the problem:</property>
<property name="justify">fill</property>
<property name="wrap">True</property>
</object>
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;