Commit 0241785a authored by winckel's avatar winckel

Moved operation running test to cover also reload operations.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4863 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent bb84c46c
...@@ -29,8 +29,9 @@ ...@@ -29,8 +29,9 @@
#include "locate_root.h" #include "locate_root.h"
#include "xml_parse.h" #include "xml_parse.h"
static gboolean refresh_message_list = TRUE; static gboolean refresh_message_list = TRUE;
static gboolean filters_changed = FALSE; static gboolean filters_changed = FALSE;
static gboolean operation_running = FALSE;
gboolean ui_callback_on_open_messages(GtkWidget *widget, gpointer data) gboolean ui_callback_on_open_messages(GtkWidget *widget, gpointer data)
{ {
...@@ -38,13 +39,18 @@ gboolean ui_callback_on_open_messages(GtkWidget *widget, gpointer data) ...@@ -38,13 +39,18 @@ gboolean ui_callback_on_open_messages(GtkWidget *widget, gpointer data)
g_message("Open messages event occurred %d", refresh); g_message("Open messages event occurred %d", refresh);
if (refresh && (ui_main_data.messages_file_name != NULL)) if (operation_running == FALSE)
{ {
CHECK_FCT(ui_messages_read (ui_main_data.messages_file_name)); operation_running = TRUE;
} if (refresh && (ui_main_data.messages_file_name != NULL))
else {
{ CHECK_FCT(ui_messages_read (ui_main_data.messages_file_name));
CHECK_FCT(ui_messages_open_file_chooser()); }
else
{
CHECK_FCT(ui_messages_open_file_chooser());
}
operation_running = FALSE;
} }
return TRUE; return TRUE;
...@@ -54,7 +60,12 @@ gboolean ui_callback_on_save_messages(GtkWidget *widget, gpointer data) ...@@ -54,7 +60,12 @@ gboolean ui_callback_on_save_messages(GtkWidget *widget, gpointer data)
{ {
g_message("Save messages event occurred"); g_message("Save messages event occurred");
CHECK_FCT(ui_messages_save_file_chooser()); if (operation_running == FALSE)
{
operation_running = TRUE;
CHECK_FCT(ui_messages_save_file_chooser());
operation_running = FALSE;
}
return TRUE; return TRUE;
} }
...@@ -93,13 +104,19 @@ gboolean ui_callback_on_open_filters(GtkWidget *widget, gpointer data) ...@@ -93,13 +104,19 @@ gboolean ui_callback_on_open_filters(GtkWidget *widget, gpointer data)
g_message("Open filters event occurred"); g_message("Open filters event occurred");
if (refresh && (ui_main_data.filters_file_name != NULL)) if (operation_running == FALSE)
{
CHECK_FCT(ui_filters_read (ui_main_data.filters_file_name));
}
else
{ {
CHECK_FCT(ui_filters_open_file_chooser()); operation_running = TRUE;
if (refresh && (ui_main_data.filters_file_name != NULL))
{
CHECK_FCT(ui_filters_read (ui_main_data.filters_file_name));
}
else
{
CHECK_FCT(ui_filters_open_file_chooser());
}
operation_running = FALSE;
} }
return TRUE; return TRUE;
...@@ -107,8 +124,14 @@ gboolean ui_callback_on_open_filters(GtkWidget *widget, gpointer data) ...@@ -107,8 +124,14 @@ gboolean ui_callback_on_open_filters(GtkWidget *widget, gpointer data)
gboolean ui_callback_on_save_filters(GtkWidget *widget, gpointer data) gboolean ui_callback_on_save_filters(GtkWidget *widget, gpointer data)
{ {
g_message("Save filters event occurred"); if (operation_running == FALSE)
CHECK_FCT(ui_filters_save_file_chooser()); {
operation_running = TRUE;
g_message("Save filters event occurred");
CHECK_FCT(ui_filters_save_file_chooser());
operation_running = FALSE;
}
return TRUE; return TRUE;
} }
......
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