projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
print debug
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
modules
/
gui
/
filter
/
filter.c
diff --git
a/ltt/branches/poly/lttv/modules/gui/filter/filter.c
b/ltt/branches/poly/lttv/modules/gui/filter/filter.c
index 893929b4ccb0be337cde5a0a1f63cdbad6b3f222..99739a53b67b04d9572aa23a937d9a46edf7b393 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/filter/filter.c
+++ b/
ltt/branches/poly/lttv/modules/gui/filter/filter.c
@@
-35,6
+35,9
@@
#include "hGuiFilterInsert.xpm"
#include "hGuiFilterInsert.xpm"
+
+GSList *g_filter_list = NULL ;
+
/*! \file lttv/modules/gui/filter/filter.c
* \brief Graphic filter interface.
*
/*! \file lttv/modules/gui/filter/filter.c
* \brief Graphic filter interface.
*
@@
-100,6
+103,8
@@
struct _FilterViewerDataLine {
struct _FilterViewerData {
Tab *tab; /**< current tab of module */
struct _FilterViewerData {
Tab *tab; /**< current tab of module */
+ GtkWidget *f_window; /**< filter window */
+
GtkWidget *f_main_box; /**< main container */
GtkWidget *f_expression_field; /**< entire expression (GtkEntry) */
GtkWidget *f_main_box; /**< main container */
GtkWidget *f_expression_field; /**< entire expression (GtkEntry) */
@@
-116,7
+121,8
@@
struct _FilterViewerData {
GPtrArray *f_math_op_options; /**< array of operators types for math_op box */
GtkWidget *f_add_button; /**< add expression to current expression (GtkButton) */
GPtrArray *f_math_op_options; /**< array of operators types for math_op box */
GtkWidget *f_add_button; /**< add expression to current expression (GtkButton) */
-
+
+ gchar *name; /**< Name of the window in the main window */
};
/**
};
/**
@@
-130,7
+136,7
@@
struct _FilterViewerData {
GtkWidget*
guifilter_get_widget(FilterViewerData *fvd)
{
GtkWidget*
guifilter_get_widget(FilterViewerData *fvd)
{
- return fvd->f_
main_box
;
+ return fvd->f_
window
;
}
/**
}
/**
@@
-143,7
+149,7
@@
guifilter_get_widget(FilterViewerData *fvd)
FilterViewerData*
gui_filter(Tab *tab)
{
FilterViewerData*
gui_filter(Tab *tab)
{
- g_
print
("filter::gui_filter()");
+ g_
debug
("filter::gui_filter()");
unsigned i;
GtkCellRenderer *renderer;
unsigned i;
GtkCellRenderer *renderer;
@@
-203,6
+209,8
@@
gui_filter(Tab *tab)
g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new(">="));
g_ptr_array_add(fvd->f_math_op_options,(gpointer) g_string_new(">="));
+ fvd->f_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
/*
* Initiating GtkTable layout
* starts with 2 rows and 5 columns and
/*
* Initiating GtkTable layout
* starts with 2 rows and 5 columns and
@@
-212,6
+220,8
@@
gui_filter(Tab *tab)
gtk_table_set_row_spacings(GTK_TABLE(fvd->f_main_box),5);
gtk_table_set_col_spacings(GTK_TABLE(fvd->f_main_box),5);
gtk_table_set_row_spacings(GTK_TABLE(fvd->f_main_box),5);
gtk_table_set_col_spacings(GTK_TABLE(fvd->f_main_box),5);
+ gtk_container_add(GTK_CONTAINER(fvd->f_window), GTK_WIDGET(fvd->f_main_box));
+
/*
* First half of the filter window
* - textual entry of filter expression
/*
* First half of the filter window
* - textual entry of filter expression
@@
-258,6
+268,8
@@
gui_filter(Tab *tab)
gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvd->f_logical_op_junction_box,0,1,1,2,GTK_SHRINK,GTK_FILL,0,0);
gtk_table_attach( GTK_TABLE(fvd->f_main_box),fvd->f_logical_op_junction_box,0,1,1,2,GTK_SHRINK,GTK_FILL,0,0);
+ gtk_container_set_border_width(GTK_CONTAINER(fvd->f_main_box), 1);
+
/* initialize a new line */
fvd->f_lines = g_ptr_array_new();
fvd->rows = 1;
/* initialize a new line */
fvd->f_lines = g_ptr_array_new();
fvd->rows = 1;
@@
-268,6
+280,7
@@
gui_filter(Tab *tab)
* show main container
*/
gtk_widget_show(fvd->f_main_box);
* show main container
*/
gtk_widget_show(fvd->f_main_box);
+ gtk_widget_show(fvd->f_window);
g_object_set_data_full(
g_object_set_data_full(
@@
-276,6
+289,9
@@
gui_filter(Tab *tab)
fvd,
(GDestroyNotify)gui_filter_destructor);
fvd,
(GDestroyNotify)gui_filter_destructor);
+ g_filter_list = g_slist_append(
+ g_filter_list,
+ fvd);
return fvd;
}
return fvd;
}
@@
-407,7
+423,13
@@
gui_filter_destructor(FilterViewerData *fvd)
// filter_viewer_data);
// }
lttvwindowtraces_background_notify_remove(fvd);
// filter_viewer_data);
// }
lttvwindowtraces_background_notify_remove(fvd);
-
+
+ g_filter_list = g_slist_remove(g_filter_list, fvd);
+
+ main_window_remove_child_window(tab, fvd->name);
+
+ g_free(fvd->name);
+
g_free(fvd);
}
g_free(fvd);
}
@@
-426,10
+448,14
@@
GtkWidget *
h_guifilter(Tab *tab)
{
FilterViewerData* f = gui_filter(tab) ;
h_guifilter(Tab *tab)
{
FilterViewerData* f = gui_filter(tab) ;
+ f->name = g_new(gchar, 256);
+
+ snprintf(f->name, 256, "guifilter %p", f);
if(f)
if(f)
- return guifilter_get_widget(f);
- else return NULL;
+ main_window_add_child_window(tab, f,
+ f->name, (GDestroyNotify)gui_filter_destructor);
+ return NULL;
}
}
@@
-475,6
+501,8
@@
filter_destroy_walk(gpointer data, gpointer user_data)
* everything that has been registered in the gtkTraceSet API.
*/
static void destroy() {
* everything that has been registered in the gtkTraceSet API.
*/
static void destroy() {
+
+ g_slist_foreach(g_filter_list, filter_destroy_walk, NULL );
lttvwindow_unregister_constructor(h_guifilter);
lttvwindow_unregister_constructor(h_guifilter);
@@
-499,7
+527,8
@@
callback_process_button(GtkWidget *widget, gpointer data) {
GString* s = g_string_new(gtk_entry_get_text(GTK_ENTRY(fvd->f_expression_field)));
lttv_filter_append_expression(filter,s->str);
g_string_free(s,TRUE);
GString* s = g_string_new(gtk_entry_get_text(GTK_ENTRY(fvd->f_expression_field)));
lttv_filter_append_expression(filter,s->str);
g_string_free(s,TRUE);
- SetFilter(fvd->tab,filter);
+ //SetFilter(fvd->tab,filter);
+ lttvwindow_report_filter(fvd->tab, filter);
}
}
}
}
This page took
0.023552 seconds
and
4
git commands to generate.