>From 7c5f95f51e8fe959d1be06c763d9c2ab947cc260 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 31 Oct 2011 14:49:58 +0100 Subject: [PATCH] tabbed details (preview) --- src/gui-wizard-gtk/wizard.c | 13 ++++ src/gui-wizard-gtk/wizard.glade | 121 +++++++++++++++++++++++++++------------ 2 files changed, 97 insertions(+), 37 deletions(-) diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index a43e410..a7b18a6 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -98,6 +98,7 @@ static GtkLabel *g_active_lbl; static GtkProgressBar *g_active_pb; static GtkBox *g_box_assist_nav; +static GtkNotebook *g_notebook; enum { @@ -991,6 +992,15 @@ static void append_item_to_ls_details(gpointer name, gpointer value, gpointer da //FIXME: use the human-readable format_problem_item(item) instead of item->content. if (item->flags & CD_FLAG_TXT) { + if (item->flags & CD_FLAG_ISEDITABLE) + { + GtkWidget *tab_lbl = gtk_label_new((char *)name); + GtkWidget *tev = gtk_text_view_new(); + load_text_to_text_view(GTK_TEXT_VIEW(tev), (char *)name); + GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL); + gtk_container_add(GTK_CONTAINER(sw), tev); + gtk_notebook_append_page(g_notebook, sw, tab_lbl); + } stats->filesize += strlen(item->content); /* If not multiline... */ if (!strchr(item->content, '\n')) @@ -1185,6 +1195,8 @@ void update_gui_state_from_problem_data(void) gtk_label_set_text(g_lbl_size, msg); free(msg); + //Here we should go thru all items and add a tab and textview to any editable one + //+ special-case backtrace load_text_to_text_view(g_tv_backtrace, FILENAME_BACKTRACE); load_text_to_text_view(g_tv_comment, FILENAME_COMMENT); @@ -2501,6 +2513,7 @@ static void add_pages() g_btn_add_file = GTK_BUTTON( gtk_builder_get_object(builder, "btn_add_file")); g_lbl_reporters = GTK_LABEL( gtk_builder_get_object(builder, "lbl_reporters")); g_lbl_size = GTK_LABEL( gtk_builder_get_object(builder, "lbl_size")); + g_notebook = GTK_NOTEBOOK( gtk_builder_get_object(builder, "notebook_edit")); gtk_widget_hide(g_widget_warnings_area); diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade index 7041118..ddb524b 100644 --- a/src/gui-wizard-gtk/wizard.glade +++ b/src/gui-wizard-gtk/wizard.glade @@ -1,6 +1,7 @@ + False @@ -156,12 +157,11 @@ I don't know what caused this problem + False True True False - False 0 - 0.5 True @@ -218,10 +218,10 @@ gtk-preferences + False True True True - False True True right @@ -345,10 +345,10 @@ gtk-preferences + False True True True - False True True right @@ -459,10 +459,10 @@ gtk-stop + False True True True - False True @@ -526,10 +526,10 @@ gtk-preferences + False True True True - False True True right @@ -574,37 +574,78 @@ 10 3 - - True - False - 0 - 0 - Backtrace 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: - True - - - False - True - 0 - - - - + True True - out + True - + True - True - word + False + 7 + + + True + False + 0 + 0 + Backtrace 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: + True + + + False + True + 0 + + + + + True + True + out + + + True + True + word + + + + + True + True + 1 + + + + + True + False + page 1 + + + False + + + + + + + + + + + + + + True True - 1 + 0 @@ -644,7 +685,7 @@ True - True + False 0 @@ -664,7 +705,7 @@ False - True + False 1 @@ -678,7 +719,8 @@ True - True + False + 1 2 @@ -693,6 +735,7 @@ True True + 1 0 @@ -705,7 +748,12 @@ True True + True gtk-find + False + True + True + True False @@ -716,11 +764,10 @@ Regenerate backtrace + False True True True - Can create more informative backtrace if you installed additional debug packages - False @@ -740,8 +787,8 @@ False - True - 2 + False + 1 @@ -864,10 +911,10 @@ Attach a file + False True True True - False False @@ -888,11 +935,11 @@ I reviewed the data and _agree with submitting it + False True True False If you are reporting to a remote server, make sure you removed all private data (such as usernames and passwords). Backtrace, command line, environment variables are the typical items in need of examining. - False True 0 True @@ -982,10 +1029,10 @@ gtk-stop + False True True True - False True -- 1.7.7