From 9c5049a80b635d5d12829a4c51db9696dadaee00 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Sat, 14 Apr 2018 08:15:01 +0200 Subject: Gtk: Remove source code Removing all gtk source code, except for main.? which will remain for the official removal during SFUS18 Change-Id: I4273baf207df1eaaa4b94623cfd10bf74b1fc4a4 Reviewed-on: https://code.wireshark.org/review/26937 Reviewed-by: Gerald Combs Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- ui/gtk/filter_utils.c | 118 -------------------------------------------------- 1 file changed, 118 deletions(-) delete mode 100644 ui/gtk/filter_utils.c (limited to 'ui/gtk/filter_utils.c') diff --git a/ui/gtk/filter_utils.c b/ui/gtk/filter_utils.c deleted file mode 100644 index 1eca642d8c..0000000000 --- a/ui/gtk/filter_utils.c +++ /dev/null @@ -1,118 +0,0 @@ -/* filter_utils.c - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "config.h" - -#include -#include - -#include "ui/gtk/main.h" -#include "ui/gtk/gtkglobals.h" -#include "ui/gtk/find_dlg.h" -#include "ui/gtk/color_dlg.h" -#include "ui/gtk/filter_utils.h" - -#include "ui/gtk/old-gtk-compat.h" - -#include "globals.h" - -void -apply_selected_filter (guint callback_action, const char *filter) -{ - int action, type; - char *str = NULL; - const char *current_filter; - - action = FILTER_ACTION(callback_action); - type = FILTER_ACTYPE(callback_action); - - current_filter = gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget)); - - switch(type){ - case ACTYPE_SELECTED: - str = g_strdup(filter); - break; - case ACTYPE_NOT_SELECTED: - str = g_strdup_printf("!(%s)", filter); - break; - case ACTYPE_AND_SELECTED: - if ((!current_filter) || (0 == strlen(current_filter))) - str = g_strdup(filter); - else - str = g_strdup_printf("(%s) && (%s)", current_filter, filter); - break; - case ACTYPE_OR_SELECTED: - if ((!current_filter) || (0 == strlen(current_filter))) - str = g_strdup(filter); - else - str = g_strdup_printf("(%s) || (%s)", current_filter, filter); - break; - case ACTYPE_AND_NOT_SELECTED: - if ((!current_filter) || (0 == strlen(current_filter))) - str = g_strdup_printf("!(%s)", filter); - else - str = g_strdup_printf("(%s) && !(%s)", current_filter, filter); - break; - case ACTYPE_OR_NOT_SELECTED: - if ((!current_filter) || (0 == strlen(current_filter))) - str = g_strdup_printf("!(%s)", filter); - else - str = g_strdup_printf("(%s) || !(%s)", current_filter, filter); - break; - } - - switch(action){ - case ACTION_MATCH: - gtk_entry_set_text(GTK_ENTRY(main_display_filter_widget), str); - main_filter_packets(&cfile, str, FALSE); - gdk_window_raise(gtk_widget_get_window(top_level)); - break; - case ACTION_PREPARE: - gtk_entry_set_text(GTK_ENTRY(main_display_filter_widget), str); - break; - case ACTION_FIND_FRAME: - find_frame_with_filter(str); - break; - case ACTION_FIND_NEXT: - cf_find_packet_dfilter_string(&cfile, str, SD_FORWARD); - break; - case ACTION_FIND_PREVIOUS: - cf_find_packet_dfilter_string(&cfile, str, SD_BACKWARD); - break; - case ACTION_COLORIZE: - color_display_with_filter(str); - break; - } - g_free (str); -} - -/* - * Editor modelines - http://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 8 - * tab-width: 8 - * indent-tabs-mode: t - * End: - * - * vi: set shiftwidth=8 tabstop=8 noexpandtab: - * :indentSize=8:tabSize=8:noTabs=false: - */ -- cgit v1.2.3