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 { ...@@ -20,6 +20,7 @@ typedef struct {
/* Buttons */ /* Buttons */
GtkToolItem *filters_enabled; GtkToolItem *filters_enabled;
GtkToolItem *open_filters_file; GtkToolItem *open_filters_file;
GtkToolItem *refresh_filters_file;
GtkToolItem *save_filters_file; GtkToolItem *save_filters_file;
GtkToolItem *open_replay_file; GtkToolItem *open_replay_file;
......
...@@ -22,15 +22,16 @@ int ui_menu_bar_create(GtkWidget *vbox) ...@@ -22,15 +22,16 @@ int ui_menu_bar_create(GtkWidget *vbox)
{ {
GtkAccelGroup *accel_group; GtkAccelGroup *accel_group;
GtkWidget *menu_bar; GtkWidget *menu_bar;
GtkWidget *filters_menu; GtkWidget *filters_menu;
GtkWidget *messages_menu;
GtkWidget *help_menu;
GtkWidget *filters; GtkWidget *filters;
GtkWidget *messages;
GtkWidget *help;
GtkWidget *open_filters; GtkWidget *open_filters;
GtkWidget *reload_filters;
GtkWidget *save_filters; GtkWidget *save_filters;
GtkWidget *enable_filters; GtkWidget *enable_filters;
GtkWidget *messages_menu;
GtkWidget *messages;
GtkWidget *open_messages; GtkWidget *open_messages;
GtkWidget *reload_messages; GtkWidget *reload_messages;
GtkWidget *save_messages; GtkWidget *save_messages;
...@@ -39,6 +40,9 @@ int ui_menu_bar_create(GtkWidget *vbox) ...@@ -39,6 +40,9 @@ int ui_menu_bar_create(GtkWidget *vbox)
GtkWidget *goto_last_messages; GtkWidget *goto_last_messages;
GtkWidget *display_message_header; GtkWidget *display_message_header;
GtkWidget *display_brace; GtkWidget *display_brace;
GtkWidget *help_menu;
GtkWidget *help;
GtkWidget *quit; GtkWidget *quit;
GtkWidget *about; GtkWidget *about;
...@@ -64,7 +68,15 @@ int ui_menu_bar_create(GtkWidget *vbox) ...@@ -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_widget_add_accelerator (open_filters, "activate", accel_group, GDK_KEY_p, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE); GTK_ACCEL_VISIBLE);
gtk_menu_shell_append (GTK_MENU_SHELL(filters_menu), open_filters); 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"); 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, 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) ...@@ -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"); 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_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 */ /* Button to save filters file */
...@@ -221,7 +242,7 @@ int ui_toolbar_create(GtkWidget *vbox) ...@@ -221,7 +242,7 @@ int ui_toolbar_create(GtkWidget *vbox)
G_CALLBACK(ui_callback_on_save_filters), NULL); 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); 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"); 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) ...@@ -230,7 +251,7 @@ int ui_toolbar_create(GtkWidget *vbox)
G_CALLBACK(ui_callback_on_open_messages), (gpointer) FALSE); 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); 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"); 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) ...@@ -239,7 +260,7 @@ int ui_toolbar_create(GtkWidget *vbox)
G_CALLBACK(ui_callback_on_open_messages), (gpointer) TRUE); 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); 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"); 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) ...@@ -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.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.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_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); 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