#include "ui/gtk/filter_dlg.h"
#include "ui/gtk/dlg_utils.h"
#include "ui/gtk/file_dlg.h"
-#include "ui/gtk/stock_icons.h"
#include "ui/gtk/capture_file_dlg.h"
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/cfilter_combo_utils.h"
#include "ui/gtk/capture_if_dlg.h"
#include "ui/gtk/main_welcome.h"
-#include "ui/gtk/network_icons.h"
#include "ui/gtk/menus.h"
#include "ui/gtk/prefs_dlg.h"
#include "ui/gtk/main_80211_toolbar.h"
+#include "ui/gtk/stock_icons.h"
+#ifndef HAVE_GRESOURCE
+#include "ui/gtk/pixbuf-csource.h"
+#endif
#include "simple_dialog.h"
#include "ui/gtk/keys.h"
#include "ui/gtk/old-gtk-compat.h"
-#include "ui/gtk/expert_indicators.h"
#ifdef HAVE_AIRPCAP
#include <caputils/airpcap.h>
colorize_filter_te_as_empty(filter_te);
if (strlen(device.cfilter) > 0) {
g_array_remove_index(global_capture_opts.all_ifaces, i);
+ g_free(device.cfilter);
device.cfilter = g_strdup(filter_text);
g_array_insert_val(global_capture_opts.all_ifaces, i, device);
update_filter_string(device.name, filter_text);
}
g_assert(filter_text != NULL);
g_array_remove_index(global_capture_opts.all_ifaces, i);
+ g_free(device.cfilter);
device.cfilter = g_strdup(filter_text);
g_array_insert_val(global_capture_opts.all_ifaces, i, device);
g_mutex_lock(cfc_data_mtx);
ip_str = g_string_new("");
str = "";
ips = 0;
+ memset(&device, 0, sizeof(device));
device.name = g_strdup(if_info->name);
/* Is this interface hidden and, if so, should we include it
anyway? */
model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
if (error) {
+#ifdef HAVE_GRESOURCE
+ icon = pixbuf_to_widget("/org/wireshark/image/toolbar/14x14/x-expert-error.png");
+#else
icon = pixbuf_to_widget(expert_error_pb_data);
+#endif
gtk_list_store_set(GTK_LIST_STORE(model), &iter, COMPILE_ERROR, 1, SIGN, gtk_image_get_pixbuf(GTK_IMAGE(icon)), INAME, name, -1);
} else {
+#ifdef HAVE_GRESOURCE
+ icon = pixbuf_to_widget("/org/wireshark/image/expert_ok.png");
+#else
icon = pixbuf_to_widget(expert_ok_pb_data);
+#endif
gtk_list_store_set(GTK_LIST_STORE(model), &iter, COMPILE_ERROR, 0, SIGN, gtk_image_get_pixbuf(GTK_IMAGE(icon)), INAME, name, -1);
}
g_hash_table_insert(compile_results, name, text);
device.has_snaplen = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(snap_cb));
if (device.has_snaplen) {
device.snaplen = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(snap_sb));
- if (device.snaplen < 1)
- device.snaplen = WTAP_MAX_PACKET_SIZE;
- else if (device.snaplen < MIN_PACKET_SIZE)
+ if (device.snaplen < MIN_PACKET_SIZE)
device.snaplen = MIN_PACKET_SIZE;
} else {
device.snaplen = WTAP_MAX_PACKET_SIZE;
device = g_array_index(global_capture_opts.all_ifaces, interface_t, i);
if (strcmp(device.name, interface) == 0) {
g_array_remove_index(global_capture_opts.all_ifaces, i);
+ g_free(device.cfilter);
device.cfilter = g_strdup(filter_text);
g_array_insert_val(global_capture_opts.all_ifaces, i, device);
update_filter_string(device.name, filter_text);
for (i = 0; i < global_capture_opts.all_ifaces->len; i++) {
device = g_array_index(global_capture_opts.all_ifaces, interface_t, i);
if (strcmp(pipe_name, device.name) == 0) {
+ g_free(device.name);
+ g_free(device.display_name);
device.name = g_strdup((gchar *)data);
device.display_name = g_strdup_printf("%s", device.name);
g_array_remove_index(global_capture_opts.all_ifaces, i);
}
}
pipe_name = g_strdup(g_save_file);
+ memset(&device, 0, sizeof(device));
device.name = g_strdup(g_save_file);
device.display_name = g_strdup_printf("%s", device.name);
device.hidden = FALSE;
} while (gtk_tree_model_iter_next(model, &iter));
g_free(name);
}
- hide_interface(g_strdup(new_hide));
+ hide_interface(new_hide);
/* Refresh all places that are displaying an interface list
that includes interfaces other than local interfaces
} else {
if (strcmp(host, device.remote_opts.remote_host_opts.remote_host) == 0) {
g_array_remove_index(global_capture_opts.all_ifaces, i);
+ capture_opts_free_interface_t(&device);
}
}
}
this capture. */
collect_ifaces(&global_capture_opts);
- if (capture_start(&global_capture_opts, &global_capture_session, main_window_update)) {
+ if (capture_start(&global_capture_opts, &global_capture_session, &global_info_data, main_window_update)) {
/* The capture succeeded, which means the capture filters specified are
valid; add them to the recent capture filter lists for the interfaces.