Commit 56440427 authored by Cedric Roux's avatar Cedric Roux

- Add terminal view to itti_analyzer to redirect logs in a single view

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4777 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 763b715a
......@@ -23,6 +23,7 @@
#include "ui_tree_view.h"
#include "ui_signal_dissect_view.h"
#include "ui_filters.h"
#include "ui_notebook.h"
#include "types.h"
#include "locate_root.h"
......@@ -402,6 +403,24 @@ void ui_signal_add_to_list(gpointer data, gpointer user_data)
task_id_to_string (origin_task_id, origin_task_id_type), destination_task_id,
task_id_to_string (destination_task_id, destination_task_id_type), instance, data);
if ((strcmp (message_id_to_string (signal_buffer->message_id), "ERROR_LOG") == 0)
|| (strcmp (message_id_to_string (signal_buffer->message_id), "WARNING_LOG") == 0)
|| (strcmp (message_id_to_string (signal_buffer->message_id), "NOTICE_LOG") == 0)
|| (strcmp (message_id_to_string (signal_buffer->message_id), "INFO_LOG") == 0)
|| (strcmp (message_id_to_string (signal_buffer->message_id), "DEBUG_LOG") == 0)
|| (strcmp (message_id_to_string (signal_buffer->message_id), "GENERIC_LOG") == 0))
{
gchar *string_terminal;
gint string_terminal_size;
uint32_t message_header_type_size;
message_header_type_size = get_message_header_type_size ();
string_terminal = (gchar *) buffer_at_offset ((buffer_t*) signal_buffer, message_header_type_size);
string_terminal_size = get_message_size ((buffer_t*) signal_buffer);
ui_notebook_terminal_append_data(string_terminal, string_terminal_size);
}
/* Increment number of messages */
ui_main_data.nb_message_received++;
......
......@@ -12,11 +12,19 @@
#include "ui_notebook.h"
#include "ui_tree_view.h"
#include "ui_signal_dissect_view.h"
static ui_text_view_t *terminal_view;
void ui_notebook_terminal_append_data(gchar *text, gint length)
{
ui_signal_set_text(terminal_view, text, length);
}
int ui_notebook_create(GtkWidget *vbox)
{
GtkWidget *notebook;
GtkWidget *vbox_notebook;
GtkWidget *vbox_notebook, *vbox_terminal;
if (!vbox)
return RC_BAD_PARAM;
......@@ -34,6 +42,17 @@ int ui_notebook_create(GtkWidget *vbox)
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_notebook, NULL);
gtk_notebook_set_tab_label_text (GTK_NOTEBOOK(notebook), vbox_notebook, "Filters");
vbox_notebook = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_notebook, NULL);
gtk_notebook_set_tab_label_text (GTK_NOTEBOOK(notebook), vbox_notebook, "Terminal");
vbox_terminal = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
terminal_view = ui_signal_dissect_new(vbox_terminal);
gtk_box_pack_start (GTK_BOX(vbox_notebook), vbox_terminal, TRUE, TRUE, 5);
/* Add the notebook to the vbox of the main window */
gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
......
......@@ -3,4 +3,6 @@
int ui_notebook_create(GtkWidget *vbox);
void ui_notebook_terminal_append_data(gchar *text, gint length);
#endif /* UI_NOTEBOOK_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment