Commit c5f7ea1e authored by winckel's avatar winckel

Added right-click message filter enable toggling.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4445 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e69afaad
......@@ -73,7 +73,7 @@ gboolean ui_filters_enable(gboolean enabled)
return changed;
}
static int ui_search_name(ui_filter_t *filter, const char *name)
static int ui_filters_search_name(ui_filter_t *filter, const char *name)
{
int item;
......@@ -88,7 +88,7 @@ static int ui_search_name(ui_filter_t *filter, const char *name)
return (item);
}
static int ui_search_id(ui_filter_t *filter, uint32_t value)
int ui_filters_search_id(ui_filter_t *filter, uint32_t value)
{
int item;
......@@ -127,7 +127,7 @@ static void ui_filter_set_enabled(uint8_t *enabled, ui_entry_enabled_e entry_ena
static int ui_filter_add(ui_filter_t *filter, uint32_t value, const char *name, ui_entry_enabled_e entry_enabled)
{
int item = ui_search_name (filter, name);
int item = ui_filters_search_name (filter, name);
if (item >= filter->allocated)
{
......@@ -190,7 +190,7 @@ static gboolean ui_item_enabled(ui_filter_t *filter, const uint32_t value)
if (value != (uint32_t) ~0)
{
item = ui_search_id (filter, value);
item = ui_filters_search_id (filter, value);
if (item < filter->used)
{
......@@ -394,7 +394,7 @@ int ui_filters_file_write(const char *file_name)
return RC_OK;
}
static void ui_create_filter_menu(GtkWidget **menu, ui_filter_t *filter)
void ui_create_filter_menu(GtkWidget **menu, ui_filter_t *filter)
{
GtkWidget *menu_items;
int item;
......@@ -463,6 +463,8 @@ static void ui_create_filter_menu(GtkWidget **menu, ui_filter_t *filter)
g_debug("ui_create_filter_menu %lx %lx", (long) menu_items, (long) data);
g_signal_connect(G_OBJECT(menu_items), "activate",
G_CALLBACK(ui_callback_on_menu_item_selected), data);
/* Save the menu_item reference */
filter->items[item].menu_item = menu_items;
/* Show the widget */
gtk_widget_show(menu_items);
......
......@@ -20,6 +20,7 @@ typedef struct
uint32_t id;
char name[SIGNAL_NAME_LENGTH];
uint8_t enabled;
GtkWidget *menu_item;
} ui_filter_item_t;
typedef struct
......@@ -45,6 +46,8 @@ int ui_init_filters(int reset, int clear_ids);
gboolean ui_filters_enable(gboolean enabled);
int ui_filters_search_id(ui_filter_t *filter, uint32_t value);
void ui_filters_add(ui_filter_e filter, uint32_t value, const char *name, ui_entry_enabled_e entry_enabled);
gboolean ui_filters_message_enabled(const uint32_t message, const uint32_t origin_task, const uint32_t destination_task, const uint32_t instance);
......@@ -53,6 +56,8 @@ int ui_filters_read(const char *file_name);
int ui_filters_file_write(const char *file_name);
void ui_create_filter_menu(GtkWidget **menu, ui_filter_t *filter);
void ui_destroy_filter_menus(void);
void ui_destroy_filter_menu(ui_filter_e filter);
......
......@@ -194,7 +194,7 @@ int ui_toolbar_create(GtkWidget *vbox)
messages_label = gtk_label_new("Messages");
/* Button to deactivate filtering */
/* Button to Enable filtering */
{
ui_main_data.filters_enabled = gtk_toggle_tool_button_new();
gtk_tool_button_set_label (GTK_TOOL_BUTTON(ui_main_data.filters_enabled), "Filters");
......
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