summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-11-26 09:33:56 +0000
committerGuy Harris <guy@alum.mit.edu>2013-11-26 09:33:56 +0000
commit1f88ca3ca6d97e975b19b6730adb2a5029f064cd (patch)
tree89ffefaa446fd436e8502134b3c89058e6ebfe87
parentb01acd4b2552ffd471165ace1b1cf5c80cd5c0ae (diff)
downloadwireshark-1f88ca3ca6d97e975b19b6730adb2a5029f064cd.tar.gz
Note why refresh_local_interface_lists() is being called in various
cases. svn path=/trunk/; revision=53597
-rw-r--r--ui/gtk/capture_dlg.c7
-rw-r--r--ui/gtk/gtk_iface_monitor.c5
-rw-r--r--ui/gtk/main_menubar.c3
-rw-r--r--ui/gtk/main_welcome.c3
-rw-r--r--ui/gtk/prefs_capture.c3
5 files changed, 19 insertions, 2 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c
index cb502b2942..f63f3fa76e 100644
--- a/ui/gtk/capture_dlg.c
+++ b/ui/gtk/capture_dlg.c
@@ -3800,7 +3800,9 @@ apply_local_cb(GtkWidget *win _U_, gpointer *data _U_)
hide_interface(g_strdup(new_hide));
/* Refresh all places that are displaying an interface list
- that includes local interfaces. */
+ that includes local interfaces, in case we've changed
+ a property of the interface list that changes how it's
+ displayed. */
refresh_local_interface_lists();
/* save changes to the preferences file */
@@ -3823,6 +3825,9 @@ capture_dlg_refresh_if (void)
update_properties_all();
}
+/*
+ * We've been asked to rescan the system looking for interfaces.
+ */
static void
rescan_local_cb(GtkWidget *button _U_, gpointer *data _U_)
{
diff --git a/ui/gtk/gtk_iface_monitor.c b/ui/gtk/gtk_iface_monitor.c
index 4c134aac70..78187f11e6 100644
--- a/ui/gtk/gtk_iface_monitor.c
+++ b/ui/gtk/gtk_iface_monitor.c
@@ -73,6 +73,11 @@ gtk_iface_mon_event_cb(const char *iface, int up)
if (present == up)
return;
+ /*
+ * We've been told that there's a new interface or that an old
+ * interface is gone; reload the list and refresh all places
+ * that are displaying the list.
+ */
refresh_local_interface_lists();
}
diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c
index 4c9d9c24b7..b10cf12964 100644
--- a/ui/gtk/main_menubar.c
+++ b/ui/gtk/main_menubar.c
@@ -837,6 +837,9 @@ capture_filters_action_cb(GtkAction *action _U_, gpointer user_data _U_)
cfilter_dialog_cb(NULL /* GtkWidget *w _U_ */);
}
+/*
+ * We've been asked to rescan the system looking for interfaces.
+ */
static void
refresh_interfaces_action_cb(GtkAction *action _U_, gpointer user_data _U_)
{
diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c
index ee6bac8bf0..857cdb6c1a 100644
--- a/ui/gtk/main_welcome.c
+++ b/ui/gtk/main_welcome.c
@@ -971,6 +971,9 @@ update_capture_box(void)
gtk_tree_selection_set_select_function(GTK_TREE_SELECTION(entry), on_selection_changed, (gpointer)&changed, NULL);
}
+/*
+ * We've been asked to rescan the system looking for interfaces.
+ */
static void
refresh_interfaces_cb(GtkWidget *w _U_, gpointer user_data _U_)
{
diff --git a/ui/gtk/prefs_capture.c b/ui/gtk/prefs_capture.c
index 4d89f6d3f9..c1c424b9ad 100644
--- a/ui/gtk/prefs_capture.c
+++ b/ui/gtk/prefs_capture.c
@@ -1029,7 +1029,8 @@ ifopts_edit_ok_cb(GtkWidget *w _U_, gpointer parent_w)
}
/* Update everything that shows an interface list that includes
- local interfaces. */
+ local interfaces, as we may have changed something that
+ affects how those lists are displayed. */
refresh_local_interface_lists();
/* Now nuke this window. */