*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
- * Copyright 2000 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
#endif
#include <gtk/gtk.h>
+
#include <string.h>
#include <epan/filesystem.h>
#include <epan/geoip_db.h>
#endif
-#include "../globals.h"
#include "../log.h"
#include "../version_info.h"
#include "../image/wssplash-dev.xpm"
#include "webbrowser.h"
+/*
+ * Update frequence for the splash screen, given in milliseconds.
+ */
+int info_update_freq = 100;
+
static void about_wireshark_destroy_cb(GtkWidget *, gpointer);
static void
-about_wireshark(GtkWidget *parent, GtkWidget *main_vb)
+about_wireshark(GtkWidget *parent _U_, GtkWidget *main_vb)
{
GtkWidget *msg_label, *icon;
gchar *message;
const char *title = "Network Protocol Analyzer";
- icon = xpm_to_widget_from_parent(parent, wssplash_xpm);
+ /*icon = xpm_to_widget_from_parent(parent, wssplash_xpm);*/
+ icon = xpm_to_widget(wssplash_xpm);
+
gtk_container_add(GTK_CONTAINER(main_vb), icon);
msg_label = gtk_label_new(title);
return win;
}
-#define REGISTER_FREQ 100 /* Milliseconds */
-
void
splash_update(register_action_e action, const char *message, gpointer client_data)
{
g_get_current_time(&cur_tv);
if (cur_tv.tv_sec <= next_tv.tv_sec && cur_tv.tv_usec <= next_tv.tv_usec && ul_sofar < ul_count - 1) {
- /* Only update every REGISTER_FREQ milliseconds */
+ /* Only update every splash_register_freq milliseconds */
ul_sofar++;
return;
}
memcpy(&next_tv, &cur_tv, sizeof(next_tv));
- next_tv.tv_usec += REGISTER_FREQ * 1000;
+ next_tv.tv_usec += info_update_freq * 1000;
if (next_tv.tv_usec >= 1000000) {
next_tv.tv_sec++;
next_tv.tv_usec -= 1000000;
}
-guint
+gboolean
splash_destroy(GtkWidget *win)
{
- if (win == NULL) return FALSE;
+ if (win == NULL)
+ return FALSE;
gtk_widget_destroy(win);
return FALSE;
}
-
static GtkWidget *
about_wireshark_page_new(void)
{
main_vb = gtk_vbox_new(FALSE, 6);
gtk_container_set_border_width(GTK_CONTAINER(main_vb), 12);
-#if GTK_CHECK_VERSION(2,9,0)
g_object_set(gtk_widget_get_settings(main_vb),
"gtk-label-select-on-focus", FALSE, NULL);
-#endif
about_wireshark(top_level, main_vb);
return page;
}
-static gint about_folders_callback(GtkWidget *widget, GdkEventButton *event, gint id _U_)
+static gboolean about_folders_callback(GtkWidget *widget, GdkEventButton *event, gint id _U_)
{
GtkTreeSelection *tree_selection;
GtkTreeModel *model;
if(gtk_tree_selection_get_selected (tree_selection, &model, &iter)) {
gtk_tree_model_get(model, &iter, 1, &path, -1);
filemanager_open_directory(path);
+ g_free(path);
}
return TRUE;
simple_list_append(table, 0, label, 1, dir, 2, tip, -1);
}
-
static GtkWidget *
about_folders_page_new(void)
{
path = get_tempfile_path("");
about_folders_row(table, "Temp", path,
"untitled capture files");
- g_free((void *) path);
+ g_free(path);
/* pers conf */
path = get_persconffile_path("", FALSE, FALSE);
about_folders_row(table, "Personal configuration", path,
"\"dfilters\", \"preferences\", \"ethers\", ...");
- g_free((void *) path);
+ g_free(path);
/* global conf */
constpath = get_datafile_dir();
about_folders_row(table, "Program", constpath,
"program files");
-#ifdef HAVE_PLUGINS
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
/* pers plugins */
path = get_plugins_pers_dir();
about_folders_row(table, "Personal Plugins", path,
"dissector plugins");
- g_free((void *) path);
+ g_free(path);
/* global plugins */
about_folders_row(table, "Global Plugins", get_plugin_dir(),
"dissector plugins");
#endif
+#ifdef HAVE_PYTHON
+ /* global python bindings */
+ about_folders_row(table, "Python Bindings", get_wspython_dir(),
+ "python bindings");
+#endif
+
#ifdef HAVE_GEOIP
/* GeoIP */
path = geoip_db_get_paths();
-#ifdef _WIN32
- resultArray = g_strsplit(path, ";", 10);
-#else
- resultArray = g_strsplit(path, ":", 10);
-#endif
+ resultArray = g_strsplit(path, G_SEARCHPATH_SEPARATOR_S, 10);
for(i = 0; resultArray[i]; i++)
about_folders_row(table, "GeoIP path", g_strstrip(resultArray[i]),
"GeoIP database search path");
g_strfreev(resultArray);
- g_free((void *) path);
+ g_free(path);
#endif
#ifdef HAVE_LIBSMI
/* SMI MIBs/PIBs */
path = oid_get_default_mib_path();
-#ifdef _WIN32
- resultArray = g_strsplit(path, ";", 10);
-#else
- resultArray = g_strsplit(path, ":", 10);
-#endif
+ resultArray = g_strsplit(path, G_SEARCHPATH_SEPARATOR_S, 10);
for(i = 0; resultArray[i]; i++)
about_folders_row(table, "MIB/PIB path", g_strstrip(resultArray[i]),
"SMI MIB/PIB search path");
g_strfreev(resultArray);
- g_free((void *) path);
+ g_free(path);
#endif
gtk_container_add(GTK_CONTAINER(scrolledwindow), table);
GtkWidget *page;
char *absolute_path;
+#if defined(_WIN32)
+ absolute_path = get_datafile_path("COPYING.txt");
+#else
absolute_path = get_datafile_path("COPYING");
+#endif
page = text_page_new(absolute_path);
return page;
GtkWidget *main_vb, *main_nb, *bbox, *ok_btn;
GtkWidget *page_lb, *about_page, *folders_page;
-#ifdef HAVE_PLUGINS
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
GtkWidget *plugins_page;
#endif
page_lb = gtk_label_new("Folders");
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), folders_page, page_lb);
-#ifdef HAVE_PLUGINS
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
plugins_page = about_plugins_page_new();
page_lb = gtk_label_new("Plugins");
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), plugins_page, page_lb);
/* Note that we no longer have an "About Wireshark" dialog box. */
about_wireshark_w = NULL;
}
-
-