Commit 008f7c19 authored by winckel's avatar winckel

Added filters reload button and menu.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4490 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9c5b9727
......@@ -20,6 +20,7 @@ typedef struct {
/* Buttons */
GtkToolItem *filters_enabled;
GtkToolItem *open_filters_file;
GtkToolItem *refresh_filters_file;
GtkToolItem *save_filters_file;
GtkToolItem *open_replay_file;
......
......@@ -22,15 +22,16 @@ int ui_menu_bar_create(GtkWidget *vbox)
{
GtkAccelGroup *accel_group;
GtkWidget *menu_bar;
GtkWidget *filters_menu;
GtkWidget *messages_menu;
GtkWidget *help_menu;
GtkWidget *filters;
GtkWidget *messages;
GtkWidget *help;
GtkWidget *open_filters;
GtkWidget *reload_filters;
GtkWidget *save_filters;
GtkWidget *enable_filters;
GtkWidget *messages_menu;
GtkWidget *messages;
GtkWidget *open_messages;
GtkWidget *reload_messages;
GtkWidget *save_messages;
......@@ -39,6 +40,9 @@ int ui_menu_bar_create(GtkWidget *vbox)
GtkWidget *goto_last_messages;
GtkWidget *display_message_header;
GtkWidget *display_brace;
GtkWidget *help_menu;
GtkWidget *help;
GtkWidget *quit;
GtkWidget *about;
......@@ -64,7 +68,15 @@ int ui_menu_bar_create(GtkWidget *vbox)
gtk_widget_add_accelerator (open_filters, "activate", accel_group, GDK_KEY_p, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
gtk_menu_shell_append (GTK_MENU_SHELL(filters_menu), open_filters);
g_signal_connect(G_OBJECT(open_filters), "activate", G_CALLBACK(ui_callback_on_open_filters), NULL);
g_signal_connect(G_OBJECT(open_filters), "activate", G_CALLBACK(ui_callback_on_open_filters), (gpointer) FALSE);
reload_filters = gtk_menu_item_new_with_mnemonic ("_Reload filters file");
gtk_widget_add_accelerator (reload_filters, "activate", accel_group, GDK_KEY_d, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
gtk_widget_add_accelerator (reload_filters, "activate", accel_group, GDK_KEY_F4, 0, GTK_ACCEL_VISIBLE);
gtk_menu_shell_append (GTK_MENU_SHELL(filters_menu), reload_filters);
g_signal_connect(G_OBJECT(reload_filters), "activate", G_CALLBACK(ui_callback_on_open_filters),
(gpointer) TRUE);
save_filters = gtk_menu_item_new_with_mnemonic ("_Save filters file");
gtk_widget_add_accelerator (save_filters, "activate", accel_group, GDK_KEY_a, GDK_CONTROL_MASK,
......@@ -209,7 +221,16 @@ int ui_toolbar_create(GtkWidget *vbox)
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(ui_main_data.open_filters_file), "Open filters file");
g_signal_connect(G_OBJECT(ui_main_data.open_filters_file), "clicked",
G_CALLBACK(ui_callback_on_open_filters), NULL);
G_CALLBACK(ui_callback_on_open_filters), (gpointer) FALSE);
}
/* Button to refresh filters file */
{
ui_main_data.refresh_filters_file = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(ui_main_data.refresh_filters_file), "Reload filters file");
g_signal_connect(G_OBJECT(ui_main_data.refresh_filters_file), "clicked",
G_CALLBACK(ui_callback_on_open_filters), (gpointer) TRUE);
}
/* Button to save filters file */
......@@ -221,7 +242,7 @@ int ui_toolbar_create(GtkWidget *vbox)
G_CALLBACK(ui_callback_on_save_filters), NULL);
}
/* Button to open replay file */
/* Button to open messages file */
{
ui_main_data.open_replay_file = gtk_tool_button_new_from_stock(GTK_STOCK_OPEN);
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(ui_main_data.open_replay_file), "Open messages file");
......@@ -230,7 +251,7 @@ int ui_toolbar_create(GtkWidget *vbox)
G_CALLBACK(ui_callback_on_open_messages), (gpointer) FALSE);
}
/* Button to refresh replay file */
/* Button to refresh messages file */
{
ui_main_data.refresh_replay_file = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(ui_main_data.refresh_replay_file), "Reload messages file");
......@@ -239,7 +260,7 @@ int ui_toolbar_create(GtkWidget *vbox)
G_CALLBACK(ui_callback_on_open_messages), (gpointer) TRUE);
}
/* Button to save replay file */
/* Button to save messages file */
{
ui_main_data.save_replay_file = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE);
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(ui_main_data.save_replay_file), "Save messages file");
......@@ -320,6 +341,7 @@ int ui_toolbar_create(GtkWidget *vbox)
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ui_main_data.filters_enabled), FALSE, FALSE, LABEL_SPACE);
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ui_main_data.open_filters_file), FALSE, FALSE, BUTTON_SPACE);
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ui_main_data.refresh_filters_file), FALSE, FALSE, BUTTON_SPACE);
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ui_main_data.save_filters_file), FALSE, FALSE, BUTTON_SPACE);
gtk_box_pack_start(GTK_BOX(hbox), gtk_separator_new(GTK_ORIENTATION_VERTICAL), FALSE, FALSE, SEPARATOR_SPACE);
......
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