summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-02-23 14:28:34 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-02-23 14:28:34 +0100
commitf2556c0b86d7070e960c22474caf5718ac1c68c9 (patch)
tree87d9d0d61d19fd86fe5429127790af8ab8d9d9b2 /src
parent80cdd520ba55bb90103260707f6798e19524b6c6 (diff)
downloadabrt-f2556c0b86d7070e960c22474caf5718ac1c68c9.tar.gz
abrt-f2556c0b86d7070e960c22474caf5718ac1c68c9.tar.xz
abrt-f2556c0b86d7070e960c22474caf5718ac1c68c9.zip
gui-wizard-gtk: hide the element table on the 1st page with expander
Also tweaked a bit some label text in GUI Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui-wizard-gtk/wizard.c26
-rw-r--r--src/gui-wizard-gtk/wizard.glade56
2 files changed, 46 insertions, 36 deletions
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 577adafa..ce056250 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -10,7 +10,7 @@ GtkLabel *g_lbl_cd_reason;
GtkLabel *g_lbl_analyze_log;
GtkBox *g_box_analyzers;
GtkBox *g_box_reporters;
-GtkTextView *g_analyze_log;
+GtkTextView *g_tv_analyze_log;
GtkTextView *g_tv_backtrace;
GtkTreeView *g_tv_details;
GtkListStore *g_ls_details;
@@ -63,19 +63,21 @@ typedef struct
static page_obj_t pages[] =
{
+ /* Page types:
+ * CONFIRM: has [Apply] instead of [Fwd] and emits "apply" signal
+ * PROGRESS: skipped on backward navigation
+ * SUMMARY: has only [Close] button
+ */
+ /* glade element name , on-screen text , type */
{ PAGE_SUMMARY , "Problem description" , GTK_ASSISTANT_PAGE_CONTENT },
- /* need this type to get "apply" signal */
{ PAGE_ANALYZE_SELECTOR , "Select analyzer" , GTK_ASSISTANT_PAGE_CONFIRM },
- /* Was GTK_ASSISTANT_PAGE_PROGRESS
- * if we leave it as _PROGRESS the back button skips the page
- */
- { PAGE_ANALYZE_PROGRESS , "Analyzing" , GTK_ASSISTANT_PAGE_CONTENT },
+ { PAGE_ANALYZE_PROGRESS , "Analyzing" , GTK_ASSISTANT_PAGE_CONTENT },
/* Some reporters don't need backtrace, we can skip bt page for them.
* Therefore we want to know reporters _before_ we go to bt page
*/
{ PAGE_REPORTER_SELECTOR , "Select reporter" , GTK_ASSISTANT_PAGE_CONTENT },
{ PAGE_BACKTRACE_APPROVAL , "Review the backtrace" , GTK_ASSISTANT_PAGE_CONTENT },
- { PAGE_HOWTO , "Provide additional information", GTK_ASSISTANT_PAGE_CONTENT },
+ { PAGE_HOWTO , "Provide additional information", GTK_ASSISTANT_PAGE_CONTENT },
{ PAGE_REPORT , "Confirm data to report", GTK_ASSISTANT_PAGE_CONFIRM },
/* Was GTK_ASSISTANT_PAGE_PROGRESS */
{ PAGE_REPORT_PROGRESS , "Reporting" , GTK_ASSISTANT_PAGE_SUMMARY },
@@ -137,7 +139,7 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
{
struct analyze_event_data *evd = data;
- GtkTextBuffer *tb = gtk_text_view_get_buffer(g_analyze_log);
+ GtkTextBuffer *tb = gtk_text_view_get_buffer(g_tv_analyze_log);
/* Ensure we insert text at the end */
GtkTextIter text_iter;
@@ -154,7 +156,7 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
/* Scroll so that end of the log is visible */
gtk_text_buffer_get_iter_at_offset(tb, &text_iter, -1);
- gtk_text_view_scroll_to_iter(g_analyze_log, &text_iter,
+ gtk_text_view_scroll_to_iter(g_tv_analyze_log, &text_iter,
/*within_margin:*/ 0.0, /*use_align:*/ FALSE, /*xalign:*/ 0, /*yalign:*/ 0);
if (r < 0 && errno == EAGAIN)
@@ -328,7 +330,7 @@ static void add_pages()
g_lbl_analyze_log = GTK_LABEL(gtk_builder_get_object(builder, "lbl_analyze_log"));
g_box_analyzers = GTK_BOX(gtk_builder_get_object(builder, "vb_analyzers"));
g_box_reporters = GTK_BOX(gtk_builder_get_object(builder, "vb_reporters"));
- g_analyze_log = GTK_TEXT_VIEW(gtk_builder_get_object(builder, "analyze_log"));
+ g_tv_analyze_log = GTK_TEXT_VIEW(gtk_builder_get_object(builder, "tv_analyze_log"));
g_tv_backtrace = GTK_TEXT_VIEW(gtk_builder_get_object(builder, "tv_backtrace"));
g_tv_details = GTK_TREE_VIEW(gtk_builder_get_object(builder, "tv_details"));
}
@@ -343,7 +345,7 @@ void on_bt_approve_toggle(GtkToggleButton *togglebutton, gpointer user_data)
//FIXME: hide/show warnings about rating and bt approval
void on_page_prepare(GtkAssistant *assistant, GtkWidget *page, gpointer user_data)
{
- if(pages[PAGENO_BACKTRACE_APPROVAL].page_widget == page)
+ if (pages[PAGENO_BACKTRACE_APPROVAL].page_widget == page)
{
GtkToggleButton* tb_approve_bt = GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "cb_approve_bt"));
g_signal_connect(tb_approve_bt, "toggled", G_CALLBACK(on_bt_approve_toggle), NULL);
@@ -369,10 +371,8 @@ void create_assistant()
g_signal_connect(obj_assistant, "cancel", G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(obj_assistant, "close", G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(obj_assistant, "apply", G_CALLBACK(next_page), NULL);
-
g_signal_connect(obj_assistant, "prepare", G_CALLBACK(on_page_prepare), NULL);
-
builder = gtk_builder_new();
add_pages();
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
index 6f701515..bcf367f2 100644
--- a/src/gui-wizard-gtk/wizard.glade
+++ b/src/gui-wizard-gtk/wizard.glade
@@ -28,31 +28,43 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow5">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkTreeView" id="tv_details">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
+ <property name="xalign">0</property>
+ <property name="ypad">5</property>
+ <property name="label" translatable="yes">Press 'Forward' to proceed with analyzing and reporting this problem.</property>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label7">
+ <object class="GtkExpander" id="expander1">
<property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes">Use Forward button to analyze and report this problem</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow5">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="tv_details">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="dump_elements">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Details</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -130,7 +142,7 @@
<property name="border_width">10</property>
<property name="hscrollbar_policy">automatic</property>
<child>
- <object class="GtkTextView" id="analyze_log">
+ <object class="GtkTextView" id="tv_analyze_log">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
@@ -200,11 +212,9 @@
<object class="GtkLabel" id="lbl_page4">
<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">Below is the backtrace associated with your crash. A crash backtrace provides developers with details about how the crash happened, helping them track down the source of the problem.
-
-Please review the backtrace below and modify it as needed to ensure your bug report does not contain any sensitive data you would rather not share:</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Below is the backtrace. It provides developers with details of the crash, helping them track down the source of the problem. Please review it and remove any sensitive data you would rather not share:</property>
<property name="wrap">True</property>
</object>
<packing>
@@ -557,7 +567,7 @@ Please review the backtrace below and modify it as needed to ensure your bug rep
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="ypad">5</property>
- <property name="label" translatable="yes">&lt;b&gt;Your comments are not private.&lt;/b&gt; They may be included into publicly-visible problem reports.</property>
+ <property name="label" translatable="yes">&lt;b&gt;Your comments are not private.&lt;/b&gt; They may be included into publicly visible problem reports.</property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -753,7 +763,7 @@ Please review the backtrace below and modify it as needed to ensure your bug rep
<property name="border_width">10</property>
<property name="hscrollbar_policy">automatic</property>
<child>
- <object class="GtkTextView" id="report_log">
+ <object class="GtkTextView" id="tv_report_log">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>