Commit d8da9d40 authored by winckel's avatar winckel
Browse files

Added file filters to open files functions.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4520 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f4113d53
......@@ -164,7 +164,7 @@ int ui_messages_read(char *filename)
buffer->message_number = itti_signal_header->message_number;
ui_signal_add_to_list (buffer, ((read_messages % 100) == 0) ? (gpointer) 1 : NULL);
ui_signal_add_to_list (buffer, ((read_messages % 1000) == 0) ? (gpointer) 1 : NULL);
if ((read_messages % 100) == 0)
{
......@@ -235,12 +235,22 @@ int ui_messages_open_file_chooser(void)
{
int result = RC_OK;
GtkWidget *filechooser;
GtkFileFilter *file_filter;
gboolean accept;
char *filename;
filechooser = gtk_file_chooser_dialog_new ("Select file", GTK_WINDOW (ui_main_data.window),
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
file_filter = gtk_file_filter_new();
gtk_file_filter_set_name (file_filter, "Log files");
gtk_file_filter_add_pattern (file_filter, "*.log");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooser), file_filter);
file_filter = gtk_file_filter_new();
gtk_file_filter_set_name (file_filter, "All files");
gtk_file_filter_add_pattern (file_filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooser), file_filter);
/* Process the response */
accept = gtk_dialog_run (GTK_DIALOG (filechooser)) == GTK_RESPONSE_ACCEPT;
......@@ -275,12 +285,23 @@ int ui_filters_open_file_chooser(void)
{
int result = RC_OK;
GtkWidget *filechooser;
GtkFileFilter *file_filter;
gboolean accept;
char *filename;
filechooser = gtk_file_chooser_dialog_new ("Select file", GTK_WINDOW (ui_main_data.window),
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
file_filter = gtk_file_filter_new();
gtk_file_filter_set_name (file_filter, "Filters files");
gtk_file_filter_add_pattern (file_filter, "*.xml");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooser), file_filter);
file_filter = gtk_file_filter_new();
gtk_file_filter_set_name (file_filter, "All files");
gtk_file_filter_add_pattern (file_filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooser), file_filter);
/* Process the response */
accept = gtk_dialog_run (GTK_DIALOG (filechooser)) == GTK_RESPONSE_ACCEPT;
......
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