2 * Dialog boxes for plugins
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1999 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 #include <epan/plugins.h>
33 #include "dlg_utils.h"
34 #include "gui_utils.h"
35 #include "compat_macros.h"
36 #include "plugins_dlg.h"
41 * Fill the list widget with a list of the plugin modules.
44 plugins_scan(GtkWidget *list)
50 pt_plug = plugin_list;
53 type = g_string_new("");
55 if (pt_plug->register_protoinfo)
57 type = g_string_append(type, sep);
58 type = g_string_append(type, "dissector");
61 if (pt_plug->register_tap_listener)
63 type = g_string_append(type, sep);
64 type = g_string_append(type, "tap");
67 simple_list_append(list, 0, pt_plug->name, 1, pt_plug->version,
69 g_string_free(type, TRUE);
70 pt_plug = pt_plug->next;
76 about_plugins_page_new(void)
78 GtkWidget *scrolledwindow;
79 GtkWidget *plugins_list;
80 const gchar *titles[] = {"Name", "Version", "Type"};
83 scrolledwindow = scrolled_window_new(NULL, NULL);
84 #if GTK_MAJOR_VERSION >= 2
85 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow),
89 plugins_list = simple_list_new(3 , titles);
90 plugins_scan(plugins_list);
92 gtk_container_add(GTK_CONTAINER(scrolledwindow), plugins_list);
94 return scrolledwindow;
97 #endif /* HAVE_PLUGINS */